mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-23 22:37:55 +02:00
introduce toResourceType
This commit is contained in:
25
include/vcmi/ResourceType.h
Normal file
25
include/vcmi/ResourceType.h
Normal 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
|
||||
25
include/vcmi/ResourceTypeService.h
Normal file
25
include/vcmi/ResourceTypeService.h
Normal 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
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user