Skip to content

refactor: replace decayRate with decayDuration in pet needs config - #14

Merged
mozyonee merged 1 commit into
mainfrom
refactor/pet-decay-config
Mar 9, 2026
Merged

refactor: replace decayRate with decayDuration in pet needs config#14
mozyonee merged 1 commit into
mainfrom
refactor/pet-decay-config

Conversation

@mozyonee

@mozyonee mozyonee commented Mar 9, 2026

Copy link
Copy Markdown
Owner

Summary

  • Replaces decayRate (units per minute) with decayDuration (ms to fully drain from 100→0) in PetNeedConfig, making it much easier to reason about decay timing at a glance
  • Removes unused label field from PetNeedConfig
  • Updates calculateDecayedNeeds to derive the decrease per interval from duration: (intervals * PET_UPDATE_INTERVAL * 100) / decayDuration

Decay durations

Need Duration
Thirst 2h
Toilet 3h
Hunger 4h
Energy 5h
Hygiene 6h

Test plan

  • Verify pet needs decay at the expected rate matching the configured durations

Makes it easier to reason about decay timing by specifying how long
each need takes to fully drain from 100 to 0 in ms instead of a rate.
Also removes unused label field from PetNeedConfig.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@railway-app
railway-app Bot temporarily deployed to widgetable / widgetable-pr-14 March 9, 2026 00:19 Destroyed
@railway-app

railway-app Bot commented Mar 9, 2026

Copy link
Copy Markdown

🚅 Deployed to the widgetable-pr-14 environment in widgetable

Service Status Web Updated (UTC)
Client 🕒 Building (View Logs) Web Mar 9, 2026 at 12:20 am
Server 🕒 Building (View Logs) Web Mar 9, 2026 at 12:20 am

@mozyonee
mozyonee merged commit 57a25c2 into main Mar 9, 2026
1 of 3 checks passed
@mozyonee
mozyonee deleted the refactor/pet-decay-config branch March 9, 2026 00:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant