Get rid of warnings

This commit is contained in:
2025-06-07 19:14:56 +01:00
parent 81a7dcd962
commit faa3c4cde4
12 changed files with 85 additions and 96 deletions
+4 -9
View File
@@ -22,24 +22,19 @@ updateSpark w sk
| otherwise = case thingHit sp ep w of
Nothing -> (w, Just $ sk & skPos .~ ep & skVel *~ 0.9 & skOldPos .~ sp)
Just (hp, hthing) ->
( sparkDam' sk sp ep (hp, hthing) w
( sparkDam sk hthing w
, Just $ sk & skPos .~ hp & skOldPos .~ sp & skVel .~ 0
)
where
sp = _skPos sk
ep = sp + _skVel sk
sparkDam' ::
sparkDam ::
Spark ->
Point2 ->
Point2 ->
(Point2, Either Creature Wall) ->
Either Creature Wall ->
World ->
World
sparkDam' sk sp ep mayEiCrWl = case mayEiCrWl of
(hitp, eicrwl) -> damageCrWl (thedam hitp) eicrwl
where
thedam hitp = sparkToDamage sk
sparkDam sk x = damageCrWl (sparkToDamage sk) x
sparkToDamage :: Spark -> Damage
sparkToDamage sp = case _skType sp of