Commit before changing ItemUse into single product type

This commit is contained in:
2024-12-20 14:49:18 +00:00
parent e1989eaa1e
commit 3a72bd366f
8 changed files with 32 additions and 27 deletions
+5 -10
View File
@@ -28,7 +28,8 @@ tinMag :: Item
tinMag =
defaultHeldItem & itType .~ AMMOMAG TINMAG
& itUse .~ UseNothing
& itConsumables .~ AmmoMag
& itConsumables
.~ AmmoMag
{ _magParams = BulletParams defaultBullet
, _magType = BulletAmmo
, _magLoadStatus =
@@ -38,13 +39,6 @@ tinMag =
}
}
--revolveMag :: Item
--revolveMag =
-- tinMag
-- & itType .~ AMMOMAG REVOLVEMAG
-- & itUse . amagLoadStatus . iaMax .~ 6
-- & itUse . amagLoadStatus . iaLoaded .~ 6
drumMag :: Item
drumMag =
tinMag & itType . ibtAmmoMag .~ DRUMMAG
@@ -125,5 +119,6 @@ chemFuelPouch =
}
bulletSynthesizer :: Item
bulletSynthesizer = makeAttach BULLETSYNTH
& itUse .~ UseAttach (APInt 0)
bulletSynthesizer =
makeAttach BULLETSYNTH
& itUse .~ UseAttach (APInt 0)
+3
View File
@@ -90,6 +90,9 @@ itemToFunction itm = case itm ^. itType of
HELD{} -> case itm ^? itUse . useCondition of
Just MustBeHeld -> HeldPlatformSF
_ -> GadgetPlatformSF
_ | Just amtype <- itm ^? itConsumables . magType
, Just _ <- itm ^? itLocation . ilEquipSite . _Just
-> AmmoMagSF amtype
AMMOMAG{} -> maybe UncomposableIsolateSF AmmoMagSF $ itm ^? itConsumables . magType
ATTACH REMOTESCREEN -> RemoteScreenSF
ATTACH BULLETSYNTH -> AmmoModifierSF BulletAmmo