Remove heldParams record
This commit is contained in:
+16
-4
@@ -231,15 +231,27 @@ itemSidePush = \case
|
||||
BLINKERUNSAFE -> 0
|
||||
|
||||
applyInvLock :: Item -> Creature -> World -> World
|
||||
applyInvLock itm cr = case itm ^? itUse . heldParams . weaponInvLock of
|
||||
Just i
|
||||
| i > 0 ->
|
||||
applyInvLock itm cr
|
||||
| i <- itemInvLock itm
|
||||
, i > 0 =
|
||||
(cWorld . lWorld . delayedEvents .:~ (i, UnlockInv cid))
|
||||
. lockInv cid
|
||||
_ -> id
|
||||
| otherwise = id
|
||||
where
|
||||
cid = _crID cr
|
||||
|
||||
itemInvLock :: Item -> Int
|
||||
itemInvLock itm = case itm ^. itType of
|
||||
HELD hit -> heldItemInvLock hit
|
||||
_ -> 0
|
||||
|
||||
heldItemInvLock :: HeldItemType -> Int
|
||||
heldItemInvLock = \case
|
||||
FLAMESPITTER -> 10
|
||||
VOLLEYGUN i -> i + 1
|
||||
BURSTRIFLE -> 7
|
||||
_ -> 0
|
||||
|
||||
applySoundCME :: Item -> Creature -> World -> World
|
||||
applySoundCME itm cr = fromMaybe id $ do
|
||||
(soundid, x) <- bgunSound itm
|
||||
|
||||
Reference in New Issue
Block a user