Allow for lights to be stored in a one-frame list

This commit is contained in:
2024-11-26 12:50:39 +00:00
parent 851fdc2410
commit e93a804559
8 changed files with 127 additions and 114 deletions
+3
View File
@@ -45,6 +45,9 @@ doWdWd we = case we of
WdWdFromItCrixWdWd it crid f -> \w -> fromMaybe w $ do
cr <- w ^? cWorld . lWorld . creatures . ix crid
return $ doItCrWdWd f it cr w
MakeTempLight _ 0 -> id
MakeTempLight x t -> (cWorld . lWorld . lights .:~ x)
. (cWorld . lWorld . worldEvents .:~ MakeTempLight x (t-1))
doItCrWdWd :: ItCrWdWd -> LabelDoubleTree ComposeLinkType Item -> Creature -> World -> World
doItCrWdWd icww = case icww of