Cleanup
This commit is contained in:
+10
-2
@@ -6,8 +6,7 @@ Description : Simulation update
|
||||
-}
|
||||
module Dodge.Update (updateUniverse) where
|
||||
|
||||
--import Dodge.InputFocus
|
||||
|
||||
import Control.Monad
|
||||
import Dodge.Update.Input.InGame
|
||||
import Dodge.Update.Input.ScreenLayer
|
||||
import Dodge.Debug
|
||||
@@ -279,6 +278,15 @@ functionalUpdate w =
|
||||
-- . over uvWorld updateInventorySelectionList
|
||||
$ over uvWorld updatePastWorlds w
|
||||
|
||||
checkTermDist :: World -> World
|
||||
checkTermDist w = fromMaybe w $ do
|
||||
tmid <- w ^? hud . hudElement . subInventory . termID
|
||||
btid <- w ^? cWorld . lWorld . terminals . ix tmid . tmButtonID
|
||||
btpos <- w ^? cWorld . lWorld . buttons . ix btid . btPos
|
||||
guard $ dist btpos (_crPos $ you w) > 40
|
||||
return (w & hud . hudElement . subInventory .~ NoSubInventory)
|
||||
|
||||
|
||||
updateWheelEvents :: World -> World
|
||||
updateWheelEvents w
|
||||
| yi == 0 = w
|
||||
|
||||
Reference in New Issue
Block a user