mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 21:18:37 +01:00
Cleans up /proc/find_safe_turf(), documenting and improving code (#93848)
## About The Pull Request `/proc/find_safe_turf()` was cleaned up so that it did not have two arguments that accomplished the same thing, removing opportunities for user errors when calling the proc. Additionally, since I was here, I decided to clean up some of the code and document it. Some thresholds were changed in this PR (the max temperature threshold was dropped from 360K to 340K), but I believe that it's better to keep them consistent instead of using arbitrary values. ## Uncomfortably large gap <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> ## Changelog No user facing changes. <!-- Both 🆑's are required for the changelog to work! You can put your name to the right of the first 🆑 if you want to overwrite your GitHub username as author ingame. --> <!-- You can use multiple of the same prefix (they're only used for the icon ingame) and delete the unneeded ones. Despite some of the tags, changelogs should generally represent how a player might be affected by the changes rather than a summary of the PR's contents. --> --------- Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
This commit is contained in:
@@ -135,11 +135,11 @@
|
||||
var/effect_range = 5
|
||||
|
||||
/obj/effect/fun_balloon/scatter/effect()
|
||||
for(var/mob/living/M in range(effect_range, get_turf(src)))
|
||||
var/turf/T = find_safe_turf(zlevel = src.z)
|
||||
new /obj/effect/temp_visual/gravpush(get_turf(M))
|
||||
M.forceMove(T)
|
||||
to_chat(M, span_notice("Pop!"), confidential = TRUE)
|
||||
for(var/mob/living/dispersed_mob in range(effect_range, get_turf(src)))
|
||||
var/turf/drop_off = find_safe_turf(z)
|
||||
new /obj/effect/temp_visual/gravpush(get_turf(dispersed_mob))
|
||||
dispersed_mob.forceMove(drop_off)
|
||||
dispersed_mob.balloon_alert(dispersed_mob, "pop!")
|
||||
|
||||
// ----------- Station Crash
|
||||
// Can't think of anywhere better to put it right now
|
||||
|
||||
Reference in New Issue
Block a user