Reinstate HammerTrigger (no weapons use it currently)
This commit is contained in:
@@ -51,8 +51,7 @@ digraph {
|
|||||||
,label="HELD {_ibtHeld = FLAMEWALL}"];
|
,label="HELD {_ibtHeld = FLAMEWALL}"];
|
||||||
63 [shape=box
|
63 [shape=box
|
||||||
,label="HELD {_ibtHeld = FLAMETORRENT}"];
|
,label="HELD {_ibtHeld = FLAMETORRENT}"];
|
||||||
65 [shape=box
|
65 [shape=box,label=LASER];
|
||||||
,label="HELD {_ibtHeld = LASER}"];
|
|
||||||
69 [shape=box
|
69 [shape=box
|
||||||
,label="HELD {_ibtHeld = SPARKGUN}"];
|
,label="HELD {_ibtHeld = SPARKGUN}"];
|
||||||
71 [shape=box
|
71 [shape=box
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -15,40 +15,40 @@ import Dodge.Data.TriggerType
|
|||||||
|
|
||||||
itemTriggerType :: LocationDT OItem -> TriggerType
|
itemTriggerType :: LocationDT OItem -> TriggerType
|
||||||
itemTriggerType loc
|
itemTriggerType loc
|
||||||
| isPulseLaser loc = HammerTrigger 9
|
| isPulseLaser loc = SemiAutoTrigger 9
|
||||||
| otherwise = baseItemTriggerType $ loc ^. locDT . dtValue . _1
|
| otherwise = baseItemTriggerType $ loc ^. locDT . dtValue . _1
|
||||||
|
|
||||||
baseItemTriggerType :: Item -> TriggerType
|
baseItemTriggerType :: Item -> TriggerType
|
||||||
baseItemTriggerType itm = case itm ^. itType of
|
baseItemTriggerType itm = case itm ^. itType of
|
||||||
HELD hit -> heldTriggerType hit
|
HELD hit -> heldTriggerType hit
|
||||||
ATTACH CAPACITOR -> HammerTrigger 10
|
ATTACH CAPACITOR -> SemiAutoTrigger 10
|
||||||
_ -> NoTrigger
|
_ -> NoTrigger
|
||||||
|
|
||||||
heldTriggerType :: HeldItemType -> TriggerType
|
heldTriggerType :: HeldItemType -> TriggerType
|
||||||
heldTriggerType = \case
|
heldTriggerType = \case
|
||||||
BANGSTICK{} -> HammerTrigger 8
|
BANGSTICK{} -> SemiAutoTrigger 8
|
||||||
REWINDER -> HammerTrigger 20
|
REWINDER -> SemiAutoTrigger 20
|
||||||
TIMESTOPPER -> HammerTrigger 20
|
TIMESTOPPER -> SemiAutoTrigger 20
|
||||||
TIMESCROLLER -> HammerTrigger 20
|
TIMESCROLLER -> SemiAutoTrigger 20
|
||||||
PISTOL -> HammerTrigger 6
|
PISTOL -> SemiAutoTrigger 6
|
||||||
MACHINEPISTOL -> WarmUpCoolDown 50 100 200
|
MACHINEPISTOL -> WarmUpCoolDown 50 100 200
|
||||||
AUTOPISTOL -> AutoTrigger 8
|
AUTOPISTOL -> AutoTrigger 8
|
||||||
SMG -> AutoTrigger 8
|
SMG -> AutoTrigger 8
|
||||||
BANGCONE -> HammerTrigger 20
|
BANGCONE -> SemiAutoTrigger 20
|
||||||
BLUNDERBUSS -> HammerTrigger 20
|
BLUNDERBUSS -> SemiAutoTrigger 20
|
||||||
GRAPECANNON{} -> HammerTrigger 20
|
GRAPECANNON{} -> SemiAutoTrigger 20
|
||||||
MINIGUNX{} -> WarmUpNoDelay 100
|
MINIGUNX{} -> WarmUpNoDelay 100
|
||||||
--VOLLEYGUN i -> BurstTrigger $ fmap (3*) [1 .. i-1]
|
--VOLLEYGUN i -> BurstTrigger $ fmap (3*) [1 .. i-1]
|
||||||
VOLLEYGUN i -> VolleyGunTrigger i 15
|
VOLLEYGUN i -> VolleyGunTrigger i 15
|
||||||
RIFLE -> HammerTrigger 6
|
RIFLE -> SemiAutoTrigger 6
|
||||||
ALTERIFLE -> HammerTrigger 6
|
ALTERIFLE -> SemiAutoTrigger 6
|
||||||
AUTORIFLE -> AutoTrigger 6
|
AUTORIFLE -> AutoTrigger 6
|
||||||
BURSTRIFLE -> BurstTrigger [3,6] 8 -- time last used gets updated after last burst fire
|
BURSTRIFLE -> BurstTrigger [3,6] 8 -- time last used gets updated after last burst fire
|
||||||
BANGROD -> HammerTrigger 12
|
BANGROD -> SemiAutoTrigger 12
|
||||||
ELEPHANTGUN -> HammerTrigger 12
|
ELEPHANTGUN -> SemiAutoTrigger 12
|
||||||
AMR -> HammerTrigger 12
|
AMR -> SemiAutoTrigger 12
|
||||||
AUTOAMR -> AutoTrigger 12
|
AUTOAMR -> AutoTrigger 12
|
||||||
SNIPERRIFLE -> HammerTrigger 12
|
SNIPERRIFLE -> SemiAutoTrigger 12
|
||||||
FLAMESPITTER -> BurstTrigger [1..9] 6
|
FLAMESPITTER -> BurstTrigger [1..9] 6
|
||||||
FLAMETHROWER -> NoTrigger
|
FLAMETHROWER -> NoTrigger
|
||||||
FLAMETORRENT -> NoTrigger
|
FLAMETORRENT -> NoTrigger
|
||||||
@@ -56,15 +56,14 @@ heldTriggerType = \case
|
|||||||
BLOWTORCH -> NoTrigger
|
BLOWTORCH -> NoTrigger
|
||||||
SPARKGUN -> NoTrigger
|
SPARKGUN -> NoTrigger
|
||||||
TESLAGUN -> NoTrigger
|
TESLAGUN -> NoTrigger
|
||||||
LASER -> NoTrigger
|
|
||||||
TRACTORGUN -> NoTrigger
|
TRACTORGUN -> NoTrigger
|
||||||
RLAUNCHER -> HammerTrigger 20
|
RLAUNCHER -> SemiAutoTrigger 20
|
||||||
RLAUNCHERX{} -> HammerTrigger 20
|
RLAUNCHERX{} -> SemiAutoTrigger 20
|
||||||
GLAUNCHER -> HammerTrigger 20
|
GLAUNCHER -> SemiAutoTrigger 20
|
||||||
POISONSPRAYER -> NoTrigger
|
POISONSPRAYER -> NoTrigger
|
||||||
SHATTERGUN -> HammerTrigger 20
|
SHATTERGUN -> SemiAutoTrigger 20
|
||||||
TORCH -> NoTrigger
|
TORCH -> NoTrigger
|
||||||
FLATSHIELD -> NoTrigger
|
FLATSHIELD -> NoTrigger
|
||||||
KEYCARD{} -> NoTrigger
|
KEYCARD{} -> NoTrigger
|
||||||
BLINKER -> HammerTrigger 20
|
BLINKER -> SemiAutoTrigger 20
|
||||||
BLINKERUNSAFE -> HammerTrigger 20
|
BLINKERUNSAFE -> SemiAutoTrigger 20
|
||||||
|
|||||||
@@ -159,7 +159,7 @@ invItemLocUpdate cr loc w = doAnyEquipmentEffect loc cr $ case itm ^. itType of
|
|||||||
HELD FLATSHIELD -> rootNotrootEff createShieldWall removeShieldWall itm cr w
|
HELD FLATSHIELD -> rootNotrootEff createShieldWall removeShieldWall itm cr w
|
||||||
HELD MINIGUNX{} -> coolMinigun itm w
|
HELD MINIGUNX{} -> coolMinigun itm w
|
||||||
HELD MACHINEPISTOL{} -> coolMachinePistol cr itm w
|
HELD MACHINEPISTOL{} -> coolMachinePistol cr itm w
|
||||||
HELD LASER | loc ^. locDT . dtValue . _2 == WeaponTargetingSF
|
LASER | loc ^. locDT . dtValue . _2 == WeaponTargetingSF
|
||||||
, itm ^? itLocation . ilIsAttached == Just True -> shineTargetLaser cr loc w
|
, itm ^? itLocation . ilIsAttached == Just True -> shineTargetLaser cr loc w
|
||||||
HELD TORCH
|
HELD TORCH
|
||||||
| itm ^? itLocation . ilIsAttached == Just True -> shineTorch cr loc w
|
| itm ^? itLocation . ilIsAttached == Just True -> shineTorch cr loc w
|
||||||
|
|||||||
@@ -66,6 +66,7 @@ strFromHeldItem cr = fromMaybe 0 $ do
|
|||||||
itemWeight :: Item -> Int
|
itemWeight :: Item -> Int
|
||||||
itemWeight it = case it ^. itType of
|
itemWeight it = case it ^. itType of
|
||||||
HELD hit -> heldItemWeight hit
|
HELD hit -> heldItemWeight hit
|
||||||
|
LASER -> 15
|
||||||
_ -> 1
|
_ -> 1
|
||||||
|
|
||||||
heldItemWeight :: HeldItemType -> Int
|
heldItemWeight :: HeldItemType -> Int
|
||||||
@@ -99,7 +100,6 @@ heldItemWeight = \case
|
|||||||
BLOWTORCH -> 10
|
BLOWTORCH -> 10
|
||||||
SPARKGUN -> 15
|
SPARKGUN -> 15
|
||||||
TESLAGUN -> 15
|
TESLAGUN -> 15
|
||||||
LASER -> 15
|
|
||||||
TRACTORGUN -> 10
|
TRACTORGUN -> 10
|
||||||
RLAUNCHER -> 20
|
RLAUNCHER -> 20
|
||||||
RLAUNCHERX{} -> 20
|
RLAUNCHERX{} -> 20
|
||||||
|
|||||||
@@ -172,6 +172,7 @@ aimTurn a cr = creatureTurnTowardDir a (x * 0.2) cr
|
|||||||
itemBulkiness :: ItemType -> Float
|
itemBulkiness :: ItemType -> Float
|
||||||
itemBulkiness = \case
|
itemBulkiness = \case
|
||||||
HELD hit -> heldItemBulkiness hit
|
HELD hit -> heldItemBulkiness hit
|
||||||
|
LASER -> 1
|
||||||
_ -> 1
|
_ -> 1
|
||||||
|
|
||||||
heldItemBulkiness :: HeldItemType -> Float
|
heldItemBulkiness :: HeldItemType -> Float
|
||||||
@@ -205,7 +206,6 @@ heldItemBulkiness = \case
|
|||||||
BLOWTORCH -> 1
|
BLOWTORCH -> 1
|
||||||
SPARKGUN -> 1
|
SPARKGUN -> 1
|
||||||
TESLAGUN -> 1
|
TESLAGUN -> 1
|
||||||
LASER -> 1
|
|
||||||
TRACTORGUN -> 1
|
TRACTORGUN -> 1
|
||||||
RLAUNCHER -> 0.9
|
RLAUNCHER -> 0.9
|
||||||
RLAUNCHERX{} -> 0.9
|
RLAUNCHERX{} -> 0.9
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ data ItemType
|
|||||||
| INTROSCAN {_ibtIntroScanType :: IntroScanType}
|
| INTROSCAN {_ibtIntroScanType :: IntroScanType}
|
||||||
| DETECTOR {_ibtDetector :: Detector}
|
| DETECTOR {_ibtDetector :: Detector}
|
||||||
| ARHUD
|
| ARHUD
|
||||||
|
| LASER
|
||||||
deriving (Eq, Ord, Show, Read)
|
deriving (Eq, Ord, Show, Read)
|
||||||
|
|
||||||
data InventoryPathing
|
data InventoryPathing
|
||||||
@@ -166,7 +167,6 @@ data HeldItemType
|
|||||||
| BLOWTORCH
|
| BLOWTORCH
|
||||||
| SPARKGUN
|
| SPARKGUN
|
||||||
| TESLAGUN
|
| TESLAGUN
|
||||||
| LASER
|
|
||||||
| TRACTORGUN
|
| TRACTORGUN
|
||||||
| RLAUNCHER
|
| RLAUNCHER
|
||||||
| RLAUNCHERX {_xNum :: Int}
|
| RLAUNCHERX {_xNum :: Int}
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import Control.Lens
|
|||||||
|
|
||||||
data TriggerType
|
data TriggerType
|
||||||
= AutoTrigger Int
|
= AutoTrigger Int
|
||||||
|
| SemiAutoTrigger Int
|
||||||
| HammerTrigger Int
|
| HammerTrigger Int
|
||||||
| NoTrigger
|
| NoTrigger
|
||||||
| BurstTrigger {_burstFrames :: [Int], _burstRate :: Int}
|
| BurstTrigger {_burstFrames :: [Int], _burstRate :: Int}
|
||||||
|
|||||||
+12
-15
@@ -106,6 +106,11 @@ hammerCheck f pt loc cr w = case itemTriggerType loc of
|
|||||||
& cWorld . lWorld . delayedEvents .++~ map g is
|
& cWorld . lWorld . delayedEvents .++~ map g is
|
||||||
& randGen .~ gen
|
& randGen .~ gen
|
||||||
HammerTrigger t
|
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
|
| w ^. cWorld . lWorld . lClock - t > timelastused
|
||||||
, isNothing $ find ((== MakeAutoSF) . (^. dtValue . _2)) (loc ^. locDT . dtRight)
|
, isNothing $ find ((== MakeAutoSF) . (^. dtValue . _2)) (loc ^. locDT . dtRight)
|
||||||
, pt < w ^. cWorld . lWorld . lClock - timelastused ->
|
, pt < w ^. cWorld . lWorld . lClock - timelastused ->
|
||||||
@@ -175,7 +180,12 @@ itemMuzzles itm = case itm ^. itType of
|
|||||||
DETECTOR{} ->
|
DETECTOR{} ->
|
||||||
dbwMuzzles & ix 0 . mzEffect .~ MuzzleDetector
|
dbwMuzzles & ix 0 . mzEffect .~ MuzzleDetector
|
||||||
& ix 0 . mzAmmoPerShot .~ UseExactly 100
|
& 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]
|
heldItemMuzzles :: HeldItemType -> [Muzzle]
|
||||||
@@ -257,12 +267,6 @@ heldItemMuzzles = \case
|
|||||||
<*> pure (UseExactly 1)
|
<*> pure (UseExactly 1)
|
||||||
<*> pure 0
|
<*> pure 0
|
||||||
)
|
)
|
||||||
LASER ->
|
|
||||||
dbwMuzzles
|
|
||||||
& ix 0 . mzPos .~ V2 6 0
|
|
||||||
& ix 0 . mzInaccuracy .~ 0
|
|
||||||
& ix 0 . mzFlareType .~ LasGunFlare
|
|
||||||
& ix 0 . mzEffect .~ MuzzleLaser
|
|
||||||
TESLAGUN ->
|
TESLAGUN ->
|
||||||
dbwMuzzles
|
dbwMuzzles
|
||||||
& ix 0 . mzPos .~ V2 10 0
|
& ix 0 . mzPos .~ V2 10 0
|
||||||
@@ -425,7 +429,6 @@ itemSidePush = \case
|
|||||||
BLOWTORCH -> 0
|
BLOWTORCH -> 0
|
||||||
SPARKGUN -> 0
|
SPARKGUN -> 0
|
||||||
TESLAGUN -> 0
|
TESLAGUN -> 0
|
||||||
LASER -> 0
|
|
||||||
TRACTORGUN -> 0
|
TRACTORGUN -> 0
|
||||||
RLAUNCHER -> 0
|
RLAUNCHER -> 0
|
||||||
RLAUNCHERX{} -> 0
|
RLAUNCHERX{} -> 0
|
||||||
@@ -509,7 +512,6 @@ recoilAmount itm
|
|||||||
BLOWTORCH -> 0
|
BLOWTORCH -> 0
|
||||||
SPARKGUN -> 0
|
SPARKGUN -> 0
|
||||||
TESLAGUN -> 0
|
TESLAGUN -> 0
|
||||||
LASER -> 0
|
|
||||||
TRACTORGUN -> 0
|
TRACTORGUN -> 0
|
||||||
RLAUNCHER -> 0
|
RLAUNCHER -> 0
|
||||||
RLAUNCHERX _ -> 0
|
RLAUNCHERX _ -> 0
|
||||||
@@ -557,7 +559,6 @@ bgunSound itm
|
|||||||
BLOWTORCH -> Nothing
|
BLOWTORCH -> Nothing
|
||||||
SPARKGUN -> Nothing
|
SPARKGUN -> Nothing
|
||||||
TESLAGUN -> Nothing
|
TESLAGUN -> Nothing
|
||||||
LASER -> Nothing
|
|
||||||
TRACTORGUN -> Nothing
|
TRACTORGUN -> Nothing
|
||||||
RLAUNCHER -> Just (tap4S, 0)
|
RLAUNCHER -> Just (tap4S, 0)
|
||||||
RLAUNCHERX _ -> Just (tap4S, 0)
|
RLAUNCHERX _ -> Just (tap4S, 0)
|
||||||
@@ -629,7 +630,6 @@ heldTorqueAmount = \case
|
|||||||
BLOWTORCH -> 0
|
BLOWTORCH -> 0
|
||||||
SPARKGUN -> 0
|
SPARKGUN -> 0
|
||||||
TESLAGUN -> 0.01
|
TESLAGUN -> 0.01
|
||||||
LASER -> 0
|
|
||||||
TRACTORGUN -> 0
|
TRACTORGUN -> 0
|
||||||
RLAUNCHER -> 0
|
RLAUNCHER -> 0
|
||||||
RLAUNCHERX{} -> 0
|
RLAUNCHERX{} -> 0
|
||||||
@@ -1082,7 +1082,6 @@ heldItemMuzVel = \case
|
|||||||
BLOWTORCH -> ConstFloat 0.8
|
BLOWTORCH -> ConstFloat 0.8
|
||||||
SPARKGUN -> ConstFloat 0.8
|
SPARKGUN -> ConstFloat 0.8
|
||||||
TESLAGUN -> ConstFloat 0.8
|
TESLAGUN -> ConstFloat 0.8
|
||||||
LASER -> ConstFloat 0.8
|
|
||||||
TRACTORGUN -> ConstFloat 0.8
|
TRACTORGUN -> ConstFloat 0.8
|
||||||
RLAUNCHER -> ConstFloat 0
|
RLAUNCHER -> ConstFloat 0
|
||||||
RLAUNCHERX{} -> ConstFloat 0
|
RLAUNCHERX{} -> ConstFloat 0
|
||||||
@@ -1126,7 +1125,6 @@ heldItemRifling = \case
|
|||||||
BLOWTORCH -> ConstFloat 0.8
|
BLOWTORCH -> ConstFloat 0.8
|
||||||
SPARKGUN -> ConstFloat 0.8
|
SPARKGUN -> ConstFloat 0.8
|
||||||
TESLAGUN -> ConstFloat 0.8
|
TESLAGUN -> ConstFloat 0.8
|
||||||
LASER -> ConstFloat 0.8
|
|
||||||
TRACTORGUN -> ConstFloat 0.8
|
TRACTORGUN -> ConstFloat 0.8
|
||||||
RLAUNCHER -> ConstFloat 0
|
RLAUNCHER -> ConstFloat 0
|
||||||
RLAUNCHERX{} -> ConstFloat 0
|
RLAUNCHERX{} -> ConstFloat 0
|
||||||
@@ -1139,7 +1137,7 @@ heldItemRifling = \case
|
|||||||
BLINKER -> ConstFloat 0.8
|
BLINKER -> ConstFloat 0.8
|
||||||
BLINKERUNSAFE -> ConstFloat 0.8
|
BLINKERUNSAFE -> ConstFloat 0.8
|
||||||
|
|
||||||
mcUseHeld :: HeldItemType -> Item -> Machine -> World -> World
|
mcUseHeld :: ItemType -> Item -> Machine -> World -> World
|
||||||
mcUseHeld hit = case hit of
|
mcUseHeld hit = case hit of
|
||||||
LASER -> mcShootLaser
|
LASER -> mcShootLaser
|
||||||
_ -> mcShootAuto
|
_ -> mcShootAuto
|
||||||
@@ -1199,7 +1197,6 @@ gasType hit _ = case hit of
|
|||||||
BLOWTORCH -> Nothing
|
BLOWTORCH -> Nothing
|
||||||
SPARKGUN -> Nothing
|
SPARKGUN -> Nothing
|
||||||
TESLAGUN -> Nothing
|
TESLAGUN -> Nothing
|
||||||
LASER -> Nothing
|
|
||||||
TRACTORGUN -> Nothing
|
TRACTORGUN -> Nothing
|
||||||
RLAUNCHER -> Nothing
|
RLAUNCHER -> Nothing
|
||||||
RLAUNCHERX{} -> Nothing
|
RLAUNCHERX{} -> Nothing
|
||||||
|
|||||||
@@ -9,5 +9,5 @@ import Dodge.Data.Item
|
|||||||
|
|
||||||
isPulseLaser :: LocationDT OItem -> Bool
|
isPulseLaser :: LocationDT OItem -> Bool
|
||||||
isPulseLaser loc =
|
isPulseLaser loc =
|
||||||
loc ^. locDT . dtValue . _1 . itType == HELD LASER
|
loc ^. locDT . dtValue . _1 . itType == LASER
|
||||||
&& (loc ^? locDT . dtLeft . ix 0 . dtValue . _1 . itType == Just (ATTACH CAPACITOR))
|
&& (loc ^? locDT . dtLeft . ix 0 . dtValue . _1 . itType == Just (ATTACH CAPACITOR))
|
||||||
|
|||||||
@@ -37,6 +37,7 @@ itemFromBase = \case
|
|||||||
NULGATE -> nulgate
|
NULGATE -> nulgate
|
||||||
UNIGATE -> unigate
|
UNIGATE -> unigate
|
||||||
BINGATE -> bingate
|
BINGATE -> bingate
|
||||||
|
LASER -> laser
|
||||||
|
|
||||||
itemFromAmmoMag :: AmmoMagType -> Item
|
itemFromAmmoMag :: AmmoMagType -> Item
|
||||||
itemFromAmmoMag at = case at of
|
itemFromAmmoMag at = case at of
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ aimStance dt
|
|||||||
itemBaseStance :: Item -> AimStance
|
itemBaseStance :: Item -> AimStance
|
||||||
itemBaseStance itm = case itm ^. itType of
|
itemBaseStance itm = case itm ^. itType of
|
||||||
HELD hit -> heldAimStance hit
|
HELD hit -> heldAimStance hit
|
||||||
|
LASER -> TwoHandFlat
|
||||||
_ -> OneHand
|
_ -> OneHand
|
||||||
|
|
||||||
heldAimStance :: HeldItemType -> AimStance
|
heldAimStance :: HeldItemType -> AimStance
|
||||||
@@ -51,7 +52,6 @@ heldAimStance = \case
|
|||||||
BLOWTORCH -> TwoHandUnder
|
BLOWTORCH -> TwoHandUnder
|
||||||
SPARKGUN -> TwoHandFlat
|
SPARKGUN -> TwoHandFlat
|
||||||
TESLAGUN -> TwoHandFlat
|
TESLAGUN -> TwoHandFlat
|
||||||
LASER -> TwoHandFlat
|
|
||||||
TRACTORGUN -> TwoHandUnder
|
TRACTORGUN -> TwoHandUnder
|
||||||
RLAUNCHER -> TwoHandOver
|
RLAUNCHER -> TwoHandOver
|
||||||
RLAUNCHERX{} -> TwoHandOver
|
RLAUNCHERX{} -> TwoHandOver
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ itemAmmoSlots :: Item -> IM.IntMap AmmoType
|
|||||||
itemAmmoSlots itm = case itm ^. itType of
|
itemAmmoSlots itm = case itm ^. itType of
|
||||||
HELD hit -> heldItemAmmoSlots hit
|
HELD hit -> heldItemAmmoSlots hit
|
||||||
DETECTOR _ -> singleAmmo ElectricalAmmo
|
DETECTOR _ -> singleAmmo ElectricalAmmo
|
||||||
|
LASER -> singleAmmo ElectricalAmmo
|
||||||
_ -> mempty
|
_ -> mempty
|
||||||
|
|
||||||
heldItemAmmoSlots :: HeldItemType -> IM.IntMap AmmoType
|
heldItemAmmoSlots :: HeldItemType -> IM.IntMap AmmoType
|
||||||
@@ -42,7 +43,6 @@ heldItemAmmoSlots = \case
|
|||||||
FLAMESPITTER -> singleAmmo GasAmmo
|
FLAMESPITTER -> singleAmmo GasAmmo
|
||||||
FLAMEWALL -> singleAmmo GasAmmo
|
FLAMEWALL -> singleAmmo GasAmmo
|
||||||
BLOWTORCH -> singleAmmo GasAmmo
|
BLOWTORCH -> singleAmmo GasAmmo
|
||||||
LASER -> singleAmmo ElectricalAmmo
|
|
||||||
TESLAGUN -> singleAmmo ElectricalAmmo
|
TESLAGUN -> singleAmmo ElectricalAmmo
|
||||||
SPARKGUN -> singleAmmo ElectricalAmmo
|
SPARKGUN -> singleAmmo ElectricalAmmo
|
||||||
TRACTORGUN -> singleAmmo ElectricalAmmo
|
TRACTORGUN -> singleAmmo ElectricalAmmo
|
||||||
|
|||||||
@@ -81,6 +81,7 @@ itemBaseName = \case
|
|||||||
BINGATE -> "BINGATE"
|
BINGATE -> "BINGATE"
|
||||||
UNIGATE -> "UNIGATE"
|
UNIGATE -> "UNIGATE"
|
||||||
NULGATE -> "NULGATE"
|
NULGATE -> "NULGATE"
|
||||||
|
LASER -> "LASER"
|
||||||
|
|
||||||
showInventoryPathing :: InventoryPathing -> String
|
showInventoryPathing :: InventoryPathing -> String
|
||||||
showInventoryPathing = \case
|
showInventoryPathing = \case
|
||||||
|
|||||||
@@ -51,6 +51,7 @@ itemSPic it = case it ^. itType of
|
|||||||
BINGATE -> defSPic
|
BINGATE -> defSPic
|
||||||
UNIGATE -> defSPic
|
UNIGATE -> defSPic
|
||||||
NULGATE -> defSPic
|
NULGATE -> defSPic
|
||||||
|
LASER -> lasGunPic it
|
||||||
|
|
||||||
craftItemSPic :: CraftType -> Shape
|
craftItemSPic :: CraftType -> Shape
|
||||||
craftItemSPic = \case
|
craftItemSPic = \case
|
||||||
@@ -273,7 +274,6 @@ heldItemSPic ht it = case ht of
|
|||||||
BLOWTORCH -> flamerPic it
|
BLOWTORCH -> flamerPic it
|
||||||
SPARKGUN -> teslaGunPic
|
SPARKGUN -> teslaGunPic
|
||||||
TESLAGUN -> teslaGunPic
|
TESLAGUN -> teslaGunPic
|
||||||
LASER -> lasGunPic it
|
|
||||||
TRACTORGUN -> tractorGunPic it
|
TRACTORGUN -> tractorGunPic it
|
||||||
RLAUNCHER -> rlauncherPic it
|
RLAUNCHER -> rlauncherPic it
|
||||||
RLAUNCHERX _ -> rlauncherPic it
|
RLAUNCHERX _ -> rlauncherPic it
|
||||||
|
|||||||
@@ -41,16 +41,16 @@ itemAboveAttachables (itm,sf) = case (itm ^. itType, sf) of
|
|||||||
<> extraWeaponLinks itm
|
<> extraWeaponLinks itm
|
||||||
(DETECTOR {}, _) -> [ARHUDSF,TriggerSF,MapperSF]
|
(DETECTOR {}, _) -> [ARHUDSF,TriggerSF,MapperSF]
|
||||||
--(CRAFT TRANSFORMER, _) -> [LaserWeaponSF]
|
--(CRAFT TRANSFORMER, _) -> [LaserWeaponSF]
|
||||||
(HELD LASER, _) -> [TransformerSF]
|
(LASER, _) -> [TransformerSF]
|
||||||
(MAPPER, _) -> [ARHUDSF]
|
(MAPPER, _) -> [ARHUDSF]
|
||||||
(_, GadgetPlatformSF) -> [TriggerSF, WeaponTargetingSF, WeaponScopeSF]
|
(_, GadgetPlatformSF) -> [TriggerSF, WeaponTargetingSF, WeaponScopeSF]
|
||||||
_ -> []
|
_ -> []
|
||||||
|
|
||||||
itemBelowAttachables :: CItem -> [ItemSF]
|
itemBelowAttachables :: CItem -> [ItemSF]
|
||||||
itemBelowAttachables (itm,sf) = case (itm ^. itType, sf) of
|
itemBelowAttachables (itm,sf) = case (itm ^. itType, sf) of
|
||||||
(HELD LASER, WeaponTargetingSF) -> getAmmoLinks itm
|
(LASER, WeaponTargetingSF) -> getAmmoLinks itm
|
||||||
(HELD LASER, LaserWeaponSF) -> [PulseBallSF] <> getAmmoLinks itm
|
(LASER, LaserWeaponSF) -> [PulseBallSF] <> getAmmoLinks itm
|
||||||
(HELD LASER, PulseBallSF) -> [PulseBallSF]
|
(LASER, PulseBallSF) -> [PulseBallSF]
|
||||||
--(HELD LASER, _) -> [PulseBallSF]
|
--(HELD LASER, _) -> [PulseBallSF]
|
||||||
(HELD TORCH, _) -> getAmmoLinks itm
|
(HELD TORCH, _) -> getAmmoLinks itm
|
||||||
(ATTACH CAPACITOR, _) -> [AmmoMagSF 0 ElectricalAmmo]
|
(ATTACH CAPACITOR, _) -> [AmmoMagSF 0 ElectricalAmmo]
|
||||||
@@ -83,7 +83,7 @@ itemBelowAttachables (itm,sf) = case (itm ^. itType, sf) of
|
|||||||
|
|
||||||
getAutoSpringLinks :: Item -> [ItemSF]
|
getAutoSpringLinks :: Item -> [ItemSF]
|
||||||
getAutoSpringLinks itm = case baseItemTriggerType itm of
|
getAutoSpringLinks itm = case baseItemTriggerType itm of
|
||||||
HammerTrigger _ -> [MakeAutoSF]
|
SemiAutoTrigger _ -> [MakeAutoSF]
|
||||||
_ -> []
|
_ -> []
|
||||||
|
|
||||||
extraWeaponLinks :: Item -> [ItemSF]
|
extraWeaponLinks :: Item -> [ItemSF]
|
||||||
@@ -109,7 +109,7 @@ itemToFunction itm = case itm ^. itType of
|
|||||||
MAPPER -> MapperSF
|
MAPPER -> MapperSF
|
||||||
ITEMSCAN -> ToggleSF
|
ITEMSCAN -> ToggleSF
|
||||||
INTROSCAN {} -> IntroScanSF
|
INTROSCAN {} -> IntroScanSF
|
||||||
HELD LASER -> WeaponTargetingSF
|
LASER -> WeaponTargetingSF
|
||||||
HELD TORCH -> TorchSF
|
HELD TORCH -> TorchSF
|
||||||
HELD{} -> case itUseCondition itm of
|
HELD{} -> case itUseCondition itm of
|
||||||
UseableWhenAimed -> HeldPlatformSF
|
UseableWhenAimed -> HeldPlatformSF
|
||||||
@@ -146,7 +146,7 @@ treeToPotentialFunction ldt = case ldt ^. dtValue . _1 . itType of
|
|||||||
ATTACH GYROSCOPE -> S.singleton ProjectileStabiliserSF
|
ATTACH GYROSCOPE -> S.singleton ProjectileStabiliserSF
|
||||||
HELD GLAUNCHER -> S.singleton UnderBarrelPlatformSF
|
HELD GLAUNCHER -> S.singleton UnderBarrelPlatformSF
|
||||||
HELD BURSTRIFLE -> S.singleton UnderBarrelPlatformSF
|
HELD BURSTRIFLE -> S.singleton UnderBarrelPlatformSF
|
||||||
HELD LASER | sf == WeaponTargetingSF -> S.fromList [WeaponTargetingSF,LaserWeaponSF]
|
LASER | sf == WeaponTargetingSF -> S.fromList [WeaponTargetingSF,LaserWeaponSF]
|
||||||
-- following limits items to ten ammo slots
|
-- following limits items to ten ammo slots
|
||||||
_ | AmmoMagSF _ x <- ldt ^. dtValue . _2 -> S.fromList [AmmoMagSF i x | i <- [0..9]]
|
_ | AmmoMagSF _ x <- ldt ^. dtValue . _2 -> S.fromList [AmmoMagSF i x | i <- [0..9]]
|
||||||
ATTACH CAPACITOR -> S.fromList [CapacitorSF,PulseBallSF]
|
ATTACH CAPACITOR -> S.fromList [CapacitorSF,PulseBallSF]
|
||||||
@@ -167,7 +167,7 @@ leftIsParentCombine ltree rtree = do
|
|||||||
& dtValue %~ f
|
& dtValue %~ f
|
||||||
|
|
||||||
updateLeftParentSF :: ItemType -> ItemSF -> ItemSF -> ItemSF
|
updateLeftParentSF :: ItemType -> ItemSF -> ItemSF -> ItemSF
|
||||||
updateLeftParentSF (HELD LASER) WeaponTargetingSF TransformerSF = LaserWeaponSF
|
updateLeftParentSF LASER WeaponTargetingSF TransformerSF = LaserWeaponSF
|
||||||
updateLeftParentSF _ psf _ = psf
|
updateLeftParentSF _ psf _ = psf
|
||||||
|
|
||||||
rightIsParentCombine :: DTComb CItem
|
rightIsParentCombine :: DTComb CItem
|
||||||
@@ -178,7 +178,7 @@ rightIsParentCombine ltree rtree = do
|
|||||||
& dtValue %~ f
|
& dtValue %~ f
|
||||||
|
|
||||||
updateRightParentSF :: ItemType -> ItemSF -> ItemSF -> ItemSF
|
updateRightParentSF :: ItemType -> ItemSF -> ItemSF -> ItemSF
|
||||||
updateRightParentSF (HELD LASER) LaserWeaponSF CapacitorSF = PulseLaserSF
|
updateRightParentSF LASER LaserWeaponSF CapacitorSF = PulseLaserSF
|
||||||
updateRightParentSF _ psf _ = psf
|
updateRightParentSF _ psf _ = psf
|
||||||
|
|
||||||
leftChildList :: DTree CItem -> [ItemSF]
|
leftChildList :: DTree CItem -> [ItemSF]
|
||||||
|
|||||||
@@ -60,7 +60,6 @@ itemFromHeldType ht = case ht of
|
|||||||
BLOWTORCH -> blowTorch
|
BLOWTORCH -> blowTorch
|
||||||
SPARKGUN -> sparkGun
|
SPARKGUN -> sparkGun
|
||||||
TESLAGUN -> teslaGun
|
TESLAGUN -> teslaGun
|
||||||
LASER -> laser
|
|
||||||
-- LASCIRCLE -> lasCircle
|
-- LASCIRCLE -> lasCircle
|
||||||
-- DUALBEAM -> dualBeam
|
-- DUALBEAM -> dualBeam
|
||||||
-- LASWIDE i -> lasWide i
|
-- LASWIDE i -> lasWide i
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ laser =
|
|||||||
, _itTgID = Nothing
|
, _itTgID = Nothing
|
||||||
, _itTgActive = False
|
, _itTgActive = False
|
||||||
}
|
}
|
||||||
& itType .~ HELD LASER
|
& itType .~ LASER
|
||||||
|
|
||||||
-- previous attractionPower values: 1, -1, -10, 0
|
-- previous attractionPower values: 1, -1, -10, 0
|
||||||
tractorGun :: Item
|
tractorGun :: Item
|
||||||
|
|||||||
@@ -83,6 +83,7 @@ twoFlatHRot = (2 *) . strideRot
|
|||||||
handlePos :: Item -> Point2
|
handlePos :: Item -> Point2
|
||||||
handlePos itm = case itm ^. itType of
|
handlePos itm = case itm ^. itType of
|
||||||
HELD hit -> heldHandlePos hit
|
HELD hit -> heldHandlePos hit
|
||||||
|
LASER -> V2 3 0
|
||||||
_ -> 0
|
_ -> 0
|
||||||
|
|
||||||
heldHandlePos :: HeldItemType -> Point2
|
heldHandlePos :: HeldItemType -> Point2
|
||||||
@@ -116,7 +117,6 @@ heldHandlePos = \case
|
|||||||
BLOWTORCH -> V2 3 0
|
BLOWTORCH -> V2 3 0
|
||||||
SPARKGUN -> V2 3 0
|
SPARKGUN -> V2 3 0
|
||||||
TESLAGUN -> V2 3 0
|
TESLAGUN -> V2 3 0
|
||||||
LASER -> V2 3 0
|
|
||||||
TRACTORGUN -> V2 3 0
|
TRACTORGUN -> V2 3 0
|
||||||
RLAUNCHER -> V2 3 0
|
RLAUNCHER -> V2 3 0
|
||||||
RLAUNCHERX{} -> V2 3 0
|
RLAUNCHERX{} -> V2 3 0
|
||||||
|
|||||||
@@ -43,6 +43,7 @@ itmBaseInfo itm = case itm ^. itType of
|
|||||||
-- INTROSCAN {_ibtIntroScanType :: IntroScanType}
|
-- INTROSCAN {_ibtIntroScanType :: IntroScanType}
|
||||||
-- DETECTOR {_ibtDetector :: Detector}
|
-- DETECTOR {_ibtDetector :: Detector}
|
||||||
-- ARHUD
|
-- ARHUD
|
||||||
|
LASER -> "A device that, when electrically powered, continuously emits photons in a narrow beam. It can be modified with a transformer to emit a damaging beam, and further with a capacitor to emit pulses of energy."
|
||||||
_ -> "THIS SHOULD NOT BE DISPLAYED"
|
_ -> "THIS SHOULD NOT BE DISPLAYED"
|
||||||
|
|
||||||
ammoMagInfo :: AmmoMagType -> String
|
ammoMagInfo :: AmmoMagType -> String
|
||||||
@@ -68,6 +69,7 @@ attachInfo = \case
|
|||||||
-- HOMINGMODULE
|
-- HOMINGMODULE
|
||||||
-- AUGMENTEDHUD
|
-- AUGMENTEDHUD
|
||||||
-- SHELLPAYLOAD {}
|
-- SHELLPAYLOAD {}
|
||||||
|
CAPACITOR -> "A device that stores electrical energy."
|
||||||
_ -> "INCOMPLETE, TODO FINISH"
|
_ -> "INCOMPLETE, TODO FINISH"
|
||||||
|
|
||||||
showInt :: Int -> String
|
showInt :: Int -> String
|
||||||
@@ -121,7 +123,6 @@ heldInfo hit = case hit of
|
|||||||
BLOWTORCH -> "A weapon that produces a concentrated flame."
|
BLOWTORCH -> "A weapon that produces a concentrated flame."
|
||||||
SPARKGUN -> "A weapon that produces an arc of electricity. The arc will attempt to discharge at a nearby object."
|
SPARKGUN -> "A weapon that produces an arc of electricity. The arc will attempt to discharge at a nearby object."
|
||||||
TESLAGUN -> "A weapon that discharges a sustained arc of electricity. The arc will attempt to discharge at a nearby object."
|
TESLAGUN -> "A weapon that discharges a sustained arc of electricity. The arc will attempt to discharge at a nearby object."
|
||||||
LASER -> "A device that, when electrically powered, continuously emits photons in a narrow beam."
|
|
||||||
TRACTORGUN -> "An item that produces a beam of gravitons."
|
TRACTORGUN -> "An item that produces a beam of gravitons."
|
||||||
GLAUNCHER -> "A large tube that can launch projectiles."
|
GLAUNCHER -> "A large tube that can launch projectiles."
|
||||||
RLAUNCHER -> "A large tube that can launch self propelled projectiles. Moving the tube after launch will cause the projectile to spin."
|
RLAUNCHER -> "A large tube that can launch self propelled projectiles. Moving the tube after launch will cause the projectile to spin."
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ itInvHeight x = case x ^. itType of
|
|||||||
itDim :: Item -> ItemDimension
|
itDim :: Item -> ItemDimension
|
||||||
itDim x = case x ^. itType of
|
itDim x = case x ^. itType of
|
||||||
HELD TESLAGUN -> ItemDimension 9 (V3 4 0 0) (V3 10 (-5) 3)
|
HELD TESLAGUN -> ItemDimension 9 (V3 4 0 0) (V3 10 (-5) 3)
|
||||||
HELD LASER -> did & dimRad .~ 10
|
LASER -> did & dimRad .~ 10
|
||||||
& dimCenter .~ V3 15 0 0
|
& dimCenter .~ V3 15 0 0
|
||||||
HELD TRACTORGUN -> did & dimRad .~ 10
|
HELD TRACTORGUN -> did & dimRad .~ 10
|
||||||
& dimCenter .~ V3 15 0 0
|
& dimCenter .~ V3 15 0 0
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ orientChild :: Item -> Point3Q
|
|||||||
orientChild itm = case _itType itm of
|
orientChild itm = case _itType itm of
|
||||||
HELD TORCH -> (V3 0 5 0, Q.qID)
|
HELD TORCH -> (V3 0 5 0, Q.qID)
|
||||||
--HELD LASER -> (V3 15 (-5) 0, Q.qID)
|
--HELD LASER -> (V3 15 (-5) 0, Q.qID)
|
||||||
HELD LASER -> (V3 15 (-5) 0, Q.qID)
|
LASER -> (V3 15 (-5) 0, Q.qID)
|
||||||
ATTACH UNDERBARRELSLOT -> (V3 10 (-8) 0, r)
|
ATTACH UNDERBARRELSLOT -> (V3 10 (-8) 0, r)
|
||||||
_ -> (0, Q.qID)
|
_ -> (0, Q.qID)
|
||||||
where
|
where
|
||||||
|
|||||||
@@ -24,11 +24,11 @@ lockRoomMultiItems =
|
|||||||
|
|
||||||
lockRoomKeyItems :: RandomGen g => [(Int -> State g (MetaTree Room String), State g ItemType)]
|
lockRoomKeyItems :: RandomGen g => [(Int -> State g (MetaTree Room String), State g ItemType)]
|
||||||
lockRoomKeyItems =
|
lockRoomKeyItems =
|
||||||
[ (lasCenSensEdge, takeOne [HELD RLAUNCHER, HELD LASER, HELD SPARKGUN, HELD FLATSHIELD])
|
[ (lasCenSensEdge, takeOne [HELD RLAUNCHER, LASER, HELD SPARKGUN, HELD FLATSHIELD])
|
||||||
, (sensorRoomRunPast LaserSensor, return $ HELD LASER)
|
, (sensorRoomRunPast LaserSensor, return LASER)
|
||||||
, (const slowDoorRoomRunPast, return $ HELD (MINIGUNX 3))
|
, (const slowDoorRoomRunPast, return $ HELD (MINIGUNX 3))
|
||||||
, (const longRoomRunPast, takeOne [HELD SNIPERRIFLE, HELD FLATSHIELD])
|
, (const longRoomRunPast, takeOne [HELD SNIPERRIFLE, HELD FLATSHIELD])
|
||||||
, (const glassLessonRunPast, takeOne [HELD LASER])
|
, (const glassLessonRunPast, takeOne [LASER])
|
||||||
, (const $ lasTunnelRunPast 400, takeOne [HELD FLATSHIELD])
|
, (const $ lasTunnelRunPast 400, takeOne [HELD FLATSHIELD])
|
||||||
, (keyCardRoomRunPast 0, return (HELD $ KEYCARD 0))
|
, (keyCardRoomRunPast 0, return (HELD $ KEYCARD 0))
|
||||||
]
|
]
|
||||||
@@ -55,7 +55,7 @@ itemRooms =
|
|||||||
]
|
]
|
||||||
)
|
)
|
||||||
,
|
,
|
||||||
( HELD LASER
|
( LASER
|
||||||
, join $
|
, join $
|
||||||
takeOne
|
takeOne
|
||||||
[ rc $ map makeTypeCraft [PRISM, TRANSFORMER, PIPE]
|
[ rc $ map makeTypeCraft [PRISM, TRANSFORMER, PIPE]
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ mcUseItem :: Machine -> World -> World
|
|||||||
mcUseItem mc = fromMaybe id $ do
|
mcUseItem mc = fromMaybe id $ do
|
||||||
tu <- mc ^? mcType . _McTurret
|
tu <- mc ^? mcType . _McTurret
|
||||||
let it = tu ^. tuWeapon
|
let it = tu ^. tuWeapon
|
||||||
hit <- it ^? itType . ibtHeld
|
hit <- it ^? itType
|
||||||
guard (_tuFireTime tu > 0)
|
guard (_tuFireTime tu > 0)
|
||||||
return $ mcUseHeld hit it mc
|
return $ mcUseHeld hit it mc
|
||||||
|
|
||||||
|
|||||||
@@ -135,6 +135,7 @@ moveZoomCamera cfig theinput cr w campos =
|
|||||||
getAimZoom :: Item -> Float
|
getAimZoom :: Item -> Float
|
||||||
getAimZoom itm = case itm ^. itType of
|
getAimZoom itm = case itm ^. itType of
|
||||||
HELD hit -> heldAimZoom hit
|
HELD hit -> heldAimZoom hit
|
||||||
|
LASER -> 1.5
|
||||||
_ -> 1
|
_ -> 1
|
||||||
|
|
||||||
heldAimZoom :: HeldItemType -> Float
|
heldAimZoom :: HeldItemType -> Float
|
||||||
@@ -168,7 +169,6 @@ heldAimZoom = \case
|
|||||||
BLOWTORCH -> 1
|
BLOWTORCH -> 1
|
||||||
SPARKGUN -> 1
|
SPARKGUN -> 1
|
||||||
TESLAGUN -> 1.5
|
TESLAGUN -> 1.5
|
||||||
LASER -> 1.5
|
|
||||||
TRACTORGUN -> 1.5
|
TRACTORGUN -> 1.5
|
||||||
RLAUNCHER -> 1.5
|
RLAUNCHER -> 1.5
|
||||||
RLAUNCHERX{} -> 1.5
|
RLAUNCHERX{} -> 1.5
|
||||||
|
|||||||
Reference in New Issue
Block a user