Веб-сайт самохостера Lotigara

summaryrefslogtreecommitdiff
path: root/source/client
diff options
context:
space:
mode:
authorKae <80987908+Novaenia@users.noreply.github.com>2024-08-03 18:54:49 +1000
committerKae <80987908+Novaenia@users.noreply.github.com>2024-08-03 18:54:49 +1000
commit6321a7d75dd004bf7c1395cf137486f61b9ceeb4 (patch)
tree810e4d51d7345413663d74235c8234ebdb54848d /source/client
parent20de634a06c0053aad4b1a0017cae4ed023b6e94 (diff)
Update StarClientApplication.cpp
Diffstat (limited to 'source/client')
-rw-r--r--source/client/StarClientApplication.cpp16
1 files changed, 13 insertions, 3 deletions
diff --git a/source/client/StarClientApplication.cpp b/source/client/StarClientApplication.cpp
index 7faf7ec..c84f489 100644
--- a/source/client/StarClientApplication.cpp
+++ b/source/client/StarClientApplication.cpp
@@ -852,11 +852,21 @@ void ClientApplication::updateRunning(float dt) {
if (tag == "playerName")
return Text::stripEscapeCodes(m_player->name());
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")
- 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")
- 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 (m_universeClient->clientContext()->playerWorldId().is<ClientShipWorldId>())
return "Player Ship";