Commit before removing reloading

Reloading as a concept should be handled by positioning
magazines/tanks/ammo-stores next to items that consume ammo. Magazines
themselves could have various methods for refilling or recreating:
crafting, auto-refill over time (synthesis explanation), refill based on
external world objects, and perhaps other ideas.
This commit is contained in:
2024-09-07 10:13:18 +01:00
parent 32cb2b2e80
commit 581d2494dc
7 changed files with 118 additions and 115 deletions
+2 -1
View File
@@ -106,10 +106,11 @@ useItemLeftClick cr w = fromMaybe w $ do
invid <- cr ^? crManipulation . manObject . inInventory . ispItem
ituse <- cr ^? crInv . ix invid . itUse
case ituse of
HeldUse{} -> return $ hammerTest (cWorld . lWorld . creatures . ix (_crID cr) %~ crReload)
HeldUse{} -> return $ hammerTest (cWorld . lWorld . creatures . ix (_crID cr) %~ crReloadToggle)
ConsumeUse{} -> return $ useItemRightClick cr w
EquipUse{} -> return $ useItemRightClick cr w
LeftUse{} -> return $ useItemRightClick cr w
AmmoMagUse{} -> return $ hammerTest (cWorld . lWorld . creatures . ix (_crID cr) %~ crReloadToggle)
_ -> Nothing
where
hammerTest f = case _crHammerPosition cr of