1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-23 22:37:55 +02:00

introduce toResourceType

This commit is contained in:
Laserlicht
2025-09-15 00:08:18 +02:00
parent acd067e587
commit d808bd6412
34 changed files with 160 additions and 102 deletions

View File

@@ -0,0 +1,25 @@
/*
* ResourceType.h, part of VCMI engine
*
* Authors: listed in file AUTHORS in main folder
*
* License: GNU General Public License v2.0 or later
* Full text of license available in license.txt file, in main folder
*
*/
#pragma once
#include "Entity.h"
VCMI_LIB_NAMESPACE_BEGIN
class GameResID;
class DLL_LINKAGE ResourceType : public EntityT<GameResID>
{
virtual int getPrice() const = 0;
};
VCMI_LIB_NAMESPACE_END

View File

@@ -0,0 +1,25 @@
/*
* ResourceTypeService.h, part of VCMI engine
*
* Authors: listed in file AUTHORS in main folder
*
* License: GNU General Public License v2.0 or later
* Full text of license available in license.txt file, in main folder
*
*/
#pragma once
#include "EntityService.h"
VCMI_LIB_NAMESPACE_BEGIN
class GameResID;
class ResourceType;
class DLL_LINKAGE ResourceTypeService : public EntityServiceT<GameResID, ResourceType>
{
public:
};
VCMI_LIB_NAMESPACE_END

View File

@@ -19,6 +19,7 @@ class CreatureService;
class FactionService;
class HeroClassService;
class HeroTypeService;
class ResourceTypeService;
class SkillService;
class JsonNode;
class BattleFieldService;
@@ -52,6 +53,7 @@ public:
virtual const FactionService * factions() const = 0;
virtual const HeroClassService * heroClasses() const = 0;
virtual const HeroTypeService * heroTypes() const = 0;
virtual const ResourceTypeService * resources() const = 0;
#if SCRIPTING_ENABLED
virtual const scripting::Service * scripts() const = 0;
#endif