mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-29 08:08:49 +01:00
Adds more multiz support (#69420)
* Adds more multiz support by making use of ``is_valid_z_level`` instead of simply checking if z is the same.
This commit is contained in:
@@ -379,7 +379,10 @@ GLOBAL_LIST_EMPTY(gravity_generators)
|
||||
var/turf/T = get_turf(src)
|
||||
var/sound/alert_sound = sound('sound/effects/alert.ogg')
|
||||
for(var/mob/mobs as anything in GLOB.mob_list)
|
||||
if(mobs.z != z && !(SSmapping.level_trait(z, ZTRAITS_STATION) && SSmapping.level_trait(mobs.z, ZTRAITS_STATION)))
|
||||
var/turf/mob_turf = get_turf(mobs)
|
||||
if(!istype(mob_turf))
|
||||
continue
|
||||
if(!is_valid_z_level(T, mob_turf))
|
||||
continue
|
||||
mobs.update_gravity(mobs.has_gravity())
|
||||
if(mobs.client)
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
/datum/sm_delam/proc/effect_irradiate(obj/machinery/power/supermatter_crystal/sm)
|
||||
var/turf/sm_turf = get_turf(sm)
|
||||
for (var/mob/living/victim in range(20, sm))
|
||||
if(victim.z != sm_turf.z)
|
||||
if(!is_valid_z_level(get_turf(victim), sm_turf))
|
||||
continue
|
||||
SSradiation.irradiate(victim)
|
||||
return TRUE
|
||||
@@ -17,7 +17,7 @@
|
||||
/datum/sm_delam/proc/effect_demoralize(obj/machinery/power/supermatter_crystal/sm)
|
||||
var/turf/sm_turf = get_turf(sm)
|
||||
for(var/mob/living/victim as anything in GLOB.alive_mob_list)
|
||||
if(!istype(victim) || victim.z != sm_turf.z)
|
||||
if(!istype(victim) || !is_valid_z_level(get_turf(victim), sm_turf))
|
||||
continue
|
||||
if(ishuman(victim))
|
||||
//Hilariously enough, running into a closet should make you get hit the hardest.
|
||||
@@ -25,11 +25,10 @@
|
||||
human.hallucination += max(50, min(300, DETONATION_HALLUCINATION * sqrt(1 / (get_dist(victim, sm) + 1)) ) )
|
||||
|
||||
for(var/mob/victim as anything in GLOB.player_list)
|
||||
var/turf/mob_turf = get_turf(victim)
|
||||
if(sm_turf.z != mob_turf.z)
|
||||
if(!is_valid_z_level(get_turf(victim), sm_turf))
|
||||
continue
|
||||
SEND_SOUND(victim, 'sound/magic/charge.ogg')
|
||||
if (victim.z != sm_turf.z)
|
||||
if(!is_valid_z_level(get_turf(victim), sm_turf))
|
||||
to_chat(victim, span_boldannounce("You hold onto \the [victim.loc] as hard as you can, as reality distorts around you. You feel safe."))
|
||||
continue
|
||||
to_chat(victim, span_boldannounce("You feel reality distort for a moment..."))
|
||||
|
||||
@@ -48,8 +48,9 @@
|
||||
investigate_log("consumed by singularity.", INVESTIGATE_ENGINE)
|
||||
message_admins("Singularity has consumed a supermatter shard and can now become stage six.")
|
||||
visible_message(span_userdanger("[src] is consumed by the singularity!"))
|
||||
var/turf/sm_turf = get_turf(src)
|
||||
for(var/mob/hearing_mob as anything in GLOB.player_list)
|
||||
if(hearing_mob.z != z)
|
||||
if(!is_valid_z_level(get_turf(hearing_mob), sm_turf))
|
||||
continue
|
||||
SEND_SOUND(hearing_mob, 'sound/effects/supermatter.ogg') //everyone goan know bout this
|
||||
to_chat(hearing_mob, span_boldannounce("A horrible screeching fills your ears, and a wave of dread washes over you..."))
|
||||
|
||||
Reference in New Issue
Block a user