1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-15 00:05:02 +02:00

Less ugly API declarations

This commit is contained in:
AlexVinS
2021-02-16 17:07:30 +03:00
parent ec6f7b88fe
commit 6d245a7821
59 changed files with 693 additions and 827 deletions

View File

@ -30,8 +30,6 @@ VCMI_REGISTER_SCRIPT_API(GameResumedProxy, "events.GameResumed");
VCMI_REGISTER_SCRIPT_API(PlayerGotTurnProxy, "events.PlayerGotTurn");
VCMI_REGISTER_SCRIPT_API(TurnStartedProxy, "events.TurnStarted");
const std::vector<GameResumedProxy::RegType> GameResumedProxy::REGISTER = {};
const std::vector<GameResumedProxy::CustomRegType> GameResumedProxy::REGISTER_CUSTOM =
{
{
@ -46,18 +44,6 @@ const std::vector<GameResumedProxy::CustomRegType> GameResumedProxy::REGISTER_CU
}
};
const std::vector<PlayerGotTurnProxy::RegType> PlayerGotTurnProxy::REGISTER =
{
{
"getPlayer",
LuaCallWrapper<PlayerGotTurn>::createFunctor(&PlayerGotTurn::getPlayerIndex)
},
{
"setPlayer",
LuaCallWrapper<PlayerGotTurn>::createFunctor(&PlayerGotTurn::setPlayerIndex)
},
};
const std::vector<PlayerGotTurnProxy::CustomRegType> PlayerGotTurnProxy::REGISTER_CUSTOM =
{
{
@ -69,11 +55,19 @@ const std::vector<PlayerGotTurnProxy::CustomRegType> PlayerGotTurnProxy::REGISTE
"subscribeAfter",
&SubscriptionRegistryProxy<PlayerGotTurnProxy>::subscribeAfter,
true
}
},
{
"getPlayer",
LuaMethodWrapper<PlayerGotTurn, decltype(&PlayerGotTurn::getPlayerIndex), &PlayerGotTurn::getPlayerIndex>::invoke,
false
},
{
"setPlayer",
LuaMethodWrapper<PlayerGotTurn, decltype(&PlayerGotTurn::setPlayerIndex), &PlayerGotTurn::setPlayerIndex>::invoke,
false
},
};
const std::vector<TurnStartedProxy::RegType> TurnStartedProxy::REGISTER = {};
const std::vector<TurnStartedProxy::CustomRegType> TurnStartedProxy::REGISTER_CUSTOM =
{
{