Fix terminal distance bug
This commit is contained in:
@@ -150,8 +150,9 @@ updateTerminal = checkTermDist
|
||||
|
||||
checkTermDist :: World -> World
|
||||
checkTermDist w = case w ^? hud . hudElement . subInventory . termID of
|
||||
Just btid -> fromMaybe (w & hud . hudElement .~ DisplayInventory NoSubInventory) $ do
|
||||
btpos <- w ^? buttons . ix btid . btPos
|
||||
Just tmid -> fromMaybe (w & hud . hudElement .~ DisplayInventory NoSubInventory) $ do
|
||||
btid <- w ^? terminals . ix tmid . tmButtonID
|
||||
btpos <- w ^? buttons . ix btid . btPos
|
||||
if dist btpos (_crPos $ you w) < 40 then Just w else Nothing
|
||||
Nothing -> w
|
||||
|
||||
|
||||
Reference in New Issue
Block a user