From f26e2bb58c55f521c41f2dd2ee1fb847ae5612b6 Mon Sep 17 00:00:00 2001 From: zxaber <37497534+zxaber@users.noreply.github.com> Date: Wed, 5 Jun 2024 21:41:40 -0700 Subject: [PATCH] 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 :cl: fix: Tool-based flashes (read: from welders) are no longer incorrectly locked at flash level 1. Wear proper PPE! /:cl: --- code/datums/elements/tool_flash.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/datums/elements/tool_flash.dm b/code/datums/elements/tool_flash.dm index fd7c298d6c5..f17d60970bf 100644 --- a/code/datums/elements/tool_flash.dm +++ b/code/datums/elements/tool_flash.dm @@ -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))