Separate out concrete part of world

This commit is contained in:
2022-07-25 12:10:50 +01:00
parent 3354d108be
commit b2efbd2b3e
134 changed files with 933 additions and 930 deletions
+2 -2
View File
@@ -7,11 +7,11 @@ import Control.Lens
doModificationEffect :: MdWdWd -> Modification -> World -> World
doModificationEffect mww = case mww of
MdWdId -> const id
MdTrigIf ftrue ffalse -> \md w -> if w ^?! triggers . ix (_mdExternalID2 md)
MdTrigIf ftrue ffalse -> \md w -> if w ^?! cWorld . triggers . ix (_mdExternalID2 md)
then w & doModificationEffect ftrue md
else w & doModificationEffect ffalse md
-- note this uses the second external ix
MdSetLSCol col -> \md w -> w & lightSources . ix (_mdExternalID1 md) . lsParam . lsCol .~ col
MdSetLSCol col -> \md w -> w & cWorld . lightSources . ix (_mdExternalID1 md) . lsParam . lsCol .~ col
-- note this uses the first external ix, this should be made more
-- transparent
MdFlickerUpdate -> flickerUpdate