Remove _plGenUpdate field, instead allow Placements to take World arg
This commit is contained in:
@@ -35,7 +35,9 @@ putTerminal' col mcf = ps0PushPS (PutButton termButton)
|
||||
$ const Nothing
|
||||
|
||||
putTerminal :: (GenParams -> World -> TerminalParams) -> Placement
|
||||
putTerminal f = plGenUpdate ?~ g $ ps0PushPS (PutButton termButton)
|
||||
putTerminal f = ps0PushPSw PutNothing $ \w _ -> Just $
|
||||
--plGenUpdate ?~ g $ ps0PushPS (PutButton $ termButton & btTerminalParams .~ f (_genParams w))
|
||||
ps0PushPS (PutButton $ termButton & btTerminalParams .~ f (_genParams w))
|
||||
$ \pl -> Just $ pt0 (PutMachine terminalColor (reverse $ square 10) defaultMachine
|
||||
{ _mcDraw = noPic . terminalShape terminalColor
|
||||
, _mcHP = 100
|
||||
@@ -44,11 +46,6 @@ putTerminal f = plGenUpdate ?~ g $ ps0PushPS (PutButton termButton)
|
||||
. makeExplosionAt (_mcPos mc)
|
||||
})
|
||||
$ const Nothing
|
||||
where
|
||||
g gp pl = (gp,
|
||||
pl & plType . putButton . btTerminalParams .~ f gp
|
||||
& plGenUpdate .~ Nothing
|
||||
)
|
||||
termButton :: Button
|
||||
termButton = Button
|
||||
{ _btPict = const mempty
|
||||
|
||||
Reference in New Issue
Block a user