Cleanup
This commit is contained in:
@@ -13,15 +13,17 @@ updateLampoid :: Creature -> World -> World
|
||||
updateLampoid cr w = case cr ^?! crType . lampLSID of
|
||||
Nothing ->
|
||||
let i = IM.newKey (w ^. cWorld . lWorld . lightSources)
|
||||
in w & cWorld . lWorld . lightSources %~ IM.insert i (lsColPosID lcol (addZ h cpos) i)
|
||||
in w & cWorld . lWorld . lightSources . at i ?~ lsColPosID lcol (addZ h cpos) i
|
||||
& cWorld . lWorld . creatures . ix (_crID cr) . crType . lampLSID ?~ i
|
||||
Just i
|
||||
| cr ^?! crHP . _HP < 0 ->
|
||||
w
|
||||
-- & cWorld . lWorld . tempLightSources .:~ tlsTimeRadFunPos 20 150 (TLSFade 1 10) (addZ 20 cpos)
|
||||
& cWorld . lWorld . worldEvents .:~ MakeTempLight
|
||||
(LSParam (addZ 20 cpos) 150 1) 20
|
||||
& soundOriginsIDsAt [MaterialSound Glass n | n <- [0, 1, 2]] (destroyMatS Glass) cpos
|
||||
& cWorld . lWorld . worldEvents
|
||||
.:~ MakeTempLight
|
||||
(LSParam (addZ 20 cpos) 150 1)
|
||||
20
|
||||
& soundOriginsIDsAt [MaterialSound Glass n | n <- [0, 1, 2]]
|
||||
(destroyMatS Glass) cpos
|
||||
& cWorld . lWorld . lightSources . at i .~ Nothing
|
||||
& cWorld . lWorld . creatures . at cid .~ Nothing
|
||||
| otherwise ->
|
||||
|
||||
Reference in New Issue
Block a user