Allow for placements to use/update the full GenWorld

This commit is contained in:
2025-09-23 10:41:09 +01:00
parent 5ee78ceffc
commit a9ecd7de2e
6 changed files with 65 additions and 64 deletions
+2 -2
View File
@@ -17,7 +17,7 @@ import LensHelp
putTerminalImediateAccess :: Color -> Machine -> Terminal -> Placement
putTerminalImediateAccess = putTerminalFull f
where
f tmpl _ _ = Just $ sps0 $ PutWorldUpdate $ const $ accessTerminal (tmpl ^?! plMID . _Just)
f tmpl _ _ = Just $ sps0 $ PutWorldUpdate $ const $ over gwWorld $ accessTerminal (tmpl ^?! plMID . _Just)
putTerminalFull ::
(Placement -> Placement -> Placement -> Maybe Placement) ->
@@ -39,7 +39,7 @@ putTerminalFull f col mc tm =
defaultSensorWall
Nothing
)
$ \mcpl -> Just $ pt0 (PutWorldUpdate $ const (setids tmpl btpl mcpl)) (\_ -> f tmpl btpl mcpl)
$ \mcpl -> Just $ pt0 (PutWorldUpdate $ const $ over gwWorld $ (setids tmpl btpl mcpl)) (\_ -> f tmpl btpl mcpl)
where
setids tmpl btpl mcpl w =
w