feat: add thirst to Needs, drink/forage to GoalType, thirst constants

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
root
2026-03-10 20:26:54 +00:00
parent 30b187b838
commit 5da03ebb69
10 changed files with 564 additions and 1 deletions
+2
View File
@@ -13,6 +13,8 @@ export const SPRITE_ROWS = 4;
export const HUNGER_DECAY_PER_TICK = 0.05;
export const ENERGY_DECAY_PER_TICK = 0.03;
export const HUNGER_THRESHOLD = 30;
export const THIRST_DECAY_PER_TICK = 0.05;
export const THIRST_THRESHOLD = 30;
export const ENERGY_THRESHOLD = 20;
export const NEED_RECOVERY_RATE = 0.5;
+4 -1
View File
@@ -49,6 +49,7 @@ export interface Appearance {
export interface Needs {
hunger: number; // 0-100
thirst: number; // 0-100
energy: number; // 0-100
productivity: number; // 0-100
}
@@ -81,7 +82,7 @@ export interface StatModifiers {
}
export type MovementState = 'idle' | 'walking';
export type GoalType = 'wander' | 'eat' | 'sleep' | 'gather' | 'craft' | 'build' | 'dropoff' | 'pickup';
export type GoalType = 'wander' | 'eat' | 'drink' | 'forage' | 'sleep' | 'gather' | 'craft' | 'build' | 'dropoff' | 'pickup';
export interface Movement {
state: MovementState;
@@ -275,6 +276,8 @@ export interface TunableConstants {
HUNGER_DECAY_PER_TICK: number;
ENERGY_DECAY_PER_TICK: number;
HUNGER_THRESHOLD: number;
THIRST_DECAY_PER_TICK: number;
THIRST_THRESHOLD: number;
ENERGY_THRESHOLD: number;
NEED_RECOVERY_RATE: number;
SLEEP_ENERGY_RECOVERY_PER_TICK: number;