Make examine inventory controlled by item, perhaps still buggy
This commit is contained in:
@@ -23,8 +23,8 @@ import qualified SDL
|
||||
yourControl :: Creature -> World -> World
|
||||
yourControl _ w
|
||||
| inTextInputFocus w = w
|
||||
| Just NoSubInventory{} <- w ^? hud . hudElement . subInventory =
|
||||
w
|
||||
| Just x <- w ^? hud . hudElement . subInventory
|
||||
, f x = w
|
||||
& cWorld . lWorld . creatures . ix 0
|
||||
%~ (wasdWithAiming w . setCrPosture pkeys)
|
||||
& tryClickUse pkeys
|
||||
@@ -32,6 +32,9 @@ yourControl _ w
|
||||
| otherwise =
|
||||
w & cWorld . lWorld . creatures . ix 0 %~ wasdWithAiming w
|
||||
where
|
||||
f NoSubInventory = True
|
||||
f ExamineInventory = True
|
||||
f _ = False
|
||||
pkeys = w ^. input . mouseButtons
|
||||
|
||||
handleHotkeys :: World -> World
|
||||
|
||||
Reference in New Issue
Block a user