mirror of
https://github.com/vcmi/vcmi.git
synced 2026-05-22 09:55:17 +02:00
d556dd1590
- Added logging support for Lua - Added exporting of enums to Lua - Added few more missing pieces to support summon spell effect
47 lines
1.0 KiB
C++
47 lines
1.0 KiB
C++
/*
|
|
* BattleHexProxy.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 "BattleHexProxy.h"
|
|
|
|
#include "../../../lib/GameLibrary.h"
|
|
#include "../../LuaStack.h"
|
|
#include "../../LuaCallWrapper.h"
|
|
#include "../Registry.h"
|
|
|
|
VCMI_LIB_NAMESPACE_BEGIN
|
|
|
|
namespace scripting::api::battle
|
|
{
|
|
|
|
VCMI_REGISTER_CORE_SCRIPT_API(BattleHexProxy, "battle.BattleHex")
|
|
|
|
const std::vector<BattleHexProxy::CustomRegType> BattleHexProxy::REGISTER_CUSTOM =
|
|
{
|
|
// {"isValid", LuaMethodWrapper<BattleHex, decltype(&BattleHex::isValid), &BattleHex::isValid>::invoke, false},
|
|
{"isValid", LuaFunctionWrapper<BattleHexProxy::isValid>::invoke, false},
|
|
{"toInteger", LuaFunctionWrapper<BattleHexProxy::toInteger>::invoke, false},
|
|
};
|
|
|
|
bool BattleHexProxy::isValid(BattleHex & hex)
|
|
{
|
|
return hex.isValid();
|
|
}
|
|
|
|
int BattleHexProxy::toInteger(BattleHex & hex)
|
|
{
|
|
return hex.toInt();
|
|
}
|
|
|
|
}
|
|
|
|
VCMI_LIB_NAMESPACE_END
|