Make hud non-saveable
This commit is contained in:
@@ -88,27 +88,27 @@ pauseGame :: Universe -> Universe
|
||||
pauseGame u = u & uvScreenLayers .~ [pauseMenu u]
|
||||
|
||||
spaceAction :: World -> World
|
||||
spaceAction w = case w ^?! cWorld . lWorld . hud . hudElement of
|
||||
DisplayCarte -> w & cWorld . lWorld . hud . carteCenter .~ theLoc
|
||||
spaceAction w = case w ^?! hud . hudElement of
|
||||
DisplayCarte -> w & hud . carteCenter .~ theLoc
|
||||
DisplayInventory NoSubInventory -> case selectedCloseObject w of
|
||||
Just (_, Left flit) -> pickUpItem 0 flit w
|
||||
Just (_, Right but) -> doButtonEvent (_btEvent but) but w
|
||||
_ -> w
|
||||
DisplayInventory DisplayTerminal{} -> w & cWorld . lWorld . hud . hudElement . subInventory .~ NoSubInventory
|
||||
_ -> w & cWorld . lWorld . hud . hudElement . subInventory .~ NoSubInventory
|
||||
DisplayInventory DisplayTerminal{} -> w & hud . hudElement . subInventory .~ NoSubInventory
|
||||
_ -> w & hud . hudElement . subInventory .~ NoSubInventory
|
||||
where
|
||||
--theLoc = doWorldPos (fst (_seenLocations (_cWorld w) IM.! _selLocation (_cWorld w))) w
|
||||
theLoc = doWorldPos (w ^?! cWorld . lWorld . seenLocations . ix (w ^. cWorld . lWorld . selLocation) . _1) w
|
||||
|
||||
toggleMap :: World -> World
|
||||
toggleMap w = case w ^?! cWorld . lWorld . hud . hudElement of
|
||||
DisplayCarte -> w & cWorld . lWorld . hud . hudElement .~ DisplayInventory NoSubInventory
|
||||
_ -> w & cWorld . lWorld . hud . hudElement .~ DisplayCarte
|
||||
toggleMap w = case w ^?! hud . hudElement of
|
||||
DisplayCarte -> w & hud . hudElement .~ DisplayInventory NoSubInventory
|
||||
_ -> w & hud . hudElement .~ DisplayCarte
|
||||
|
||||
toggleTweakInv :: World -> World
|
||||
toggleTweakInv w = case w ^. cWorld . lWorld . hud . hudElement of
|
||||
toggleTweakInv w = case w ^. hud . hudElement of
|
||||
DisplayInventory ExamineInventory{} -> w & thepointer .~ NoSubInventory
|
||||
_ -> w & thepointer .~ ExamineInventory mi
|
||||
where
|
||||
thepointer = cWorld . lWorld . hud . hudElement . subInventory
|
||||
thepointer = hud . hudElement . subInventory
|
||||
mi = 0 <$ (yourItem w >>= (^? itTweaks . tweakParams . ix 0))
|
||||
|
||||
Reference in New Issue
Block a user