mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-27 22:49:25 +02:00
vcmi: PlayerState is now an Entity
This will reduce code duplication a little bit.
This commit is contained in:
@@ -45,11 +45,37 @@ std::string PlayerState::nodeName() const
|
||||
return "Player " + color.getStrCap(false);
|
||||
}
|
||||
|
||||
PlayerColor PlayerState::getColor() const
|
||||
PlayerColor PlayerState::getId() const
|
||||
{
|
||||
return color;
|
||||
}
|
||||
|
||||
int32_t PlayerState::getIndex() const
|
||||
{
|
||||
return color.getNum();
|
||||
}
|
||||
|
||||
int32_t PlayerState::getIconIndex() const
|
||||
{
|
||||
return color.getNum();
|
||||
}
|
||||
std::string PlayerState::getJsonKey() const
|
||||
{
|
||||
return color.getStr(false);
|
||||
}
|
||||
std::string PlayerState::getNameTranslated() const
|
||||
{
|
||||
return color.getStr(true);
|
||||
}
|
||||
std::string PlayerState::getNameTextID() const
|
||||
{
|
||||
return color.getStr(false);
|
||||
}
|
||||
void PlayerState::registerIcons(const IconRegistar & cb) const
|
||||
{
|
||||
//We cannot register new icons for players
|
||||
}
|
||||
|
||||
TeamID PlayerState::getTeam() const
|
||||
{
|
||||
return team;
|
||||
|
||||
Reference in New Issue
Block a user