FIxes Time Stop being a 3x3 instead of a 5x5 (no seriously) (#73339)

## About The Pull Request

Keen eyes will notice time stop is intended to have a radius of 2


https://github.com/tgstation/tgstation/blob/3c0013dfa5198db867426ea27df14534cf95949f/code/modules/spells/spell_types/self/stop_time.dm#L14-L17

This implies it's supposed to be a 5x5 - radius of 2

Back when it was originally coded, it was a 5x5


https://github.com/tgstation/tgstation/commit/f2abe13f513afb9f2a18e4e3eb4756494d84e4cf

(scroll down a bit, and you will see `orange(2)`. This is a 5x5.)

So where did it become a 3x3? I can't find a single PR nerfing it, and
the radius is still 2 as it always has been

The answer: Here, in 2017 it was refactored to use fields 

#30858 

Fields track their inner fields and edge fields separately, but it used
the same radius as before, so it quietly shrunk by 1 tile as the outer
edge was no longer counted as frozen, and I guess no one noticed? or
cared? I don't know??

So I updated advanced fields to have a "mode" that tracks edge fields as
field turfs.

While I was here, I fixed some other issues with timestop. A runtime
when movelooping mobs were time stopped, sign languagers (emote mute).

And while I was "while I was here", Gravity aura had a similar issue,
causing the grav gen's aura to never work. That was fixed as well

## Why It's Good For The Game

This caused an hour long search over a 5 year old bug

## Changelog

🆑 Melbert
fix: Fixed a FIVE YEAR OLD issue causing Time Stop to be a 3x3 instead
of a 5x5. Really.
fix: The gravity generator correctly gives "forced gravity" to all
adjacent mobs
fix: Fixed some runtimes with Time Stop, and other miscellaneous issues
/🆑
This commit is contained in:
MrMelbert
2023-02-14 16:49:32 -07:00
committed by GitHub
parent a4bcee2059
commit 74900c7e85
3 changed files with 49 additions and 20 deletions
+13 -10
View File
@@ -1,4 +1,5 @@
/datum/proximity_monitor/advanced/gravity
edge_is_a_field = TRUE
var/gravity_value = 0
var/list/modified_turfs = list()
@@ -7,15 +8,17 @@
gravity_value = gravity
recalculate_field()
/datum/proximity_monitor/advanced/gravity/setup_field_turf(turf/T)
/datum/proximity_monitor/advanced/gravity/setup_field_turf(turf/target)
. = ..()
if (!isnull(modified_turfs[T]))
T.AddElement(/datum/element/forced_gravity, gravity_value)
/datum/proximity_monitor/advanced/gravity/cleanup_field_turf(turf/T)
. = ..()
if(isnull(modified_turfs[T]))
if (isnull(modified_turfs[target]))
return
T.RemoveElement(/datum/element/forced_gravity, modified_turfs[T])
modified_turfs -= T
target.AddElement(/datum/element/forced_gravity, gravity_value)
modified_turfs[target] = gravity_value
/datum/proximity_monitor/advanced/gravity/cleanup_field_turf(turf/target)
. = ..()
if(isnull(modified_turfs[target]))
return
target.RemoveElement(/datum/element/forced_gravity, modified_turfs[target])
modified_turfs -= target