feat: creatures leave a decaying corpse on death #29
No reviewers
Labels
No labels
alpha:wave-0
alpha:wave-1
alpha:wave-2
alpha:wave-3
area:assets
area:combat
area:ecology
area:infra
area:render
area:scripting
area:ui
area:world
enhancement
epic
migration
post-alpha
roadmap
tech-debt
type:bug
type:chore
type:design
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
marco/IsoMmo!29
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/corpses"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Stacked on #28 (base branch
feat/combat-loop) — merge #28 first, then this retargets tomain.Summary
When a creature dies it now leaves a corpse where it fell, instead of vanishing — even just for the ~30s decay, UO-style.
CorpseRegistry, owned by World under its single lock), not a repurposed item — this is deliberately the future home of lootable corpse-containers. Decorative for now.CorpseDecayTicks, config) then decays.InterestDiff: enter →CorpseSpawned, leave/decay →CorpseRemoved. So a corpse appears as you walk up and disappears when it decays or leaves your view.Scope note
Decorative only (your call): no loot, not openable. Making the corpse a lootable container is a clear follow-up once we have a loot system — the dedicated entity is exactly so that lands cleanly.
How it was tested
WorldTests: killing a creature leaves a corpse of the right kind at the death tile, and it decays after its delay. Protocol round-trips forCorpseSpawned/CorpseRemoved. 187 tests green, zero warnings, CSharpier clean.Needs your eyes (GUI)
Kill a rat → a dark corpse marker should stay ~30s then vanish; walk away and back → it re-appears (AoI). Tell me if ~30s feels right (one-line tunable).
Checklist
just lintclean · [x]just testgreen (187) · [x] whole solution builds, 0 warnings · [x] multi-platform preserved · [x] tests addedUpdate: added the real dead-rat art. Extracted the creature death animation (low-group action 8) into the pack as
creature/<kind>/death_<dir>; a corpse now renders the final frame of that death animation (South facing) held static — an actual dead rat, not the placeholder. Falls back to the placeholder when the pack is absent.assets.isoarepacked (37 animations / 157 frames).f38a509898745688bbab745688bbab669c2bd5d9