| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- /*
- * api/Artifact.cpp, 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
- *
- */
- #include "StdInc.h"
- #include "Artifact.h"
- #include "Registry.h"
- #include "../LuaStack.h"
- #include "../LuaCallWrapper.h"
- #include "../../../lib/HeroBonus.h"
- namespace scripting
- {
- namespace api
- {
- VCMI_REGISTER_CORE_SCRIPT_API(ArtifactProxy, "Artifact");
- const std::vector<ArtifactProxy::RegType> ArtifactProxy::REGISTER = {};
- const std::vector<ArtifactProxy::CustomRegType> ArtifactProxy::REGISTER_CUSTOM =
- {
- {"getIconIndex", LuaMethodWrapper<Artifact, int32_t(Entity:: *)()const, &Entity::getIconIndex>::invoke, false},
- {"getIndex", LuaMethodWrapper<Artifact, int32_t(Entity:: *)()const, &Entity::getIndex>::invoke, false},
- {"getJsonKey", LuaMethodWrapper<Artifact, const std::string &(Entity:: *)()const, &Entity::getJsonKey>::invoke, false},
- {"getName", LuaMethodWrapper<Artifact, const std::string &(Entity:: *)()const, &Entity::getName>::invoke, false},
- {"getId", LuaMethodWrapper<Artifact, ArtifactID(EntityT<ArtifactID>::*)()const, &EntityT<ArtifactID>::getId>::invoke, false},
- {"accessBonuses", LuaMethodWrapper<Artifact, const IBonusBearer *(EntityWithBonuses<ArtifactID>:: *)()const, &EntityWithBonuses<ArtifactID>::accessBonuses>::invoke, false},
- {"getDescription", LuaMethodWrapper<Artifact, const std::string &(Artifact:: *)()const, &Artifact::getDescription>::invoke, false},
- {"getEventText", LuaMethodWrapper<Artifact, const std::string &(Artifact:: *)()const, &Artifact::getEventText>::invoke, false},
- {"isBig", LuaMethodWrapper<Artifact, bool(Artifact:: *)()const, &Artifact::isBig>::invoke, false},
- {"isTradable", LuaMethodWrapper<Artifact, bool(Artifact:: *)()const, &Artifact::isTradable>::invoke, false},
- {"getPrice", LuaMethodWrapper<Artifact, uint32_t(Artifact:: *)()const, &Artifact::getPrice>::invoke, false},
- };
- }
- }
|