Update StarClientApplication.cpp

This commit is contained in:
Kae 2024-08-03 18:54:49 +10:00
parent 20de634a06
commit 6321a7d75d

View File

@ -852,11 +852,21 @@ void ClientApplication::updateRunning(float dt) {
if (tag == "playerName") if (tag == "playerName")
return Text::stripEscapeCodes(m_player->name()); return Text::stripEscapeCodes(m_player->name());
if (tag == "playerHealth") if (tag == "playerHealth")
return strf("{}/{} HP", m_player->health(), m_player->maxHealth()); return toString(m_player->health());
if (tag == "playerMaxHealth")
return toString(m_player->maxHealth());
if (tag == "playerEnergy") if (tag == "playerEnergy")
return strf("{}/{} HP", m_player->energy(), m_player->maxEnergy()); return toString(m_player->energy());
if (tag == "playerMaxEnergy")
return toString(m_player->maxEnergy());
if (tag == "playerBreath") if (tag == "playerBreath")
return strf("{}/{} HP", m_player->breath(), m_player->maxBreath()); return toString(m_player->breath());
if (tag == "playerMaxBreath")
return toString(m_player->maxBreath());
if (tag == "playerXPos")
return toString(round(m_player->position().x()));
if (tag == "playerYPos")
return toString(round(m_player->position().y()));
if (tag == "worldName") { if (tag == "worldName") {
if (m_universeClient->clientContext()->playerWorldId().is<ClientShipWorldId>()) if (m_universeClient->clientContext()->playerWorldId().is<ClientShipWorldId>())
return "Player Ship"; return "Player Ship";