Start moving creature properties out of records

This commit is contained in:
2025-06-06 08:46:27 +01:00
parent bae75a1e60
commit 4ae7c6ebd6
32 changed files with 609 additions and 672 deletions
+4 -4
View File
@@ -14,10 +14,10 @@ updateCreature :: Creature -> World -> World
updateCreature cr = case _crType cr of
Avatar{} -> (cWorld . lWorld . creatures . ix 0 . crType . avatarPulse %~ updatePulse)
. crUpdate yourControl cr
Lampoid{} -> updateLampoid cr
Humanoid{} -> updateHumanoid cr
Barreloid{} -> updateBarreloid cr
NonDrawnCreature -> id
LampCrit{} -> updateLampoid cr
BarrelCrit{} -> updateBarreloid cr
AvatarDead -> id
_ -> updateHumanoid cr
updatePulse :: Pulse -> Pulse
updatePulse PulseStatus {_pulseRate = pr, _pulseProgress = pp}