refactor: 10x
This commit is contained in:
parent
7489ac670b
commit
4292f2cd75
|
@ -10,7 +10,7 @@ const decorate = compose(
|
|||
|
||||
export default (latus) => class Plant extends decorate(Trait) {
|
||||
|
||||
static STIM_P = 1 / (latus.get('%humus.tps', 60) * 60);
|
||||
static STIM_P = 10 / (latus.get('%humus.tps', 60) * 60);
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
|
@ -122,7 +122,7 @@ export default (latus) => class Plant extends decorate(Trait) {
|
|||
const {growthStage} = this.entity;
|
||||
const stageSpec = this.params.stageSpecs[growthStage];
|
||||
if (Math.random() < this.constructor.STIM_P) {
|
||||
this.growthElapsed += 1;
|
||||
this.growthElapsed += 0.1;
|
||||
}
|
||||
if ('growAt' in stageSpec) {
|
||||
if (this.growthElapsed >= stageSpec.growAt) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user