Lua API: Fix side.side_name = side.side_name changing the side name

Addresses #4994
This commit is contained in:
Celtic Minstrel 2021-07-04 16:15:40 -04:00 committed by Celtic Minstrel
parent 4426f9740f
commit 839bcb513c

View file

@ -318,7 +318,7 @@ public:
const std::string& side_name() const { return info_.side_name.empty() ? info_.current_player : info_.side_name.str(); }
t_string side_name_tstr() const { return info_.side_name.empty() ? t_string(info_.current_player) : info_.side_name; }
void set_side_name(const t_string& new_name) {info_.side_name = new_name;}
void set_side_name(const t_string& new_name) {info_.side_name = new_name == info_.current_player ? "" : new_name;}
const std::string& faction() const { return info_.faction; }
const t_string& faction_name() const { return info_.faction_name; }
//Returns true if the hex is shrouded/fogged for this side, or