mirror of https://github.com/AxioDL/metaforce.git
CPlayerState: Make GetPickupTotal() a const member function
This doesn't modify internal member state.
This commit is contained in:
parent
9ce7c72a1c
commit
e73e704d20
|
@ -119,7 +119,7 @@ public:
|
||||||
|
|
||||||
CHealthInfo& GetHealthInfo();
|
CHealthInfo& GetHealthInfo();
|
||||||
const CHealthInfo& GetHealthInfo() const;
|
const CHealthInfo& GetHealthInfo() const;
|
||||||
u32 GetPickupTotal() { return 99; }
|
u32 GetPickupTotal() const { return 99; }
|
||||||
void SetIsFusionEnabled(bool val) { x0_26_fusion = val; }
|
void SetIsFusionEnabled(bool val) { x0_26_fusion = val; }
|
||||||
bool IsFusionEnabled() const { return x0_26_fusion; }
|
bool IsFusionEnabled() const { return x0_26_fusion; }
|
||||||
EPlayerSuit GetCurrentSuit() const;
|
EPlayerSuit GetCurrentSuit() const;
|
||||||
|
|
|
@ -692,8 +692,8 @@ void CMain::UpdateDiscordPresence(CAssetId worldSTRG) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (g_GameState != nullptr) {
|
if (g_GameState != nullptr) {
|
||||||
if (CPlayerState* pState = g_GameState->GetPlayerState().get()) {
|
if (const CPlayerState* pState = g_GameState->GetPlayerState().get()) {
|
||||||
u32 itemPercent = pState->CalculateItemCollectionRate() * 100 / pState->GetPickupTotal();
|
const u32 itemPercent = pState->CalculateItemCollectionRate() * 100 / pState->GetPickupTotal();
|
||||||
if (DiscordItemPercent != itemPercent) {
|
if (DiscordItemPercent != itemPercent) {
|
||||||
DiscordItemPercent = itemPercent;
|
DiscordItemPercent = itemPercent;
|
||||||
DiscordState = fmt::format(FMT_STRING("{}%"), itemPercent);
|
DiscordState = fmt::format(FMT_STRING("{}%"), itemPercent);
|
||||||
|
|
Loading…
Reference in New Issue