1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00

Merge pull request #1539 from dydzio0614/fixScriptingCompilation

Fix scripting compilation
This commit is contained in:
Ivan Savenko 2023-02-02 12:21:11 +02:00 committed by GitHub
commit f4bbcd0ed4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 20 additions and 19 deletions

View File

@ -19,7 +19,8 @@ class SecondarySkill;
class DLL_LINKAGE Skill : public EntityT<SecondarySkill> class DLL_LINKAGE Skill : public EntityT<SecondarySkill>
{ {
public: public:
virtual std::string getDescriptionTextID(int level) const = 0;
virtual std::string getDescriptionTranslated(int level) const = 0;
}; };

View File

@ -15,9 +15,9 @@
VCMI_LIB_NAMESPACE_BEGIN VCMI_LIB_NAMESPACE_BEGIN
class SecondarySkill; class SecondarySkill;
class CSkill; class Skill;
class DLL_LINKAGE SkillService : public EntityServiceT<SecondarySkill, CSkill> class DLL_LINKAGE SkillService : public EntityServiceT<SecondarySkill, Skill>
{ {
public: public:
}; };

View File

@ -63,8 +63,8 @@ public:
std::string getNameTextID() const override; std::string getNameTextID() const override;
std::string getNameTranslated() const override; std::string getNameTranslated() const override;
std::string getDescriptionTextID(int level) const; std::string getDescriptionTextID(int level) const override;
std::string getDescriptionTranslated(int level) const; std::string getDescriptionTranslated(int level) const override;
const LevelInfo & at(int level) const; const LevelInfo & at(int level) const;
LevelInfo & at(int level); LevelInfo & at(int level);
@ -89,7 +89,7 @@ public:
friend DLL_LINKAGE std::ostream & operator<<(std::ostream & out, const CSkill::LevelInfo & info); friend DLL_LINKAGE std::ostream & operator<<(std::ostream & out, const CSkill::LevelInfo & info);
}; };
class DLL_LINKAGE CSkillHandler: public CHandlerBase<SecondarySkill, CSkill, CSkill, SkillService> class DLL_LINKAGE CSkillHandler: public CHandlerBase<SecondarySkill, Skill, CSkill, SkillService>
{ {
public: public:
CSkillHandler(); CSkillHandler();

View File

@ -31,13 +31,13 @@ const std::vector<ArtifactProxy::CustomRegType> ArtifactProxy::REGISTER_CUSTOM =
{"getIconIndex", LuaMethodWrapper<Artifact, decltype(&Entity::getIconIndex), &Entity::getIconIndex>::invoke, false}, {"getIconIndex", LuaMethodWrapper<Artifact, decltype(&Entity::getIconIndex), &Entity::getIconIndex>::invoke, false},
{"getIndex", LuaMethodWrapper<Artifact, decltype(&Entity::getIndex), &Entity::getIndex>::invoke, false}, {"getIndex", LuaMethodWrapper<Artifact, decltype(&Entity::getIndex), &Entity::getIndex>::invoke, false},
{"getJsonKey", LuaMethodWrapper<Artifact, decltype(&Entity::getJsonKey), &Entity::getJsonKey>::invoke, false}, {"getJsonKey", LuaMethodWrapper<Artifact, decltype(&Entity::getJsonKey), &Entity::getJsonKey>::invoke, false},
{"getName", LuaMethodWrapper<Artifact, decltype(&Entity::getName), &Entity::getName>::invoke, false}, {"getName", LuaMethodWrapper<Artifact, decltype(&Entity::getNameTranslated), &Entity::getNameTranslated>::invoke, false},
{"getId", LuaMethodWrapper<Artifact, decltype(&EntityT<ArtifactID>::getId), &EntityT<ArtifactID>::getId>::invoke, false}, {"getId", LuaMethodWrapper<Artifact, decltype(&EntityT<ArtifactID>::getId), &EntityT<ArtifactID>::getId>::invoke, false},
{"accessBonuses", LuaMethodWrapper<Artifact, decltype(&EntityWithBonuses<ArtifactID>::accessBonuses), &EntityWithBonuses<ArtifactID>::accessBonuses>::invoke, false}, {"accessBonuses", LuaMethodWrapper<Artifact, decltype(&EntityWithBonuses<ArtifactID>::accessBonuses), &EntityWithBonuses<ArtifactID>::accessBonuses>::invoke, false},
{"getDescription", LuaMethodWrapper<Artifact, decltype(&Artifact::getDescription), &Artifact::getDescription>::invoke, false}, {"getDescription", LuaMethodWrapper<Artifact, decltype(&Artifact::getDescriptionTranslated), &Artifact::getDescriptionTranslated>::invoke, false},
{"getEventText", LuaMethodWrapper<Artifact, decltype(&Artifact::getEventText), &Artifact::getEventText>::invoke, false}, {"getEventText", LuaMethodWrapper<Artifact, decltype(&Artifact::getEventTranslated), &Artifact::getEventTranslated>::invoke, false},
{"isBig", LuaMethodWrapper<Artifact, decltype(&Artifact::isBig), &Artifact::isBig>::invoke, false}, {"isBig", LuaMethodWrapper<Artifact, decltype(&Artifact::isBig), &Artifact::isBig>::invoke, false},
{"isTradable", LuaMethodWrapper<Artifact, decltype(&Artifact::isTradable), &Artifact::isTradable>::invoke, false}, {"isTradable", LuaMethodWrapper<Artifact, decltype(&Artifact::isTradable), &Artifact::isTradable>::invoke, false},
{"getPrice", LuaMethodWrapper<Artifact, decltype(&Artifact::getPrice), &Artifact::getPrice>::invoke, false}, {"getPrice", LuaMethodWrapper<Artifact, decltype(&Artifact::getPrice), &Artifact::getPrice>::invoke, false},

View File

@ -88,7 +88,7 @@ int BattleCbProxy::getTerrainType(lua_State * L)
if(!S.tryGet(1, object)) if(!S.tryGet(1, object))
return S.retVoid(); return S.retVoid();
return LuaStack::quickRetInt(L, object->battleTerrainType()); return LuaStack::quickRetInt(L, object->battleTerrainType().getNum());
} }
int BattleCbProxy::getUnitByPos(lua_State * L) int BattleCbProxy::getUnitByPos(lua_State * L)

