Remove yourID -- you are simply at 0

This commit is contained in:
2022-10-28 21:26:14 +01:00
parent 32744d7cb3
commit d496c4c523
8 changed files with 18 additions and 24 deletions
+2 -2
View File
@@ -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
)