mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-15 00:05:02 +02:00
vcmi: massive refactoring v1
This commit is contained in:
@ -34,7 +34,7 @@ const std::vector<ArtifactProxy::CustomRegType> ArtifactProxy::REGISTER_CUSTOM =
|
||||
{"getName", LuaMethodWrapper<Artifact, decltype(&Entity::getNameTranslated), &Entity::getNameTranslated>::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},
|
||||
{"getBonusBearer", LuaMethodWrapper<Artifact, decltype(&EntityWithBonuses<ArtifactID>::getBonusBearer), &EntityWithBonuses<ArtifactID>::getBonusBearer>::invoke, false},
|
||||
|
||||
{"getDescription", LuaMethodWrapper<Artifact, decltype(&Artifact::getDescriptionTranslated), &Artifact::getDescriptionTranslated>::invoke, false},
|
||||
{"getEventText", LuaMethodWrapper<Artifact, decltype(&Artifact::getEventTranslated), &Artifact::getEventTranslated>::invoke, false},
|
||||
|
@ -32,7 +32,7 @@ const std::vector<CreatureProxy::CustomRegType> CreatureProxy::REGISTER_CUSTOM =
|
||||
{"getIndex", LuaMethodWrapper<Creature, decltype(&Entity::getIndex), &Entity::getIndex>::invoke, false},
|
||||
{"getJsonKey", LuaMethodWrapper<Creature, decltype(&Entity::getJsonKey), &Entity::getJsonKey>::invoke, false},
|
||||
{"getName", LuaMethodWrapper<Creature, decltype(&Entity::getNameTranslated), &Entity::getNameTranslated>::invoke, false},
|
||||
{"accessBonuses", LuaMethodWrapper<Creature, decltype(&EntityWithBonuses<CreatureID>::accessBonuses), &EntityWithBonuses<CreatureID>::accessBonuses>::invoke, false},
|
||||
{"getBonusBearer", LuaMethodWrapper<Creature, decltype(&EntityWithBonuses<CreatureID>::getBonusBearer), &EntityWithBonuses<CreatureID>::getBonusBearer>::invoke, false},
|
||||
|
||||
{"getMaxHealth", LuaMethodWrapper<Creature,decltype(&Creature::getMaxHealth), &Creature::getMaxHealth>::invoke, false},
|
||||
{"getPluralName", LuaMethodWrapper<Creature, decltype(&Creature::getNamePluralTranslated), &Creature::getNamePluralTranslated>::invoke, false},
|
||||
@ -56,7 +56,7 @@ const std::vector<CreatureProxy::CustomRegType> CreatureProxy::REGISTER_CUSTOM =
|
||||
{"getBaseSpeed", LuaMethodWrapper<Creature, decltype(&Creature::getBaseSpeed), &Creature::getBaseSpeed>::invoke, false},
|
||||
{"getBaseShots", LuaMethodWrapper<Creature, decltype(&Creature::getBaseShots), &Creature::getBaseShots>::invoke, false},
|
||||
|
||||
{"getCost", LuaMethodWrapper<Creature, decltype(&Creature::getCost), &Creature::getCost>::invoke, false},
|
||||
{"getRecruitCost", LuaMethodWrapper<Creature, decltype(&Creature::getRecruitCost), &Creature::getRecruitCost>::invoke, false},
|
||||
{"isDoubleWide", LuaMethodWrapper<Creature, decltype(&Creature::isDoubleWide), &Creature::isDoubleWide>::invoke, false},
|
||||
};
|
||||
|
||||
|
@ -10,10 +10,10 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <vcmi/Creature.h>
|
||||
|
||||
#include "../LuaWrapper.h"
|
||||
|
||||
#include <vcmi/Creature.h>
|
||||
|
||||
VCMI_LIB_NAMESPACE_BEGIN
|
||||
|
||||
namespace scripting
|
||||
|
@ -29,7 +29,7 @@ const std::vector<PlayerProxy::CustomRegType> PlayerProxy::REGISTER_CUSTOM =
|
||||
// virtual PlayerColor getColor() const = 0;
|
||||
// virtual TeamID getTeam() const = 0;
|
||||
// virtual bool isHuman() const = 0;
|
||||
// virtual const IBonusBearer * accessBonuses() const = 0;
|
||||
// virtual const IBonusBearer * getBonusBearer() const = 0;
|
||||
// virtual int getResourceAmount(int type) const = 0;
|
||||
|
||||
};
|
||||
|
@ -102,7 +102,7 @@ int SetResourcesProxy::getAmount(lua_State * L)
|
||||
if(!S.tryGet(1, object))
|
||||
return S.retVoid();
|
||||
|
||||
Res::ERes type = Res::ERes::INVALID;
|
||||
auto type = EGameResID::INVALID;
|
||||
|
||||
if(!S.tryGet(2, type))
|
||||
return S.retVoid();
|
||||
@ -122,7 +122,7 @@ int SetResourcesProxy::setAmount(lua_State * L)
|
||||
if(!S.tryGet(1, object))
|
||||
return S.retVoid();
|
||||
|
||||
Res::ERes type = Res::ERes::INVALID;
|
||||
auto type = EGameResID::INVALID;
|
||||
|
||||
if(!S.tryGet(2, type))
|
||||
return S.retVoid();
|
||||
|
Reference in New Issue
Block a user