refactor: 10x

This commit is contained in:
cha0s 2021-02-09 10:12:47 -06:00
parent 7489ac670b
commit 4292f2cd75

View File

@ -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) {