Skip to content

Commit 64122c5

Browse files
committed
Rename PouchItem::CookData::getStaminaRecoverValue -> getEffectDurationFrames
1 parent aa3914c commit 64122c5

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

src/Game/UI/uiPauseMenuDataMgr.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2125,8 +2125,8 @@ int compareFood(const PouchItem* lhs, const PouchItem* rhs, ksys::act::InfoData*
21252125
if (st1 < st2)
21262126
return 1;
21272127

2128-
const auto sv1 = lhs->getCookData().getStaminaRecoverValue();
2129-
const auto sv2 = rhs->getCookData().getStaminaRecoverValue();
2128+
const auto sv1 = lhs->getCookData().getEffectDurationFrames();
2129+
const auto sv2 = rhs->getCookData().getEffectDurationFrames();
21302130
// Higher is better
21312131
if (sv1 > sv2)
21322132
return -1;

src/Game/UI/uiPauseMenuDataMgr.h

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ struct CookTagInfo {
151151
class PouchItem {
152152
public:
153153
struct CookData {
154-
f32 getStaminaRecoverValue() const { return f32(mEffectDuration) * 30.0f; }
154+
f32 getEffectDurationFrames() const { return f32(mEffectDuration) * 30.0f; }
155155
void setHealthRecover(int hp) { mHealthRecover = hp; }
156156
void setEffectDuration(int seconds) { mEffectDuration = seconds; }
157157
void setSellPrice(int price) { mSellPrice = price; }
@@ -160,12 +160,19 @@ class PouchItem {
160160
f32 getEffectId() const { return mEffect.x; }
161161
f32 getEffectLevel() const { return mEffect.y; }
162162

163+
/// Number of quarter-hearts to recover,
164+
/// for hearty food, this is number of yellow hearts (not quarter-hearts)
163165
int mHealthRecover;
164166
int mEffectDuration; // for potions, in seconds
165167
int mSellPrice;
166168

167169
/// x - CookEffectId enum, but stored as f32
168-
/// y - level (1.0f, 2.0f, or 3.0f)
170+
/// y - level:
171+
/// - For Hearty (LifeMaxUp), this is also the number of yellow hearts
172+
/// - For Stamina (GutsRecover), this is 0.0-3000.0 where each wheel is 1000.0
173+
/// - For Endura (ExGutsMaxUp), this is 0-15, where each wheel is 5
174+
/// - With 5 endura carrot + crit you can only get to 12
175+
/// - For other, this is the level of the effect (1.0f, 2.0f, or 3.0f)
169176
sead::Vector2f mEffect;
170177
};
171178

0 commit comments

Comments
 (0)