Reinstate HammerTrigger (no weapons use it currently)
This commit is contained in:
+12
-15
@@ -106,6 +106,11 @@ hammerCheck f pt loc cr w = case itemTriggerType loc of
|
||||
& cWorld . lWorld . delayedEvents .++~ map g is
|
||||
& randGen .~ gen
|
||||
HammerTrigger t
|
||||
| w ^. cWorld . lWorld . lClock - t > timelastused
|
||||
, isNothing $ find ((== MakeAutoSF) . (^. dtValue . _2)) (loc ^. locDT . dtRight)
|
||||
, pt == 0 ->
|
||||
f loc cr w
|
||||
SemiAutoTrigger t
|
||||
| w ^. cWorld . lWorld . lClock - t > timelastused
|
||||
, isNothing $ find ((== MakeAutoSF) . (^. dtValue . _2)) (loc ^. locDT . dtRight)
|
||||
, pt < w ^. cWorld . lWorld . lClock - timelastused ->
|
||||
@@ -175,7 +180,12 @@ itemMuzzles itm = case itm ^. itType of
|
||||
DETECTOR{} ->
|
||||
dbwMuzzles & ix 0 . mzEffect .~ MuzzleDetector
|
||||
& ix 0 . mzAmmoPerShot .~ UseExactly 100
|
||||
|
||||
LASER ->
|
||||
dbwMuzzles
|
||||
& ix 0 . mzPos .~ V2 6 0
|
||||
& ix 0 . mzInaccuracy .~ 0
|
||||
& ix 0 . mzFlareType .~ LasGunFlare
|
||||
& ix 0 . mzEffect .~ MuzzleLaser
|
||||
_ -> []
|
||||
|
||||
heldItemMuzzles :: HeldItemType -> [Muzzle]
|
||||
@@ -257,12 +267,6 @@ heldItemMuzzles = \case
|
||||
<*> pure (UseExactly 1)
|
||||
<*> pure 0
|
||||
)
|
||||
LASER ->
|
||||
dbwMuzzles
|
||||
& ix 0 . mzPos .~ V2 6 0
|
||||
& ix 0 . mzInaccuracy .~ 0
|
||||
& ix 0 . mzFlareType .~ LasGunFlare
|
||||
& ix 0 . mzEffect .~ MuzzleLaser
|
||||
TESLAGUN ->
|
||||
dbwMuzzles
|
||||
& ix 0 . mzPos .~ V2 10 0
|
||||
@@ -425,7 +429,6 @@ itemSidePush = \case
|
||||
BLOWTORCH -> 0
|
||||
SPARKGUN -> 0
|
||||
TESLAGUN -> 0
|
||||
LASER -> 0
|
||||
TRACTORGUN -> 0
|
||||
RLAUNCHER -> 0
|
||||
RLAUNCHERX{} -> 0
|
||||
@@ -509,7 +512,6 @@ recoilAmount itm
|
||||
BLOWTORCH -> 0
|
||||
SPARKGUN -> 0
|
||||
TESLAGUN -> 0
|
||||
LASER -> 0
|
||||
TRACTORGUN -> 0
|
||||
RLAUNCHER -> 0
|
||||
RLAUNCHERX _ -> 0
|
||||
@@ -557,7 +559,6 @@ bgunSound itm
|
||||
BLOWTORCH -> Nothing
|
||||
SPARKGUN -> Nothing
|
||||
TESLAGUN -> Nothing
|
||||
LASER -> Nothing
|
||||
TRACTORGUN -> Nothing
|
||||
RLAUNCHER -> Just (tap4S, 0)
|
||||
RLAUNCHERX _ -> Just (tap4S, 0)
|
||||
@@ -629,7 +630,6 @@ heldTorqueAmount = \case
|
||||
BLOWTORCH -> 0
|
||||
SPARKGUN -> 0
|
||||
TESLAGUN -> 0.01
|
||||
LASER -> 0
|
||||
TRACTORGUN -> 0
|
||||
RLAUNCHER -> 0
|
||||
RLAUNCHERX{} -> 0
|
||||
@@ -1082,7 +1082,6 @@ heldItemMuzVel = \case
|
||||
BLOWTORCH -> ConstFloat 0.8
|
||||
SPARKGUN -> ConstFloat 0.8
|
||||
TESLAGUN -> ConstFloat 0.8
|
||||
LASER -> ConstFloat 0.8
|
||||
TRACTORGUN -> ConstFloat 0.8
|
||||
RLAUNCHER -> ConstFloat 0
|
||||
RLAUNCHERX{} -> ConstFloat 0
|
||||
@@ -1126,7 +1125,6 @@ heldItemRifling = \case
|
||||
BLOWTORCH -> ConstFloat 0.8
|
||||
SPARKGUN -> ConstFloat 0.8
|
||||
TESLAGUN -> ConstFloat 0.8
|
||||
LASER -> ConstFloat 0.8
|
||||
TRACTORGUN -> ConstFloat 0.8
|
||||
RLAUNCHER -> ConstFloat 0
|
||||
RLAUNCHERX{} -> ConstFloat 0
|
||||
@@ -1139,7 +1137,7 @@ heldItemRifling = \case
|
||||
BLINKER -> ConstFloat 0.8
|
||||
BLINKERUNSAFE -> ConstFloat 0.8
|
||||
|
||||
mcUseHeld :: HeldItemType -> Item -> Machine -> World -> World
|
||||
mcUseHeld :: ItemType -> Item -> Machine -> World -> World
|
||||
mcUseHeld hit = case hit of
|
||||
LASER -> mcShootLaser
|
||||
_ -> mcShootAuto
|
||||
@@ -1199,7 +1197,6 @@ gasType hit _ = case hit of
|
||||
BLOWTORCH -> Nothing
|
||||
SPARKGUN -> Nothing
|
||||
TESLAGUN -> Nothing
|
||||
LASER -> Nothing
|
||||
TRACTORGUN -> Nothing
|
||||
RLAUNCHER -> Nothing
|
||||
RLAUNCHERX{} -> Nothing
|
||||
|
||||
Reference in New Issue
Block a user