aa
This commit is contained in:
parent
f941200504
commit
ad2cc76429
34 changed files with 616 additions and 365 deletions
|
|
@ -23,7 +23,8 @@
|
|||
this.sunbathFrameTimer = 0.5;
|
||||
}
|
||||
this.energy = clamp((this.energy || 0) + dt * 0.03, 0, typeof tarinaiMaxEnergy === "function" ? tarinaiMaxEnergy(this) : (Number(this.maxEnergy) || 100));
|
||||
if (!this.isSunbathTime() || this.hunger > 82 || this.energy < 8 || this.state === "panic" || this.stuckPushpinId || this.currentLodgedPin?.()) this.sunbathTimer = 0;
|
||||
const felt = this.world?.feltTemperatureFor?.(this) ?? this.world?.temperatureAt?.(this.x, this.y, this) ?? this.feltTemperature ?? this.tempComfort ?? (CONFIG.standardTemperature ?? 15);
|
||||
if (!this.isSunbathTime() || Number(felt) >= 22 || this.hunger > 82 || this.energy < 8 || this.state === "panic" || this.stuckPushpinId || this.currentLodgedPin?.()) this.sunbathTimer = 0;
|
||||
if ((this.sunbathTimer || 0) <= 0 && this.state === "sunbath") {
|
||||
this.finishSunbath?.();
|
||||
this._activeSunbathSpriteId = "";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue