Beamsplitter attachment for lasers

This commit is contained in:
2026-03-26 15:51:16 +00:00
parent c53e60b956
commit 80ef7ec909
12 changed files with 243 additions and 215 deletions
+15 -6
View File
@@ -175,12 +175,21 @@ itemMuzzles loc = case itm ^. itType of
DETECTOR{} ->
dbwMuzzles & ix 0 . mzEffect .~ MuzzleDetector
& ix 0 . mzAmmoSlot . aps .~ UseExactly 100
LASER ->
dbwMuzzles
& ix 0 . mzPos .~ V2 6 0
& ix 0 . mzInaccuracy .~ 0
& ix 0 . mzFlareType .~ LasGunFlare
& ix 0 . mzEffect .~ MuzzleLaser
LASER -> case loc ^? locDT . dtValue . _2 . lasWepXSF of
Nothing ->
dbwMuzzles
& ix 0 . mzPos .~ V2 6 0
& ix 0 . mzInaccuracy .~ 0
& ix 0 . mzFlareType .~ LasGunFlare
& ix 0 . mzEffect .~ MuzzleLaser
Just i -> join
[dbwMuzzles
& ix 0 . mzPos .~ V2 6 x
& ix 0 . mzInaccuracy .~ 0
& ix 0 . mzFlareType .~ LasGunFlare
& ix 0 . mzEffect .~ MuzzleLaser
| x <- spreadAroundCenter i 3
]
_ -> []
where
itm = loc ^. locDT . dtValue . _1