Make weapon fail sound distinct

This commit is contained in:
2024-10-08 20:55:59 +01:00
parent d1ee0f997a
commit e745238b8f
8 changed files with 504364 additions and 335770 deletions
+1
View File
@@ -16,6 +16,7 @@ data SoundOrigin
| CrSound Int
| CrMouth Int
| CrWeaponSound Int Int
| CrWeaponFailSound Int
| MachineSound Int
| MachineAltSound Int
| TerminalSound
+2 -2
View File
@@ -67,8 +67,8 @@ applyCME itm cr cme
where
spush = fromMaybe 0 $ itm ^? itUse . heldParams . sidePush
failsound w = case w ^? input . mouseButtons . ix SDL.ButtonLeft of
Just 0 -> soundStart (CrWeaponSound (_crID cr) 0) (_crPos cr) click1S Nothing w
_ -> soundContinue (CrWeaponSound (_crID cr) 0) (_crPos cr) click1S Nothing w
Just 0 -> soundStart (CrWeaponFailSound (_crID cr)) (_crPos cr) click1S Nothing w
_ -> soundContinue (CrWeaponFailSound (_crID cr)) (_crPos cr) click1S Nothing w
applyInvLock :: Item -> Creature -> World -> World
applyInvLock itm cr = case itm ^? itUse . heldParams . weaponInvLock of
-3
View File
@@ -60,7 +60,6 @@ itemBaseName itm = case _itType itm of
showAttachItem :: AttachType -> Item -> String
showAttachItem t itm = case t of
ZOOMSCOPE -> "ZOOMSCOPE"
-- TARGETATTACH x -> show x
BULLETSYNTHESIZER -> "BSYNTH"
REMOTESCREEN -> "REMOTE SCREEN " ++ show (itm ^? itUse . uaParams . apLinkedProjectile . _Just)
HOMINGMODULE -> "HOMING MOD"
@@ -94,8 +93,6 @@ showAutoRechargeProgress lc = case lc of
itemNumberDisplay :: Creature -> ComposedItem -> [String]
itemNumberDisplay cr ci = case (ci ^. cItemFunction,iu) of
-- UseTargeting {_tgPos = mp} -> [maybe "" shortShow mp]
-- this could be cleaner here...
(WeaponTargetingSF,_) -> [maybe "" (const "!TARG!") (itm ^? itTargeting . itTgPos . _Just)]
(_,UseHeld{}) -> []
(_,UseHotkey{}) -> [showAutoRechargeProgress (_leftConsumption iu)]
+1 -1
View File
@@ -103,7 +103,7 @@ llleft itm pci = _tryLeftLink (uncurry useBreakL $ itemToBreakLists (CItem itm W
llright :: Item -> PartiallyComposedItem -> Maybe LinkUpdate
llright itm pci = case pci ^. _1 . itType of
CRAFT TRANSFORMER -> Just (toLasgunUpdate itm)
_ -> _tryRightLink (uncurry useBreakL $ itemToBreakLists (CItem itm WeaponPlatformSF)) pci
_ -> _tryRightLink (uncurry useBreakL $ itemToBreakLists (CItem itm WeaponTargetingSF)) pci
toLasgunUpdate :: Item -> LinkUpdate
toLasgunUpdate itm = LUpdate (ILink FunctionChangeLink orientAttachment)