View File

@ -31,12 +31,12 @@ const std::vector<CreatureProxy::CustomRegType> CreatureProxy::REGISTER_CUSTOM =
{"getIconIndex", LuaMethodWrapper<Creature, decltype(&Entity::getIconIndex), &Entity::getIconIndex>::invoke, false}, {"getIconIndex", LuaMethodWrapper<Creature, decltype(&Entity::getIconIndex), &Entity::getIconIndex>::invoke, false},
{"getIndex", LuaMethodWrapper<Creature, decltype(&Entity::getIndex), &Entity::getIndex>::invoke, false}, {"getIndex", LuaMethodWrapper<Creature, decltype(&Entity::getIndex), &Entity::getIndex>::invoke, false},
{"getJsonKey", LuaMethodWrapper<Creature, decltype(&Entity::getJsonKey), &Entity::getJsonKey>::invoke, false}, {"getJsonKey", LuaMethodWrapper<Creature, decltype(&Entity::getJsonKey), &Entity::getJsonKey>::invoke, false},
{"getName", LuaMethodWrapper<Creature, decltype(&Entity::getName), &Entity::getName>::invoke, false}, {"getName", LuaMethodWrapper<Creature, decltype(&Entity::getNameTranslated), &Entity::getNameTranslated>::invoke, false},
{"accessBonuses", LuaMethodWrapper<Creature, decltype(&EntityWithBonuses<CreatureID>::accessBonuses), &EntityWithBonuses<CreatureID>::accessBonuses>::invoke, false}, {"accessBonuses", LuaMethodWrapper<Creature, decltype(&EntityWithBonuses<CreatureID>::accessBonuses), &EntityWithBonuses<CreatureID>::accessBonuses>::invoke, false},
{"getMaxHealth", LuaMethodWrapper<Creature,decltype(&Creature::getMaxHealth), &Creature::getMaxHealth>::invoke, false}, {"getMaxHealth", LuaMethodWrapper<Creature,decltype(&Creature::getMaxHealth), &Creature::getMaxHealth>::invoke, false},
{"getPluralName", LuaMethodWrapper<Creature, decltype(&Creature::getPluralName), &Creature::getPluralName>::invoke, false}, {"getPluralName", LuaMethodWrapper<Creature, decltype(&Creature::getNamePluralTranslated), &Creature::getNamePluralTranslated>::invoke, false},
{"getSingularName", LuaMethodWrapper<Creature, decltype(&Creature::getSingularName), &Creature::getSingularName>::invoke, false}, {"getSingularName", LuaMethodWrapper<Creature, decltype(&Creature::getNameSingularTranslated), &Creature::getNameSingularTranslated>::invoke, false},
{"getAdvMapAmountMin", LuaMethodWrapper<Creature, decltype(&Creature::getAdvMapAmountMin), &Creature::getAdvMapAmountMin>::invoke, false}, {"getAdvMapAmountMin", LuaMethodWrapper<Creature, decltype(&Creature::getAdvMapAmountMin), &Creature::getAdvMapAmountMin>::invoke, false},
{"getAdvMapAmountMax", LuaMethodWrapper<Creature, decltype(&Creature::getAdvMapAmountMax), &Creature::getAdvMapAmountMax>::invoke, false}, {"getAdvMapAmountMax", LuaMethodWrapper<Creature, decltype(&Creature::getAdvMapAmountMax), &Creature::getAdvMapAmountMax>::invoke, false},

