Fix rb scrolling
This commit is contained in:
@@ -25,6 +25,7 @@ module Dodge.Inventory (
|
||||
invDimColor,
|
||||
) where
|
||||
|
||||
import Dodge.Reloading
|
||||
import Color
|
||||
import Dodge.Inventory.Color
|
||||
import qualified Data.Map.Strict as M
|
||||
@@ -52,11 +53,11 @@ rmInvItem ::
|
||||
World ->
|
||||
World
|
||||
rmInvItem cid invid w = case w ^? getcid . crInv . ix invid . itUse . useAmount of
|
||||
Just x | x > 1 -> w & pointcid . crInv . ix invid . itUse . useAmount %~ subtract 1
|
||||
Just x | x > 1 -> w & pointcid . crInv . ix invid . itUse . useAmount -~ 1
|
||||
_ ->
|
||||
w
|
||||
& pointcid . crInv %~ f
|
||||
& pointcid . crInvSel %~ stopCrInvSelAction
|
||||
& pointcid %~ crCancelReloading
|
||||
& pointcid . crInvSel . iselPos %~ g
|
||||
& pointcid . crLeftInvSel . lisMPos %~ g'
|
||||
& removeAnySlotEquipment
|
||||
@@ -70,9 +71,6 @@ rmInvItem cid invid w = case w ^? getcid . crInv . ix invid . itUse . useAmount
|
||||
getcid = cWorld . lWorld . creatures . ix cid
|
||||
pointcid = cWorld . lWorld . creatures . ix cid
|
||||
|
||||
stopCrInvSelAction (InvSel i a)
|
||||
| i == invid = InvSel i NoInvSelAction
|
||||
| otherwise = InvSel i a
|
||||
cr = w ^?! cWorld . lWorld . creatures . ix cid
|
||||
itm = _crInv cr IM.! invid
|
||||
dounequipfunction = fromMaybe id $ do
|
||||
|
||||
Reference in New Issue
Block a user