diff options
| author | Léo Lam <leo@leolam.fr> | 2024-12-30 21:16:37 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-12-30 21:16:37 +0000 |
| commit | d5128f8fb43c20a8de388d5a7a4bbb6a549bf1b4 (patch) | |
| tree | ff2cb150a20a75662ba6aefc85b6db3385d31bb5 | |
| parent | aa3914ce9bba2b47a78833723ad0cd358553fb07 (diff) | |
| parent | 64122c55bf8ee72948bcc808773da82eb9b186d4 (diff) | |
Merge pull request #132 from Pistonight/update_cookdata_comment
Rename CookData::getStaminaRecoverValue -> getEffectDurationFrames
| -rw-r--r-- | src/Game/UI/uiPauseMenuDataMgr.cpp | 4 | ||||
| -rw-r--r-- | src/Game/UI/uiPauseMenuDataMgr.h | 11 |
2 files changed, 11 insertions, 4 deletions
diff --git a/src/Game/UI/uiPauseMenuDataMgr.cpp b/src/Game/UI/uiPauseMenuDataMgr.cpp index 0d073ed4..87cc7f0e 100644 --- a/src/Game/UI/uiPauseMenuDataMgr.cpp +++ b/src/Game/UI/uiPauseMenuDataMgr.cpp @@ -2125,8 +2125,8 @@ int compareFood(const PouchItem* lhs, const PouchItem* rhs, ksys::act::InfoData* if (st1 < st2) return 1; - const auto sv1 = lhs->getCookData().getStaminaRecoverValue(); - const auto sv2 = rhs->getCookData().getStaminaRecoverValue(); + const auto sv1 = lhs->getCookData().getEffectDurationFrames(); + const auto sv2 = rhs->getCookData().getEffectDurationFrames(); // Higher is better if (sv1 > sv2) return -1; diff --git a/src/Game/UI/uiPauseMenuDataMgr.h b/src/Game/UI/uiPauseMenuDataMgr.h index ffd5a187..422dadf3 100644 --- a/src/Game/UI/uiPauseMenuDataMgr.h +++ b/src/Game/UI/uiPauseMenuDataMgr.h @@ -151,7 +151,7 @@ struct CookTagInfo { class PouchItem { public: struct CookData { - f32 getStaminaRecoverValue() const { return f32(mEffectDuration) * 30.0f; } + f32 getEffectDurationFrames() const { return f32(mEffectDuration) * 30.0f; } void setHealthRecover(int hp) { mHealthRecover = hp; } void setEffectDuration(int seconds) { mEffectDuration = seconds; } void setSellPrice(int price) { mSellPrice = price; } @@ -160,12 +160,19 @@ public: f32 getEffectId() const { return mEffect.x; } f32 getEffectLevel() const { return mEffect.y; } + /// Number of quarter-hearts to recover, + /// for hearty food, this is number of yellow hearts (not quarter-hearts) int mHealthRecover; int mEffectDuration; // for potions, in seconds int mSellPrice; /// x - CookEffectId enum, but stored as f32 - /// y - level (1.0f, 2.0f, or 3.0f) + /// y - level: + /// - For Hearty (LifeMaxUp), this is also the number of yellow hearts + /// - For Stamina (GutsRecover), this is 0.0-3000.0 where each wheel is 1000.0 + /// - For Endura (ExGutsMaxUp), this is 0-15, where each wheel is 5 + /// - With 5 endura carrot + crit you can only get to 12 + /// - For other, this is the level of the effect (1.0f, 2.0f, or 3.0f) sead::Vector2f mEffect; }; |
