add player.favoriteColor and setFavoriteColor
This commit is contained in:
parent
a75703085e
commit
420f1d9731
@ -117,6 +117,9 @@ LuaCallbacks LuaBindings::makePlayerCallbacks(Player* player) {
|
|||||||
player->setPersonality(parsePersonality(newPersonality, personalityConfig));
|
player->setPersonality(parsePersonality(newPersonality, personalityConfig));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
callbacks.registerCallback( "favoriteColor", [player]() { return player->favoriteColor(); });
|
||||||
|
callbacks.registerCallback("setFavoriteColor", [player](Color color) { player->setFavoriteColor(color); });
|
||||||
|
|
||||||
callbacks.registerCallback( "mode", [player]() { return PlayerModeNames.getRight(player->modeType()); });
|
callbacks.registerCallback( "mode", [player]() { return PlayerModeNames.getRight(player->modeType()); });
|
||||||
callbacks.registerCallback("setMode", [player](String const& modeName) { player->setModeType(PlayerModeNames.getLeft(modeName)); });
|
callbacks.registerCallback("setMode", [player](String const& modeName) { player->setModeType(PlayerModeNames.getLeft(modeName)); });
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user