rr
This commit is contained in:
parent
2636d580a8
commit
d14550dad6
78 changed files with 2827 additions and 563 deletions
|
|
@ -24,7 +24,9 @@
|
|||
}
|
||||
this.energy = clamp((this.energy || 0) + dt * 0.03, 0, typeof tarinaiMaxEnergy === "function" ? tarinaiMaxEnergy(this) : (Number(this.maxEnergy) || 100));
|
||||
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.fightDisease || this.stuckPushpinId || this.currentLodgedPin?.()) this.sunbathTimer = 0;
|
||||
const parasolSystem = globalThis.TarinaiParasolSystem || globalThis.TarinaiRainShelterSystem;
|
||||
const sunlightBlocked = parasolSystem?.blocksWeatherAt?.(this.world, this.x, this.y) || false;
|
||||
if (!this.isSunbathTime() || sunlightBlocked || Number(felt) >= 22 || this.hunger > 82 || this.energy < 8 || this.state === "panic" || this.fightDisease || 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