View File

@ -30,7 +30,7 @@ const std::vector<FactionProxy::CustomRegType> FactionProxy::REGISTER_CUSTOM =
{"getIconIndex", LuaMethodWrapper<Faction, decltype(&Entity::getIconIndex), &Entity::getIconIndex>::invoke, false}, {"getIconIndex", LuaMethodWrapper<Faction, decltype(&Entity::getIconIndex), &Entity::getIconIndex>::invoke, false},
{"getIndex", LuaMethodWrapper<Faction, decltype(&Entity::getIndex), &Entity::getIndex>::invoke, false}, {"getIndex", LuaMethodWrapper<Faction, decltype(&Entity::getIndex), &Entity::getIndex>::invoke, false},
{"getJsonKey", LuaMethodWrapper<Faction, decltype(&Entity::getJsonKey), &Entity::getJsonKey>::invoke, false}, {"getJsonKey", LuaMethodWrapper<Faction, decltype(&Entity::getJsonKey), &Entity::getJsonKey>::invoke, false},
{"getName", LuaMethodWrapper<Faction, decltype(&Entity::getName), &Entity::getName>::invoke, false}, {"getName", LuaMethodWrapper<Faction, decltype(&Entity::getNameTranslated), &Entity::getNameTranslated>::invoke, false},
{"hasTown", LuaMethodWrapper<Faction, decltype(&Faction::hasTown), &Faction::hasTown>::invoke, false}, {"hasTown", LuaMethodWrapper<Faction, decltype(&Faction::hasTown), &Faction::hasTown>::invoke, false},
}; };

View File

@ -29,7 +29,7 @@ const std::vector<HeroClassProxy::CustomRegType> HeroClassProxy::REGISTER_CUSTOM
{"getIconIndex", LuaMethodWrapper<HeroClass, decltype(&Entity::getIconIndex), &Entity::getIconIndex>::invoke, false}, {"getIconIndex", LuaMethodWrapper<HeroClass, decltype(&Entity::getIconIndex), &Entity::getIconIndex>::invoke, false},
{"getIndex", LuaMethodWrapper<HeroClass, decltype(&Entity::getIndex), &Entity::getIndex>::invoke, false}, {"getIndex", LuaMethodWrapper<HeroClass, decltype(&Entity::getIndex), &Entity::getIndex>::invoke, false},
{"getJsonKey", LuaMethodWrapper<HeroClass, decltype(&Entity::getJsonKey), &Entity::getJsonKey>::invoke, false}, {"getJsonKey", LuaMethodWrapper<HeroClass, decltype(&Entity::getJsonKey), &Entity::getJsonKey>::invoke, false},
{"getName", LuaMethodWrapper<HeroClass, decltype(&Entity::getName), &Entity::getName>::invoke, false}, {"getName", LuaMethodWrapper<HeroClass, decltype(&Entity::getNameTranslated), &Entity::getNameTranslated>::invoke, false},
}; };
} }

View File

@ -30,7 +30,7 @@ const std::vector<HeroTypeProxy::CustomRegType> HeroTypeProxy::REGISTER_CUSTOM =
{"getIconIndex", LuaMethodWrapper<HeroType, decltype(&Entity::getIconIndex), &Entity::getIconIndex>::invoke, false}, {"getIconIndex", LuaMethodWrapper<HeroType, decltype(&Entity::getIconIndex), &Entity::getIconIndex>::invoke, false},
{"getIndex", LuaMethodWrapper<HeroType, decltype(&Entity::getIndex), &Entity::getIndex>::invoke, false}, {"getIndex", LuaMethodWrapper<HeroType, decltype(&Entity::getIndex), &Entity::getIndex>::invoke, false},
{"getJsonKey", LuaMethodWrapper<HeroType, decltype(&Entity::getJsonKey), &Entity::getJsonKey>::invoke, false}, {"getJsonKey", LuaMethodWrapper<HeroType, decltype(&Entity::getJsonKey), &Entity::getJsonKey>::invoke, false},
{"getName", LuaMethodWrapper<HeroType, decltype(&Entity::getName), &Entity::getName>::invoke, false}, {"getName", LuaMethodWrapper<HeroType, decltype(&Entity::getNameTranslated), &Entity::getNameTranslated>::invoke, false},
}; };

View File

@ -29,7 +29,7 @@ const std::vector<SkillProxy::CustomRegType> SkillProxy::REGISTER_CUSTOM =
{"getIconIndex", LuaMethodWrapper<Skill, decltype(&Entity::getIconIndex), &Entity::getIconIndex>::invoke, false}, {"getIconIndex", LuaMethodWrapper<Skill, decltype(&Entity::getIconIndex), &Entity::getIconIndex>::invoke, false},
{"getIndex", LuaMethodWrapper<Skill, decltype(&Entity::getIndex), &Entity::getIndex>::invoke, false}, {"getIndex", LuaMethodWrapper<Skill, decltype(&Entity::getIndex), &Entity::getIndex>::invoke, false},
{"getJsonKey", LuaMethodWrapper<Skill, decltype(&Entity::getJsonKey), &Entity::getJsonKey>::invoke, false}, {"getJsonKey", LuaMethodWrapper<Skill, decltype(&Entity::getJsonKey), &Entity::getJsonKey>::invoke, false},
{"getName", LuaMethodWrapper<Skill, decltype(&Entity::getName), &Entity::getName>::invoke, false}, {"getName", LuaMethodWrapper<Skill, decltype(&Entity::getNameTranslated), &Entity::getNameTranslated>::invoke, false},
}; };
} }

View File

@ -33,7 +33,7 @@ const std::vector<SpellProxy::CustomRegType> SpellProxy::REGISTER_CUSTOM =
{"getIconIndex", LuaMethodWrapper<Spell, decltype(&Entity::getIconIndex), &Entity::getIconIndex>::invoke, false}, {"getIconIndex", LuaMethodWrapper<Spell, decltype(&Entity::getIconIndex), &Entity::getIconIndex>::invoke, false},
{"getIndex", LuaMethodWrapper<Spell, decltype(&Entity::getIndex), &Entity::getIndex>::invoke, false}, {"getIndex", LuaMethodWrapper<Spell, decltype(&Entity::getIndex), &Entity::getIndex>::invoke, false},
{"getJsonKey", LuaMethodWrapper<Spell, decltype(&Entity::getJsonKey), &Entity::getJsonKey>::invoke, false}, {"getJsonKey", LuaMethodWrapper<Spell, decltype(&Entity::getJsonKey), &Entity::getJsonKey>::invoke, false},
{"getName", LuaMethodWrapper<Spell, decltype(&Entity::getName), &Entity::getName>::invoke, false}, {"getName", LuaMethodWrapper<Spell, decltype(&Entity::getNameTranslated), &Entity::getNameTranslated>::invoke, false},
{"isAdventure", LuaMethodWrapper<Spell, decltype(&Spell::isAdventure), &Spell::isAdventure>::invoke, false}, {"isAdventure", LuaMethodWrapper<Spell, decltype(&Spell::isAdventure), &Spell::isAdventure>::invoke, false},
{"isCombat", LuaMethodWrapper<Spell, decltype(&Spell::isCombat), &Spell::isCombat>::invoke, false}, {"isCombat", LuaMethodWrapper<Spell, decltype(&Spell::isCombat), &Spell::isCombat>::invoke, false},
@ -48,7 +48,7 @@ const std::vector<SpellProxy::CustomRegType> SpellProxy::REGISTER_CUSTOM =
{"getCost", LuaMethodWrapper<Spell, decltype(&Spell::getCost), &Spell::getCost>::invoke, false}, {"getCost", LuaMethodWrapper<Spell, decltype(&Spell::getCost), &Spell::getCost>::invoke, false},
{"getBasePower", LuaMethodWrapper<Spell, decltype(&Spell::getBasePower), &Spell::getBasePower>::invoke, false}, {"getBasePower", LuaMethodWrapper<Spell, decltype(&Spell::getBasePower), &Spell::getBasePower>::invoke, false},
{"getLevelPower", LuaMethodWrapper<Spell, decltype(&Spell::getLevelPower), &Spell::getLevelPower>::invoke, false}, {"getLevelPower", LuaMethodWrapper<Spell, decltype(&Spell::getLevelPower), &Spell::getLevelPower>::invoke, false},
{"getLevelDescription", LuaMethodWrapper<Spell, decltype(&Spell::getLevelDescription), &Spell::getLevelDescription>::invoke, false}, {"getLevelDescription", LuaMethodWrapper<Spell, decltype(&Spell::getDescriptionTranslated), &Spell::getDescriptionTranslated>::invoke, false},
}; };
} }