Update StarPlayerLuaBindings.cpp
This commit is contained in:
parent
1e213aac5f
commit
9d67cda97f
@ -97,7 +97,8 @@ LuaCallbacks LuaBindings::makePlayerCallbacks(Player* player) {
|
|||||||
callbacks.registerCallback("personality", [player]() { return jsonFromPersonality(player->identity().personality); });
|
callbacks.registerCallback("personality", [player]() { return jsonFromPersonality(player->identity().personality); });
|
||||||
callbacks.registerCallback("setPersonality", [player](Json const& personalityConfig) {
|
callbacks.registerCallback("setPersonality", [player](Json const& personalityConfig) {
|
||||||
Personality const& oldPersonality = player->identity().personality;
|
Personality const& oldPersonality = player->identity().personality;
|
||||||
player->setPersonality(parsePersonality(Personality(oldPersonality), personalityConfig));
|
Personality newPersonality = oldPersonality;
|
||||||
|
player->setPersonality(parsePersonality(newPersonality, personalityConfig));
|
||||||
});
|
});
|
||||||
|
|
||||||
void setPersonality(Personality const& personality);
|
void setPersonality(Personality const& personality);
|
||||||
|
Loading…
Reference in New Issue
Block a user