Skip to content

Commit

Permalink
Fixes flash bug (#6637)
Browse files Browse the repository at this point in the history
cmss13-devs/cmss13#4842 - after we moved to the
TG system for many status effects, certain things needed to be converted
from WEAKEN to Stun/KnockDown in order to function properly - for
example tablestunning was converted in that PR. From testing, it seems
like flash, flashbang needs to be converted as well.

# Explain why it's good for the game

Fixes weird flash/flashbang issue(s)

# Testing Photographs and Procedure
<details>
<summary>Screenshots & Videos</summary>

Put screenshots and videos here with an empty line between the
screenshots and the `<details>` tags.

</details>


# Changelog
:cl:
fix: converts flash, flashbang to TG effect system, fixing issue(s)
/:cl:
  • Loading branch information
zzzmike authored and Doubleumc committed Jul 23, 2024
1 parent b040dba commit c47f48f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion code/game/objects/items/devices/flash.dm
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@
if(iscarbon(M))
flashfail = !M.flash_eyes()
if(!flashfail)
M.apply_effect(10, WEAKEN)
M.KnockDown(10)
M.Stun(10)

else if(isSilicon(M))
M.apply_effect(rand(5,10), WEAKEN)
Expand Down
5 changes: 3 additions & 2 deletions code/game/objects/items/explosives/grenades/flashbang.dm
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,9 @@
deafen_amount = 0
to_chat(M, SPAN_HELPFUL("Your gear protects you from the worst of the 'bang'."))

M.apply_effect(weaken_amount, WEAKEN)
M.apply_effect(paralyze_amount, PARALYZE)
M.Stun(weaken_amount)
M.KnockDown(weaken_amount)
M.KnockOut(paralyze_amount)
if(deafen_amount)
M.SetEarDeafness(max(M.ear_deaf, deafen_amount))

Expand Down

0 comments on commit c47f48f

Please sign in to comment.