Reset warmup/cooldown when dropping machine pistol

Ideally items should be updateable when not equipped,
then this reset would not be necessary.
This commit is contained in:
2025-06-26 09:34:51 +01:00
parent 731bd5276a
commit cccb4f38db
+2
View File
@@ -67,6 +67,8 @@ itEffectOnPickup _ _ = id
itEffectOnDrop :: Item -> Creature -> World -> World
itEffectOnDrop itm cr w = case itm ^. itType of
HELD MINIGUNX{} -> w & pointerToItemID (_itID itm) . itParams . wTime .~ 0
HELD MACHINEPISTOL{} -> w & pointerToItemID (_itID itm) . itParams
.~ WarmTime 0 False Nothing
ITEMSCAN -> cancelExamineInventory w
HELD FLATSHIELD -> removeShieldWall itm cr w
_ -> w