Fixes tool-based flashes being stuck at intensity 1 (#83703)

## About The Pull Request
A long-old bug due to the use of `min(flash_strength, 1)`. The intention
was clearly to have the flash be *at least* level 1, because
flash_strength defaults to nothing but can be set to 2. However,
`min(x,y)` uses the lowest value, making it always return 1. So we
change it to `max()`.
## Why It's Good For The Game
Bugfix. Sunglasses users cope.
## Changelog
🆑
fix: Tool-based flashes (read: from welders) are no longer incorrectly
locked at flash level 1. Wear proper PPE!
/🆑
This commit is contained in:
zxaber
2024-06-06 00:41:40 -04:00
committed by GitHub
parent 96aab0bf53
commit f26e2bb58c
+1 -1
View File
@@ -34,4 +34,4 @@
SIGNAL_HANDLER
if(user && get_dist(get_turf(source), get_turf(user)) <= 1)
user.flash_act(min(flash_strength,1))
user.flash_act(max(flash_strength,1))