This commit is contained in:
2025-10-08 09:20:19 +01:00
parent 77fcf8353a
commit 4e651fcded
9 changed files with 57 additions and 75 deletions
+7 -5
View File
@@ -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 ->