Fix switch detection, cleanup
This commit is contained in:
@@ -129,10 +129,10 @@ updateCloseObjects w =
|
||||
$ w ^. cWorld . lWorld . floorItems . unNIntMap
|
||||
isclose pos = dist ypos pos < 40 && hasButtonLOS ypos pos w
|
||||
ypos = _crPos $ you w
|
||||
activeButtons =
|
||||
filter ((/= Just True) . (^? btEvent . btOn))
|
||||
. IM.elems
|
||||
$ w ^. cWorld . lWorld . buttons
|
||||
activeButtons = filter canpress . IM.elems $ w ^. cWorld . lWorld . buttons
|
||||
canpress bt = case bt ^. btEvent of
|
||||
ButtonPress {_btOn = t} -> not t
|
||||
_ -> True
|
||||
|
||||
changeSwapSel :: Int -> World -> World
|
||||
changeSwapSel yi w
|
||||
|
||||
Reference in New Issue
Block a user