Track slime amount using ints

This commit is contained in:
2026-05-06 15:40:31 +01:00
parent e927de6508
commit b76148ae2a
12 changed files with 203 additions and 147 deletions
+2 -2
View File
@@ -64,7 +64,7 @@ drawSlimeCrit cr = colorSH green
& each %~ rotateV (-cr ^. crDir)
& each %~ (((r-cr^?!crType.slimeRadWobble)/r) *^)
where
r = cr ^?! crType . slimeRad
r = cr ^?! crType . slimeSlime . to slimeToRad
p = cr ^?! crType . slimeCompression
d = normalize p
s = norm p / r
@@ -131,7 +131,7 @@ drawBeeCrit cr = colorSH col
col | cr ^?! crType . beeAggro > 0 = red
| otherwise = yellow
f | Mounted {} <- cr ^. crStance . carriage
= each . sfVs . each . _xy %~ scaleAlong (V2 0 1) (1 + g ( modTo 1 (cr ^?! crType . beeSlime)))
= each . sfVs . each . _xy %~ scaleAlong (V2 0 1) (1 + g ( modTo 1 (cr ^?! crType . beeSlime . to ((/100) . fromIntegral))))
| otherwise = id
g x | x > 0.5 = 1 - x
| otherwise = x