Start moving creature properties out of records
This commit is contained in:
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user