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:
@@ -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
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user