Add machine direction to turret direction

This commit is contained in:
2026-03-12 17:58:54 +00:00
parent 24af6a731b
commit be72daf6d5
6 changed files with 35 additions and 18 deletions
+5 -2
View File
@@ -30,9 +30,12 @@ damMatSideEffect dm = \case
defDamageMaterial :: Damage -> ECW -> World -> (Int,World)
defDamageMaterial dm _ = (dm ^. dmAmount,)
laserSpark x y -- = makeSpark FireSpark x y
= id
damageStone :: Damage -> ECW -> World -> (Int,World)
damageStone dm ecw w = case dm of
Lasering _ p t -> f 0 $ makeSpark FireSpark (outTo p t) (rdir p t)
Lasering _ p t -> f 0 $ laserSpark (outTo p t) (rdir p t)
Piercing _ p t ->
f dmam $ makeSpark NormalSpark (outTo p t) (rdir p t)
. makeDustAt Stone 200 (addZ 20 (outTo p t))
@@ -64,7 +67,7 @@ damageStone dm ecw w = case dm of
damageMetal :: Damage -> ECW -> World -> (Int,World)
damageMetal dm ecw w = case dm of
Lasering _ p t -> f 0 $ makeSpark FireSpark (outTo p t) (rdir p t)
Lasering _ p t -> f 0 $ laserSpark (outTo p t) (rdir p t)
Piercing _ p t -> f dmam $
makeSpark NormalSpark (outTo p t) (rdir p t)
. randsound p [tingS, ting1S, ting2S, ting3S, ting4S, ting5S]