Fixed stats not updating properly
This commit is contained in:
parent
f93ee21269
commit
e4640a94f8
@ -174,8 +174,8 @@ impl LilFren {
|
|||||||
thirst: 1.0,
|
thirst: 1.0,
|
||||||
entertainment: 1.0,
|
entertainment: 1.0,
|
||||||
state: LilFrenState::Standing,
|
state: LilFrenState::Standing,
|
||||||
smarts: thread_rng().gen_range(0.1..1.0),
|
smarts: thread_rng().gen_range(0.0..0.5),
|
||||||
metabolism: thread_rng().gen_range(0.1..1.0),
|
metabolism: thread_rng().gen_range(0.0..0.5),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -205,9 +205,9 @@ impl LilFren {
|
|||||||
LilFrenState::Sleep => (-0.005, -0.01, 0.00),
|
LilFrenState::Sleep => (-0.005, -0.01, 0.00),
|
||||||
};
|
};
|
||||||
|
|
||||||
lil_fren.hunger -= hunger_diff * self.metabolism;
|
lil_fren.hunger += hunger_diff * self.metabolism;
|
||||||
lil_fren.thirst -= thirst_diff * self.metabolism;
|
lil_fren.thirst += thirst_diff * self.metabolism;
|
||||||
lil_fren.entertainment -= entertainment_diff * self.smarts;
|
lil_fren.entertainment += entertainment_diff * self.smarts;
|
||||||
|
|
||||||
if thread_rng().gen_bool(0.75) {
|
if thread_rng().gen_bool(0.75) {
|
||||||
println!("fren is now {:?}", self.state);
|
println!("fren is now {:?}", self.state);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user