Use constructed laser as targeting scope

This commit is contained in:
2024-10-08 15:53:03 +01:00
parent da5a895f24
commit 9679f32618
21 changed files with 196 additions and 157 deletions
+1 -1
View File
@@ -1 +1 @@
All good (597 modules, at 10:47:27)
All good (597 modules, at 15:48:24)
+1 -1
View File
@@ -58,7 +58,7 @@ digraph {
73 [shape=box
,label="HELD {_ibtHeld = FLAMETORRENT}"];
75 [shape=box
,label="HELD {_ibtHeld = LASGUN}"];
,label="HELD {_ibtHeld = LASER}"];
79 [shape=box
,label="HELD {_ibtHeld = SPARKGUN}"];
81 [shape=box
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -86,7 +86,7 @@ itemCombinations =
, po [HELD FLAMESPITTER, cr STEELDRUM] flameThrower
, po [HELD FLAMETHROWER, cr STEELDRUM] flameWall
, po [HELD FLAMETHROWER, cr PUMP] flameTorrent
, p [o $ cr PRISM, o $ cr TRANSFORMER, o $ cr PIPE] lasGun
, p [o $ cr PRISM, o $ cr TRANSFORMER, o $ cr PIPE] laser
-- , po [HELD LASGUN, HELD LASGUN, cr HARDWARE] dualBeam
-- , po [HELD LASGUN, cr TRANSFORMER] (lasWide 2)
-- , po [HELD LASGUN, HELD LASGUN, HELD LASGUN, cr HARDWARE] lasCircle
+4 -4
View File
@@ -201,8 +201,8 @@ inventoryX c = case c of
, makeTypeCraftNum 2 MICROCHIP
]
'J' ->
[ lasGun
, lasGun
[ laser
, battery
--, dualBeam
] <> makeTypeCraftNum 10 TRANSFORMER
'K' ->
@@ -282,13 +282,13 @@ testInventory =
stackedInventory :: [Item]
stackedInventory =
[ torch
, battery
, smallBattery
, remoteScreen
, megaShellMag
, targetingScope TARGETLASER
, burstRifle
, megaTinMag 100
, lasGun
, laser
, makeTypeCraft TRANSFORMER
, teslaGun
, megaBattery
+9 -6
View File
@@ -196,14 +196,15 @@ updateItemWithOrientation ::
LocationLDT ItemLink ComposedItem ->
World ->
World
updateItemWithOrientation cr m loc@(LocLDT _ itmtree) = case _itType itm of
HELD TORCH -> shineTorch cr itmtree m
TARGETING TARGETLASER -> shineTargetLaser cr itmtree m
TARGETING tt -> updateItemTargeting tt cr itm
ATTACH AUGMENTEDHUD -> drawAugmentedHUD loc
updateItemWithOrientation cr m loc@(LocLDT _ itmtree) = case (ci ^. cItem . itType, ci ^. cItemFunction) of
(HELD TORCH, _) -> shineTorch cr itmtree m
(HELD LASER, WeaponTargetingSF) -> shineTargetLaser cr itmtree m
(TARGETING tt, _) -> updateItemTargeting tt cr itm
(ATTACH AUGMENTEDHUD, _) -> drawAugmentedHUD loc
_ -> id
where
itm = itmtree ^. ldtValue . cItem
ci = itmtree ^. ldtValue
itm = ci ^. cItem
drawAugmentedHUD :: LocationLDT ItemLink ComposedItem -> World -> World
drawAugmentedHUD (LocLDT con _) w = fromMaybe w $ do
@@ -219,6 +220,7 @@ shineTargetLaser cr itmtree (p,q) w = fromMaybe (w & pointittarg . itTgPos .~ No
guard $ i >= x
maginvid <- mag ^? ldtValue . cItem . itLocation . ilInvID
return $ w
& worldEventFlags . at InventoryChange ?~ ()
& cWorld . lWorld . creatures . ix (_crID cr)
. crInv . ix maginvid . itUse . amagLoadStatus . iaLoaded -~ x
& cWorld . lWorld . lasers .:~ LaserStart
@@ -245,6 +247,7 @@ shineTorch :: Creature -> LabelDoubleTree ItemLink ComposedItem -> (Point3, Q.Qu
shineTorch cr itmtree (p, q) = fromMaybe id $ do
(_, mag) <- find (isammolink . _iatType . fst) (itmtree ^. ldtLeft)
i <- mag ^? ldtValue . cItem . itUse . amagLoadStatus . iaLoaded
guard $ crIsAiming cr
guard $ i >= x
invid <- mag ^? ldtValue . cItem . itLocation . ilInvID
return $
+1 -1
View File
@@ -152,7 +152,7 @@ data HeldItemType
| BLOWTORCH
| SPARKGUN
| TESLAGUN
| LASGUN
| LASER
| TRACTORGUN
| LAUNCHER
| LAUNCHERX {_xNum :: Int}
+1 -1
View File
@@ -400,7 +400,7 @@ makeBullet thebullet itm cr mz w =
mcUseHeld :: HeldItemType -> Item -> Machine -> World -> World
mcUseHeld hit = case hit of
LASGUN -> mcShootLaser
LASER -> mcShootLaser
_ -> \_ _ -> id
--useHeld :: Huse -> LabelDoubleTree ComposeLinkType Item -> Creature -> World -> World
+39 -40
View File
@@ -1,22 +1,20 @@
module Dodge.Inventory.Location
(updateRootItemID
, crUpdateItemLocations
, setInvPosFromSS
-- , tryGetRootItemInvID
)
where
module Dodge.Inventory.Location (
updateRootItemID,
crUpdateItemLocations,
setInvPosFromSS,
) where
import NewInt
import qualified Data.IntSet as IS
import Dodge.Base.You
import Dodge.Data.SelectionList
import Dodge.Data.Item.Use.Consumption.LoadAction
import Control.Lens
import Dodge.Data.World
import qualified IntMapHelp as IM
import Dodge.Item.Grammar
import Data.Maybe
import Control.Applicative
import Control.Lens
import qualified Data.IntSet as IS
import Data.Maybe
import Dodge.Base.You
import Dodge.Data.Item.Use.Consumption.LoadAction
import Dodge.Data.SelectionList
import Dodge.Data.World
import Dodge.Item.Grammar
import qualified IntMapHelp as IM
import NewInt
-- assumes all item locations inside the items are correct
tryGetRootAttachedFromInvID :: Int -> IM.IntMap Item -> Maybe (Int, IS.IntSet)
@@ -24,16 +22,14 @@ tryGetRootAttachedFromInvID invid im = do
let imroots = invRootMap im
theroot = fromMaybe invid $ imroots ^? ix invid . _1 . _Just
t <- imroots ^? ix theroot . _2
--return (theroot, foldMap (IS.singleton . (^?! _1 . itLocation . ilInvID)) t)
return (theroot, foldMap (IS.singleton . (^?! itLocation . ilInvID)) t)
-- this assumes the creature inventory is well formed, specifically the
-- location ids
-- this assumes the creature inventory is well formed, specifically the
-- location ids
tryGetRootItemInvID :: Int -> Creature -> Maybe Int
tryGetRootItemInvID i cr = do
let adj = case invAdj (_crInv cr) of
Left str -> error $ "tryToGetRootItemInvID: "++ str
Left str -> error $ "tryToGetRootItemInvID: " ++ str
Right x -> x
theroot <- adj ^? ix i
theroot ^? _1 . _Just . _1 <|> Just i
@@ -46,24 +42,26 @@ updateRootItemID cr = fromMaybe cr $ do
-- the following assumes that the crManipulation is correct
crUpdateItemLocations :: Int -> LWorld -> LWorld
crUpdateItemLocations crid lw = fromMaybe lw $ do
crUpdateItemLocations crid lw = fromMaybe lw $ do
mo <- lw ^? creatures . ix crid . crManipulation . manObject
crinv <- lw ^? creatures . ix crid . crInv
return $ IM.foldlWithKey' (crUpdateInvidLocations mo crid) lw crinv
crUpdateInvidLocations :: ManipulatedObject -> Int -> LWorld -> Int -> Item -> LWorld
crUpdateInvidLocations mo crid lw invid itm = lw
& creatures . ix crid . crInv . ix invid . itLocation .~ newloc
& itemLocations %~ IM.insert itid newloc
crUpdateInvidLocations mo crid lw invid itm =
lw
& creatures . ix crid . crInv . ix invid . itLocation .~ newloc
& itemLocations %~ IM.insert itid newloc
where
itid = itm ^. itID . unNInt
newloc = InInv
{ _ilCrID = crid
, _ilInvID = invid
, _ilIsRoot = Just invid == mo ^? imRootItem
, _ilIsSelected = Just invid == mo ^? imSelectedItem
, _ilIsAttached = invid `IS.member` (mo ^. imAttachedItems)
}
newloc =
InInv
{ _ilCrID = crid
, _ilInvID = invid
, _ilIsRoot = Just invid == mo ^? imRootItem
, _ilIsSelected = Just invid == mo ^? imSelectedItem
, _ilIsAttached = invid `IS.member` (mo ^. imAttachedItems)
}
-- this should be looked at, as it is sometimes used in functions that need not
-- concern the player creature
@@ -78,13 +76,14 @@ setInvPosFromSS w =
(i, j) <- sss ^? sssExtra . sssSelPos . _Just
case i of
(-1) -> Just SortInventory
0 -> do
(rootid,aset) <- tryGetRootAttachedFromInvID j (you w ^. crInv)
return SelectedItem
{ _imSelectedItem = j
, _imRootItem = rootid
, _imAttachedItems = aset
}
0 -> do
(rootid, aset) <- tryGetRootAttachedFromInvID j (you w ^. crInv)
return
SelectedItem
{ _imSelectedItem = j
, _imRootItem = rootid
, _imAttachedItems = aset
}
1 -> Just SelNothing
2 -> Just SortNearby
3 -> Just $ SelCloseObject j
+35 -13
View File
@@ -1,14 +1,26 @@
module Dodge.Item.Ammo
where
module Dodge.Item.Ammo (
drumMag,
tinMag,
beltMag,
shellMag,
battery,
smallBattery,
chemFuelPouch,
bulletSynthesizer,
megaShellMag,
megaTinMag,
megaBattery,
) where
import Dodge.Item.Attach
import Control.Lens
import Dodge.Data.World
import Dodge.Default.Item
import Dodge.Item.Attach
import Dodge.Item.Weapon.Bullet
megaTinMag :: Int -> Item
megaTinMag x = tinMag
megaTinMag x =
tinMag
& itUse . amagLoadStatus . iaMax .~ x
& itUse . amagLoadStatus . iaLoaded .~ x
@@ -47,7 +59,8 @@ beltMag =
& itUse . amagType .~ BeltBulletAmmo
megaShellMag :: Item
megaShellMag = shellMag
megaShellMag =
shellMag
& itUse . amagLoadStatus . iaMax .~ 1000000
& itUse . amagLoadStatus . iaLoaded .~ 1000000
@@ -56,9 +69,10 @@ shellMag =
defaultHeldItem & itType .~ AMMOMAG SHELLMAG
& itUse
.~ UseAmmoMag
{ _amagParams = ProjectileParams
{ _ampPayload = ExplosionPayload
}
{ _amagParams =
ProjectileParams
{ _ampPayload = ExplosionPayload
}
, _amagLoadStatus =
ReloadStatus
{ _iaMax = 1
@@ -66,10 +80,18 @@ shellMag =
}
, _amagType = ProjectileAmmo
}
megaBattery :: Item
megaBattery = battery
& itUse . amagLoadStatus . iaMax .~ 1000000
& itUse . amagLoadStatus . iaLoaded .~ 1000000
megaBattery =
battery
& itUse . amagLoadStatus . iaMax .~ 1000000
& itUse . amagLoadStatus . iaLoaded .~ 1000000
smallBattery :: Item
smallBattery =
battery
& itUse . amagLoadStatus . iaMax .~ 999
& itUse . amagLoadStatus . iaLoaded .~ 999
battery :: Item
battery =
@@ -80,8 +102,8 @@ battery =
, _amagType = ElectricalAmmo
, _amagLoadStatus =
ReloadStatus
{ _iaMax = 10^ (9::Int)
, _iaLoaded = 10^ (9::Int)
{ _iaMax = 10 ^ (9 :: Int)
, _iaLoaded = 10 ^ (9 :: Int)
}
}
+9 -9
View File
@@ -200,7 +200,7 @@ heldItemSPic ht it = case ht of
BLOWTORCH -> flamerPic it
SPARKGUN -> teslaGunPic
TESLAGUN -> teslaGunPic
LASGUN -> lasGunPic it
LASER -> lasGunPic it
TRACTORGUN -> tractorGunPic it
LAUNCHER -> launcherPic it
LAUNCHERX _ -> launcherPic it
@@ -349,14 +349,14 @@ teslaGunPic :: SPic
teslaGunPic = shatterGunSPic
lasGunPic :: Item -> SPic
lasGunPic _ =
colorSH
blue
( upperBoxST 4 (rectNSWE 3 1 0 30)
<> upperBoxSU 4 (rectNSWE (-1) (-3) 0 30)
<> upperBoxSU 1 (rectNSWE 3 (-3) 0 30)
)
:!: mempty
lasGunPic _ = noPic $ colorSH blue $ upperPrismPolyST 3 $ square 4
-- colorSH
-- blue
-- ( upperBoxST 4 (rectNSWE 3 1 0 30)
-- <> upperBoxSU 4 (rectNSWE (-1) (-3) 0 30)
-- <> upperBoxSU 1 (rectNSWE 3 (-3) 0 30)
-- )
-- :!: mempty
--dualBeamPic :: Item -> SPic
--dualBeamPic it =
+9 -23
View File
@@ -1,7 +1,6 @@
module Dodge.Item.Grammar (
invLDT,
invTrees,
invIndentIM,
invAdj,
invRootMap,
invRootTrees,
@@ -89,7 +88,7 @@ pciToCI (x,y,_) = CItem x y
basePCI :: Item -> PartiallyComposedItem
basePCI itm = case _itType itm of
HELD LASGUN -> (itm, WeaponScopeSF, laserLinkTest itm)
HELD LASER -> (itm, WeaponTargetingSF, laserLinkTest itm)
_ -> (itm, itemToFunction itm, uncurry useBreakL $ itemToBreakLists itm)
laserLinkTest :: Item -> LinkTest
@@ -181,13 +180,6 @@ invAdj im = do
Right
$ itm ^? itLocation . ilInvID
invIndentIM :: IM.IntMap Item -> IM.IntMap (Item, Int, LabelDoubleTreeNodeType ComposeLinkType)
invIndentIM =
IM.fromDistinctAscList . zip [0 ..] . reverse . map (over _1 (^. _1))
. concatMap ldtToIndentList
. map (bimap _iatType (\(x, y, _) -> (x, y)))
. invLDT
-- returns an intmap with trees for all items
invTrees :: IM.IntMap Item -> IM.IntMap (LabelDoubleTree ComposeLinkType Item)
invTrees = fmap (first _iatType) . invTrees'
@@ -200,23 +192,17 @@ invTrees' = IM.unions . map (ldtToIM getindex . fmap (^. _1)) . map (fmap (\(x,
fromMaybe (error "in invTrees try to get non-inventory item tree") $
i ^? itLocation . ilInvID
-- returns an intmap with trees for all items
--invTrees'' :: IM.IntMap Item -> [LocationLDT ItemLink ComposedItem]
allInvLocs :: IM.IntMap Item -> IM.IntMap (Int,LocationLDT ItemLink ComposedItem)
allInvLocs inv = foldMap (f . LocLDT TopLDT) (IM.elems (invRootTrees inv)) mempty
where
f t = cldtPropagateFold h h g 0 t id
h x _ _ _ = x + 1
g x ldt = (.) (IM.insert (ldt ^?! locLDT . ldtValue . cItem . itLocation . ilInvID) (x,ldt))
--invTrees'' = IM.unions . map (f . LocLDT TopLDT) . IM.elems . invRootTrees
-- where
-- f t = cldtPropagateFold h h g 0 t mempty
-- h x _ _ _ = x + 1
-- g x ldt = IM.insert (ldt ^?! locLDT . ldtValue . cItem . itLocation . ilInvID) (x,ldt)
-- returns an intmap with trees for root items, indexed by inventory position
invRootTrees :: IM.IntMap Item -> IM.IntMap (LabelDoubleTree ItemLink ComposedItem)
invRootTrees = IM.fromDistinctAscList . reverse . map (getid . fmap (\(x, y, _) -> CItem x y)) . invLDT
where
getid :: LabelDoubleTree ItemLink ComposedItem -> (Int,LabelDoubleTree ItemLink ComposedItem)
getid t = (t ^?! ldtValue . cItem . itLocation . ilInvID, t)
-- returns an intmap with indents and locations for all items
allInvLocs :: IM.IntMap Item -> IM.IntMap (Int,LocationLDT ItemLink ComposedItem)
allInvLocs inv = foldMap (f . LocLDT TopLDT) (IM.elems (invRootTrees inv)) mempty
where
f t = cldtPropagateFold h h g 0 t id
h x _ _ _ = x + 1
g x ldt = (.) (IM.insert (ldt ^?! locLDT . ldtValue . cItem . itLocation . ilInvID) (x,ldt))
+1 -1
View File
@@ -54,7 +54,7 @@ itemFromHeldType ht = case ht of
BLOWTORCH -> blowTorch
SPARKGUN -> sparkGun
TESLAGUN -> teslaGun
LASGUN -> lasGun
LASER -> laser
-- LASCIRCLE -> lasCircle
-- DUALBEAM -> dualBeam
-- LASWIDE i -> lasWide i
+19 -7
View File
@@ -1,7 +1,7 @@
module Dodge.Item.Held.BatteryGuns
( sparkGun
, teslaGun
, lasGun
, laser
, tractorGun
) where
@@ -37,14 +37,14 @@ teslaGun =
& itUse . heldTriggerType .~ AutoTrigger
-- previous phaseV parameters: 0.2, 1, 5
lasGun :: Item
lasGun =
laser :: Item
laser =
defaultHeldItem
& itUse . heldParams .~ BeamShooterParams (Just (tone440sawtoothquietS,2))
& itAmmoSlots .~ singleAmmo ElectricalAmmo
& itUse . heldDelay .~ NoDelay
& itUse . heldTriggerType .~ AutoTrigger
& itUse . heldAim . aimMuzzles . ix 0 . mzPos .~ V2 30 0
& itUse . heldAim . aimMuzzles . ix 0 . mzPos .~ V2 4 0
& itUse . heldAim . aimMuzzles . ix 0 . mzInaccuracy .~ 0
& itUse . heldAim . aimMuzzles . ix 0 . mzFlareType .~ LasGunFlare
& itUse . heldAim . aimMuzzles . ix 0 . mzEffect .~ MuzzleLaser
@@ -58,15 +58,27 @@ lasGun =
& itUse . heldAim . aimWeight .~ 6
& itUse . heldAim . aimRange .~ 1
& itUse . heldAim . aimStance .~ TwoHandUnder
& itType .~ HELD LASGUN
& itType .~ HELD LASER
-- previous attractionPower values: 1, -1, -10, 0
tractorGun :: Item
tractorGun =
lasGun
& itUse . heldDelay .~ NoDelay
defaultHeldItem
& itUse . heldParams .~ BeamShooterParams (Just (tone440sawtoothquietS,2))
& itAmmoSlots .~ singleAmmo ElectricalAmmo
& itUse . heldTriggerType .~ AutoTrigger
& itUse . heldAim . aimMuzzles . ix 0 . mzPos .~ V2 30 0
& itUse . heldAim . aimMuzzles . ix 0 . mzInaccuracy .~ 0
& itTargeting .~ ItTargeting
{ _itTgPos = Nothing
, _itTgID = Nothing
, _itTgActive = False
}
& itDimension . dimRad .~ 10
& itDimension . dimCenter .~ V3 15 0 0
& itUse . heldAim . aimWeight .~ 6
& itUse . heldAim . aimRange .~ 1
& itUse . heldAim . aimStance .~ TwoHandUnder
& itUse . heldAim . aimMuzzles . ix 0 . mzFlareType .~ DefaultFlareType
& itUse . heldAim . aimMuzzles . ix 0 . mzEffect .~ MuzzleTractor
& itType .~ HELD TRACTORGUN
+1 -4
View File
@@ -76,10 +76,7 @@ heldInfo hit = case hit of
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."
TESLAGUN -> "A weapon that discharges a sustained arc of electricity. The arc will attempt to discharge at a nearby object."
LASGUN -> "A weapon that continuously emits photons in a narrow beam."
-- LASCIRCLE -> "A extensive configuration of prisms and mirrors that produces multiple laser beams around its user."
-- DUALBEAM -> "A weapon that emits two beams that converge at a selectable point in front of the user."
-- LASWIDE _ -> "A weapon that continuously emits photons in a narrow beam. The beam expands as the weapon heats up."
LASER -> "A device that, when electrically powered, continuously emits photons in a narrow beam."
TRACTORGUN -> "An item that produces a beam of gravitons."
LAUNCHER -> "A large tube that can launch self propelled projectiles. Moving the tube after launch will cause the projectile to spin."
LAUNCHERX i -> over _head toUpper (showInt i) ++ " tubes that can launch self propelled projectiles. Tubes that do not face forward launch their projecitles at an angle."
+22 -1
View File
@@ -1,7 +1,9 @@
{-# LANGUAGE LambdaCase#-}
module Dodge.Item.InventoryColor
( itemInvColor
) where
--import Dodge.Data.Item.Use.Consumption.Ammo
import Dodge.Data.ComposedItem
import Color
import Control.Lens
@@ -9,7 +11,26 @@ import Control.Lens
itemInvColor :: ComposedItem -> Color
itemInvColor ci = case ci ^. cItemFunction of
WeaponPlatformSF -> white
_ -> greyN 0.8
WeaponScopeSF -> chartreuse
WeaponTargetingSF -> green
AugmentedHUDSF -> rose
AmmoMagSF {} -> red
RemoteScreenSF -> azure
UncomposableIsolateSF -> greyN 0.5
AmmoModifierSF {} -> orange
AmmoTargetingSF {} -> green
AmmoPayloadSF {} -> violet
AmmoEffectSF {} -> aquamarine
FunctionChangeSF -> yellow
--ammoTypeColor :: AmmoType -> Color
--ammoTypeColor = \case
-- BulletAmmo -> white
-- ProjectileAmmo -> red
-- BeltBulletAmmo -> orange
-- ElectricalAmmo -> blue
-- GasAmmo -> green
-- HELD {} -> white
-- LEFT {} -> cyan
-- EQUIP {} -> yellow
+1
View File
@@ -11,6 +11,7 @@ orientChild :: Item -> (Point3, Q.Quaternion Float)
orientChild itm = case _itType itm of
HELD TORCH -> (V3 0 5 0, Q.qID)
TARGETING TARGETLASER -> (V3 15 (-5) 0, Q.qID)
HELD LASER -> (V3 15 (-5) 0, Q.qID)
_ -> (0, Q.qID)
orientByLink :: Item -> ComposeLinkType -> (Point3, Q.Quaternion Float)
+4 -4
View File
@@ -24,11 +24,11 @@ lockRoomMultiItems =
lockRoomKeyItems :: RandomGen g => [(Int -> State g (MetaTree Room String), State g ItemType)]
lockRoomKeyItems =
[ (lasCenSensEdge, takeOne [HELD LAUNCHER, HELD LASGUN, HELD SPARKGUN, HELD FLATSHIELD])
, (sensorRoomRunPast LASERING, return $ HELD LASGUN)
[ (lasCenSensEdge, takeOne [HELD LAUNCHER, HELD LASER, HELD SPARKGUN, HELD FLATSHIELD])
, (sensorRoomRunPast LASERING, return $ HELD LASER)
, (const slowDoorRoomRunPast, return $ HELD (MINIGUNX 3))
, (const longRoomRunPast, takeOne [HELD SNIPERRIFLE, HELD FLATSHIELD])
, (const glassLessonRunPast, takeOne [HELD LASGUN])
, (const glassLessonRunPast, takeOne [HELD LASER])
, (const $ lasTunnelRunPast 400, takeOne [HELD FLATSHIELD])
, (keyCardRoomRunPast 0, return (HELD $ KEYCARD 0))
]
@@ -55,7 +55,7 @@ itemRooms =
]
)
,
( HELD LASGUN
( HELD LASER
, join $
takeOne
[ rc $ map makeTypeCraft [PRISM, TRANSFORMER, PIPE]
+1 -1
View File
@@ -23,7 +23,7 @@ putLasTurret rotSpeed =
lasTurret :: MachineType
lasTurret = McTurret $
Turret
{ _tuWeapon = lasGun
{ _tuWeapon = laser
, -- { _tuWeapon = autoRifle
_tuTurnSpeed = 0.1
, _tuFireTime = 0
+1 -1
View File
@@ -12,4 +12,4 @@ randFirstWeapon =
++ replicate 5 (bangStick 4)
++ replicate 5 (volleyGun 3)
++ replicate 5 bangCone
++ [lasGun]
++ [laser]
+35 -37
View File
@@ -332,7 +332,7 @@ Combinations src/Dodge/Combine/Combinations.hs 3;" m
Combine src/Dodge/Combine.hs 2;" m
Combine src/Dodge/Data/Combine.hs 2;" m
Combine src/Dodge/Data/Item/Combine.hs 6;" m
CombineInventory src/Dodge/Data/HUD.hs 26;" C
CombineInventory src/Dodge/Data/HUD.hs 25;" C
CombineInventoryChange src/Dodge/Data/World.hs 34;" C
Common src/Dodge/Zoning/Common.hs 1;" m
Compile src/Shader/Compile.hs 1;" m
@@ -508,10 +508,10 @@ Detector src/Dodge/Data/Item/Combine.hs 168;" t
Dirt src/Dodge/Data/Material.hs 11;" C
DisasterType src/Dodge/Data/Scenario.hs 24;" t
Display src/Dodge/Item/Display.hs 1;" m
DisplayCarte src/Dodge/Data/HUD.hs 21;" C
DisplayInventory src/Dodge/Data/HUD.hs 17;" C
DisplayCarte src/Dodge/Data/HUD.hs 20;" C
DisplayInventory src/Dodge/Data/HUD.hs 16;" C
DisplayInventory src/Dodge/DisplayInventory.hs 5;" m
DisplayTerminal src/Dodge/Data/HUD.hs 31;" C
DisplayTerminal src/Dodge/Data/HUD.hs 27;" C
Distortion src/Dodge/Data/Distortion.hs 12;" t
Distortion src/Dodge/Data/Distortion.hs 6;" m
Distortion src/Dodge/Distortion.hs 1;" m
@@ -655,7 +655,7 @@ Euse src/Dodge/Data/Item/HeldUse.hs 20;" t
Euse src/Dodge/Euse.hs 1;" m
Event src/Dodge/Button/Event.hs 1;" m
Event src/Dodge/Event.hs 14;" m
ExamineInventory src/Dodge/Data/HUD.hs 25;" C
ExamineInventory src/Dodge/Data/HUD.hs 24;" C
Explore src/Dodge/Data/Scenario.hs 4;" C
Explosion src/Dodge/Data/SoundOrigin.hs 35;" C
Explosion src/Dodge/WorldEvent/Explosion.hs 4;" m
@@ -813,10 +813,10 @@ HELD src/Dodge/Data/Item/Combine.hs 16;" C
HELDDETECTOR src/Dodge/Data/Item/Combine.hs 162;" C
HOMINGMODULE src/Dodge/Data/Item/Combine.hs 82;" C
HOSE src/Dodge/Data/Item/Combine.hs 32;" C
HUD src/Dodge/Data/HUD.hs 35;" t
HUD src/Dodge/Data/HUD.hs 31;" t
HUD src/Dodge/Data/HUD.hs 6;" m
HUD src/Dodge/Render/HUD.hs 3;" m
HUDElement src/Dodge/Data/HUD.hs 16;" t
HUDElement src/Dodge/Data/HUD.hs 15;" t
HalfRes src/Dodge/Data/Config.hs 95;" C
Hammer src/Dodge/Data/Hammer.hs 6;" m
Hammer src/Dodge/Hammer.hs 1;" m
@@ -1069,7 +1069,7 @@ Location src/Dodge/Item/Location.hs 1;" m
LocationLDT src/Dodge/Data/DoubleTree.hs 62;" t
Lock src/Dodge/Inventory/Lock.hs 1;" m
LockAndKey src/Dodge/LockAndKey.hs 1;" m
LockedInventory src/Dodge/Data/HUD.hs 30;" C
LockedInventory src/Dodge/Data/HUD.hs 26;" C
LoneWolf src/Dodge/Data/Creature/State.hs 46;" C
LongAI src/Dodge/Data/Creature/Misc.hs 60;" C
LongDoor src/Dodge/Room/LongDoor.hs 2;" m
@@ -1082,7 +1082,7 @@ LtAutoAI src/Dodge/Data/Creature/Misc.hs 54;" C
LtAutoCrit src/Dodge/Creature/LtAutoCrit.hs 1;" m
Lure src/Dodge/Data/ActionPlan.hs 179;" C
Luse src/Dodge/Data/Item/HeldUse.hs 38;" t
Luse src/Dodge/Luse.hs 1;" m
Luse src/Dodge/Luse.hs 2;" m
MACHINEPISTOL src/Dodge/Data/Item/Combine.hs 132;" C
MAGENTA src/Color/Data.hs 20;" C
MAGNET src/Dodge/Data/Item/Combine.hs 45;" C
@@ -1257,7 +1257,7 @@ NoRightButtonOptions src/Dodge/Data/RightButtonOptions.hs 14;" C
NoRoomClipBoundaries src/Dodge/Data/Config.hs 105;" C
NoShadowFidelity src/Shape/Data.hs 25;" C
NoShadows src/Dodge/Data/Config.hs 101;" C
NoSubInventory src/Dodge/Data/HUD.hs 24;" C
NoSubInventory src/Dodge/Data/HUD.hs 23;" C
NoWorldEffect src/Dodge/Data/WorldEffect.hs 24;" C
Noclip src/Dodge/Data/Config.hs 70;" C
NodeMTree src/Dodge/Tree/Compose/Data.hs 9;" C
@@ -1796,7 +1796,7 @@ Strategy src/Dodge/Creature/Strategy.hs 1;" m
StrategyActions src/Dodge/Data/ActionPlan.hs 188;" C
StrictHelp src/StrictHelp.hs 1;" m
StringHelp src/StringHelp.hs 1;" m
SubInventory src/Dodge/Data/HUD.hs 23;" t
SubInventory src/Dodge/Data/HUD.hs 22;" t
Superfluous src/Shape/Data.hs 38;" C
Surface src/Shape/Data.hs 41;" t
Survive src/Dodge/Data/Scenario.hs 5;" C
@@ -2261,16 +2261,15 @@ _camViewDistance src/Dodge/Data/Camera.hs 30;" f
_camViewFrom src/Dodge/Data/Camera.hs 29;" f
_camZoom src/Dodge/Data/Camera.hs 26;" f
_carriage src/Dodge/Data/Creature/Stance.hs 14;" f
_carteCenter src/Dodge/Data/HUD.hs 37;" f
_carteRot src/Dodge/Data/HUD.hs 39;" f
_carteZoom src/Dodge/Data/HUD.hs 38;" f
_carteCenter src/Dodge/Data/HUD.hs 33;" f
_carteRot src/Dodge/Data/HUD.hs 35;" f
_carteZoom src/Dodge/Data/HUD.hs 34;" f
_ceSideEffect src/Dodge/Data/Universe.hs 62;" f
_ceString src/Dodge/Data/Universe.hs 63;" f
_ciCombinations src/Dodge/Data/HUD.hs 27;" f
_ciInfo src/Dodge/Data/Combine.hs 8;" f
_ciInvIDs src/Dodge/Data/Combine.hs 6;" f
_ciItem src/Dodge/Data/Combine.hs 7;" f
_ciSections src/Dodge/Data/HUD.hs 28;" f
_ciSections src/Dodge/Data/HUD.hs 25;" f
_cigType src/Dodge/Data/Camera.hs 19;" f
_clAlt src/Dodge/Data/Cloud.hs 23;" f
_clPict src/Dodge/Data/Cloud.hs 21;" f
@@ -2294,7 +2293,7 @@ _cldtUp src/Dodge/Data/DoubleTree.hs 46;" f
_cldtUp src/Dodge/Data/DoubleTree.hs 54;" f
_clickPos src/Dodge/Data/Input.hs 26;" f
_clickWorldPos src/Dodge/Data/Input.hs 28;" f
_closeObjects src/Dodge/Data/HUD.hs 40;" f
_closeObjects src/Dodge/Data/HUD.hs 36;" f
_cloudEBO src/Data/Preload/Render.hs 49;" f
_cloudShader src/Data/Preload/Render.hs 48;" f
_cloudVBO src/Data/Preload/Render.hs 47;" f
@@ -2404,7 +2403,7 @@ _debug_view_clip_bounds src/Dodge/Data/Config.hs 56;" f
_decorations src/Dodge/Data/LWorld.hs 134;" f
_delayedEvents src/Dodge/Data/LWorld.hs 131;" f
_dexterity src/Dodge/Data/Creature/Misc.hs 22;" f
_diSections src/Dodge/Data/HUD.hs 19;" f
_diSections src/Dodge/Data/HUD.hs 18;" f
_dimAttachPos src/Dodge/Data/Item/Misc.hs 16;" f
_dimCenter src/Dodge/Data/Item/Misc.hs 15;" f
_dimRad src/Dodge/Data/Item/Misc.hs 14;" f
@@ -2573,7 +2572,7 @@ _heldPos src/Dodge/Data/Input.hs 27;" f
_heldTriggerType src/Dodge/Data/Item/Use.hs 42;" f
_heldWorldPos src/Dodge/Data/Input.hs 29;" f
_hud src/Dodge/Data/World.hs 47;" f
_hudElement src/Dodge/Data/HUD.hs 36;" f
_hudElement src/Dodge/Data/HUD.hs 32;" f
_humanoidAI src/Dodge/Data/Creature/Misc.hs 69;" f
_iaLoaded src/Dodge/Data/Item/Use/Consumption.hs 22;" f
_iaMax src/Dodge/Data/Item/Use/Consumption.hs 21;" f
@@ -3058,7 +3057,7 @@ _sssSelPos src/Dodge/Data/SelectionList.hs 45;" f
_strength src/Dodge/Data/Creature/Misc.hs 21;" f
_strideAmount src/Dodge/Data/Creature/Stance.hs 22;" f
_strideLength src/Dodge/Data/Creature/Stance.hs 16;" f
_subInventory src/Dodge/Data/HUD.hs 18;" f
_subInventory src/Dodge/Data/HUD.hs 17;" f
_swColor src/Dodge/Data/Shockwave.hs 18;" f
_swDam src/Dodge/Data/Shockwave.hs 23;" f
_swDirection src/Dodge/Data/Shockwave.hs 19;" f
@@ -3085,7 +3084,7 @@ _tcEffect src/Dodge/Data/Terminal.hs 118;" f
_tcHelp src/Dodge/Data/Terminal.hs 117;" f
_tcString src/Dodge/Data/Terminal.hs 115;" f
_tempLightSources src/Dodge/Data/LWorld.hs 138;" f
_termID src/Dodge/Data/HUD.hs 31;" f
_termID src/Dodge/Data/HUD.hs 27;" f
_terminals src/Dodge/Data/LWorld.hs 123;" f
_teslaArcs src/Dodge/Data/LWorld.hs 113;" f
_testFloat src/Dodge/Data/World.hs 45;" f
@@ -3327,7 +3326,7 @@ airlockDoubleDoor src/Dodge/Room/Airlock.hs 54;" f
airlockSimple src/Dodge/Room/Airlock.hs 66;" f
airlockZ src/Dodge/Room/Airlock.hs 91;" f
allHotkeys src/Dodge/Creature/YourControl.hs 51;" f
allInvLocs src/Dodge/Item/Grammar.hs 204;" f
allInvLocs src/Dodge/Item/Grammar.hs 203;" f
allVisibleWalls src/Dodge/Base/Collide.hs 131;" f
alongSegBy src/Geometry.hs 43;" f
ammoMagSPic src/Dodge/Item/Draw/SPic.hs 45;" f
@@ -3482,7 +3481,7 @@ blood8S src/Dodge/SoundLogic/ExternallyGeneratedSounds.hs 330;" f
blowTorch src/Dodge/Item/Held/SprayGuns.hs 51;" f
blue src/Color.hs 16;" f
blunderbuss src/Dodge/Item/Held/Cone.hs 29;" f
boostSelfL src/Dodge/Luse.hs 56;" f
boostSelfL src/Dodge/Luse.hs 55;" f
boosterGun src/Dodge/Item/Equipment/Booster.hs 9;" f
bossKeyItems src/Dodge/LockAndKey.hs 11;" f
bossRoom src/Dodge/Room/Boss.hs 59;" f
@@ -3695,8 +3694,8 @@ crSafeDistFromTarg src/Dodge/Creature/Test.hs 67;" f
crSpring src/Dodge/Update.hs 644;" f
crStratConMatches src/Dodge/Creature/Test.hs 72;" f
crUpdate src/Dodge/Creature/State.hs 61;" f
crUpdateInvidLocations src/Dodge/Inventory/Location.hs 54;" f
crUpdateItemLocations src/Dodge/Inventory/Location.hs 48;" f
crUpdateInvidLocations src/Dodge/Inventory/Location.hs 53;" f
crUpdateItemLocations src/Dodge/Inventory/Location.hs 47;" f
crZoneSize src/Dodge/Zoning/Creature.hs 39;" f
craftInfo src/Dodge/Item/Info.hs 138;" f
crankSlowS src/Dodge/SoundLogic/ExternallyGeneratedSounds.hs 420;" f
@@ -4535,17 +4534,16 @@ invAdj src/Dodge/Item/Grammar.hs 171;" f
invDimColor src/Dodge/DisplayInventory.hs 137;" f
invDisplayParams src/Dodge/ListDisplayParams.hs 29;" f
invHead src/Dodge/Render/HUD.hs 266;" f
invIndentIM src/Dodge/Item/Grammar.hs 183;" f
invLDT src/Dodge/Item/Grammar.hs 155;" f
invRootMap src/Dodge/Item/Grammar.hs 164;" f
invRootTrees src/Dodge/Item/Grammar.hs 217;" f
invRootTrees src/Dodge/Item/Grammar.hs 196;" f
invSelectionItem src/Dodge/Inventory/SelectionList.hs 22;" f
invSelectionItem' src/Dodge/Inventory/SelectionList.hs 19;" f
invShiftPointBy src/Dodge/ShiftPoint.hs 8;" f
invSideEff src/Dodge/Creature/State.hs 161;" f
invSize src/Dodge/Inventory/CheckSlots.hs 41;" f
invTrees src/Dodge/Item/Grammar.hs 191;" f
invTrees' src/Dodge/Item/Grammar.hs 195;" f
invTrees src/Dodge/Item/Grammar.hs 184;" f
invTrees' src/Dodge/Item/Grammar.hs 188;" f
inventoryExtra src/Dodge/Render/HUD.hs 184;" f
inventoryExtraH src/Dodge/Render/HUD.hs 195;" f
inventoryX src/Dodge/Creature.hs 115;" f
@@ -5550,7 +5548,7 @@ setHotkey src/Dodge/Hotkey.hs 38;" f
setInLinks src/Dodge/RoomLink.hs 51;" f
setInLinksByType src/Dodge/RoomLink.hs 54;" f
setInLinksPD src/Dodge/RoomLink.hs 74;" f
setInvPosFromSS src/Dodge/Inventory/Location.hs 71;" f
setInvPosFromSS src/Dodge/Inventory/Location.hs 70;" f
setItemCharge src/Dodge/ItEffect.hs 39;" f
setLayer src/Picture/Base.hs 139;" f
setLinkType src/Dodge/RoomLink.hs 60;" f
@@ -5975,7 +5973,7 @@ tryChargeBattery src/Dodge/Euse.hs 43;" f
tryCombine src/Dodge/Update/Input/InGame.hs 252;" f
tryGetChannel src/Sound.hs 96;" f
tryGetRootAttachedFromInvID src/Dodge/Inventory/Location.hs 22;" f
tryGetRootItemInvID src/Dodge/Inventory/Location.hs 33;" f
tryGetRootItemInvID src/Dodge/Inventory/Location.hs 32;" f
tryMeleeAttack src/Dodge/Creature/ReaderUpdate.hs 36;" f
tryPlay src/Sound.hs 83;" f
tryPutFloorItemIDInInv src/Dodge/Inventory/Add.hs 23;" f
@@ -6089,7 +6087,7 @@ updateRadarSweep src/Dodge/RadarSweep.hs 25;" f
updateRadarSweeps src/Dodge/Update.hs 443;" f
updateRandNode src/TreeHelp.hs 108;" f
updateRenderSplit appDodge/Main.hs 105;" f
updateRootItemID src/Dodge/Inventory/Location.hs 41;" f
updateRootItemID src/Dodge/Inventory/Location.hs 40;" f
updateScopeZoom src/Dodge/Update/Camera.hs 127;" f
updateScopeZoom' src/Dodge/Update/Camera.hs 132;" f
updateScrollTestValue src/Dodge/ScrollValue.hs 6;" f
@@ -6139,7 +6137,7 @@ upperPrismPolyST src/Shape.hs 107;" f
upperPrismPolySU src/Shape.hs 113;" f
upperPrismPolyTS src/Shape.hs 119;" f
upperRounded src/Shape.hs 183;" f
useBreakL src/Dodge/Item/Grammar.hs 25;" f
useBreakL src/Dodge/Item/Grammar.hs 24;" f
useBreakListsLinkTest src/Dodge/Item/Grammar.hs 31;" f
useBulletPayload src/Dodge/Bullet.hs 105;" f
useC src/Dodge/Cuse.hs 8;" f
@@ -6151,19 +6149,19 @@ useHotKey src/Dodge/Creature/YourControl.hs 48;" f
useItemHotkey src/Dodge/Creature/Impulse/UseItem.hs 145;" f
useItemLeftClick src/Dodge/Creature/Impulse/UseItem.hs 120;" f
useItemLeftClick' src/Dodge/Creature/Impulse/UseItem.hs 133;" f
useL src/Dodge/Luse.hs 14;" f
useL src/Dodge/Luse.hs 11;" f
useLnkRoomPos src/Dodge/PlacementSpot.hs 244;" f
useLoadedAmmo src/Dodge/HeldUse.hs 207;" f
useMagShield src/Dodge/Euse.hs 69;" f
useNormalCamera src/Dodge/Camera.hs 6;" f
usePayload src/Dodge/Payload.hs 7;" f
useRewindGun src/Dodge/Luse.hs 41;" f
useRewindGun src/Dodge/Luse.hs 39;" f
useRoomPosCond src/Dodge/PlacementSpot.hs 178;" f
useRoomPosRoomCond src/Dodge/PlacementSpot.hs 181;" f
useRootItem src/Dodge/Creature/Impulse/UseItem.hs 25;" f
useStopWatch src/Dodge/Luse.hs 24;" f
useStopWatch src/Dodge/Luse.hs 21;" f
useTimeCheck src/Dodge/Item/Weapon/TriggerType.hs 127;" f
useTimeScrollGun src/Dodge/Luse.hs 32;" f
useTimeScrollGun src/Dodge/Luse.hs 29;" f
useUnusedLnk src/Dodge/PlacementSpot.hs 169;" f
useUpdate src/Dodge/Creature/State.hs 313;" f
usedRoomInLinkPoss src/Dodge/PlacementSpot.hs 196;" f