Remove yourID -- you are simply at 0
This commit is contained in:
@@ -26,7 +26,7 @@ updateWheelEvent yi w = case w ^. cWorld . lWorld . hud . hudElement of
|
||||
DisplayInventory NoSubInventory
|
||||
-- functions that modify the inventory should be centralised so that
|
||||
-- this lock can be sensibly applied, perhaps
|
||||
| w ^?! cWorld . lWorld . creatures . ix (w ^. cWorld . lWorld . yourID) . crInvLock -> w
|
||||
| w ^?! cWorld . lWorld . creatures . ix 0 . crInvLock -> w
|
||||
| rbDown -> case (yourItem w ^? _Just . itUse . heldScroll, _rbOptions w) of
|
||||
(_, EquipOptions{}) -> scrollRBOption y w
|
||||
(Nothing, _) -> closeObjScrollDir y w
|
||||
@@ -93,7 +93,7 @@ changeTweakParam mi i w = fromMaybe w $ do
|
||||
params <- yourItem w ^? _Just . itTweaks . tweakParams . ix paramid
|
||||
let x = (_tweakVal params + i) `mod` _tweakMax params
|
||||
return $
|
||||
w & cWorld . lWorld . creatures . ix (w ^. cWorld . lWorld . yourID) . crInv . ix (crSel (you w))
|
||||
w & cWorld . lWorld . creatures . ix 0 . crInv . ix (crSel (you w))
|
||||
%~ ( (itTweaks . tweakParams . ix paramid . tweakVal .~ x)
|
||||
. doTweak (_tweakType params) x
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user