mirror of
https://github.com/yogstation13/Yogstation.git
synced 2025-02-26 09:04:50 +00:00
Merge pull request #38090 from AutomaticFrenzy/patch/super-secret-room
Fix nullspace error room not working correctly
This commit is contained in:
committed by
yogstation13-bot
parent
a3dca3e153
commit
a144c1bd1d
@@ -7,33 +7,55 @@
|
||||
var/question = "Travel back?"
|
||||
var/list/zlevels
|
||||
|
||||
/obj/structure/signpost/New()
|
||||
/obj/structure/signpost/Initialize()
|
||||
. = ..()
|
||||
set_light(2)
|
||||
zlevels = SSmapping.levels_by_trait(ZTRAIT_STATION)
|
||||
|
||||
/obj/structure/signpost/attackby(obj/item/W, mob/user, params)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/structure/signpost/attack_hand(mob/user)
|
||||
/obj/structure/signpost/interact(mob/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
switch(alert(question,name,"Yes","No"))
|
||||
if("Yes")
|
||||
var/turf/T = find_safe_turf(zlevels=zlevels)
|
||||
if(alert(question,name,"Yes","No") == "Yes" && Adjacent(user))
|
||||
var/turf/T = find_safe_turf(zlevels=zlevels)
|
||||
|
||||
if(T)
|
||||
user.forceMove(T)
|
||||
to_chat(user, "<span class='notice'>You blink and find yourself in [get_area_name(T)].</span>")
|
||||
else
|
||||
to_chat(user, "Nothing happens. You feel that this is a bad sign.")
|
||||
if("No")
|
||||
return
|
||||
if(T)
|
||||
var/atom/movable/AM = user.pulling
|
||||
if(AM)
|
||||
AM.forceMove(T)
|
||||
user.forceMove(T)
|
||||
if(AM)
|
||||
user.start_pulling(AM)
|
||||
to_chat(user, "<span class='notice'>You blink and find yourself in [get_area_name(T)].</span>")
|
||||
else
|
||||
to_chat(user, "Nothing happens. You feel that this is a bad sign.")
|
||||
|
||||
/obj/structure/signpost/attackby(obj/item/W, mob/user, params)
|
||||
return interact(user)
|
||||
|
||||
/obj/structure/signpost/attack_paw(mob/user)
|
||||
return interact(user)
|
||||
|
||||
/obj/structure/signpost/attack_hulk(mob/user, does_attack_animation = 0)
|
||||
return interact(user)
|
||||
|
||||
/obj/structure/signpost/attack_larva(mob/user)
|
||||
return interact(user)
|
||||
|
||||
/obj/structure/signpost/attack_robot(mob/user)
|
||||
if (Adjacent(user))
|
||||
return interact(user)
|
||||
|
||||
/obj/structure/signpost/attack_slime(mob/user)
|
||||
return interact(user)
|
||||
|
||||
/obj/structure/signpost/attack_animal(mob/user)
|
||||
return interact(user)
|
||||
|
||||
/obj/structure/signpost/salvation
|
||||
name = "\proper salvation"
|
||||
desc = "In the darkest times, we will find our way home."
|
||||
resistance_flags = INDESTRUCTIBLE
|
||||
|
||||
/obj/structure/signpost/exit
|
||||
name = "exit"
|
||||
@@ -41,7 +63,7 @@
|
||||
exit the area."
|
||||
question = "Leave? You might never come back."
|
||||
|
||||
/obj/structure/signpost/exit/New()
|
||||
/obj/structure/signpost/exit/Initialize()
|
||||
. = ..()
|
||||
zlevels = list()
|
||||
for(var/i in 1 to world.maxz)
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
icon = 'icons/obj/structures.dmi'
|
||||
icon_state = "speaking_tile"
|
||||
layer = 5
|
||||
resistance_flags = INDESTRUCTIBLE
|
||||
var/speaking = FALSE
|
||||
var/times_spoken_to = 0
|
||||
var/list/shenanigans = list()
|
||||
@@ -88,6 +89,27 @@
|
||||
speaking = FALSE
|
||||
times_spoken_to++
|
||||
|
||||
/obj/structure/speaking_tile/attackby(obj/item/W, mob/user, params)
|
||||
return interact(user)
|
||||
|
||||
/obj/structure/speaking_tile/attack_paw(mob/user)
|
||||
return interact(user)
|
||||
|
||||
/obj/structure/speaking_tile/attack_hulk(mob/user, does_attack_animation = 0)
|
||||
return interact(user)
|
||||
|
||||
/obj/structure/speaking_tile/attack_larva(mob/user)
|
||||
return interact(user)
|
||||
|
||||
/obj/structure/speaking_tile/attack_ai(mob/user)
|
||||
return interact(user)
|
||||
|
||||
/obj/structure/speaking_tile/attack_slime(mob/user)
|
||||
return interact(user)
|
||||
|
||||
/obj/structure/speaking_tile/attack_animal(mob/user)
|
||||
return interact(user)
|
||||
|
||||
/obj/structure/speaking_tile/proc/SpeakPeace(list/statements)
|
||||
for(var/i in 1 to statements.len)
|
||||
say("<span class='deadsay'>[statements[i]]</span>")
|
||||
|
||||
@@ -7,31 +7,32 @@
|
||||
if((movement_type & FLYING) && !floating) //TODO: Better floating
|
||||
float(on = TRUE)
|
||||
|
||||
if (client || registered_z) // This is a temporary error tracker to make sure we've caught everything
|
||||
if (client)
|
||||
var/turf/T = get_turf(src)
|
||||
if (client && registered_z != T.z)
|
||||
if(!T)
|
||||
for(var/obj/effect/landmark/error/E in GLOB.landmarks_list)
|
||||
forceMove(E.loc)
|
||||
break
|
||||
var/msg = "[key_name_admin(src)] [ADMIN_JMP(src)] was found to have no .loc with an attached client, if the cause is unknown it would be wise to ask how this was accomplished."
|
||||
message_admins(msg)
|
||||
send2irc_adminless_only("Mob", msg, R_ADMIN)
|
||||
log_game("[key_name(src)] was found to have no .loc with an attached client.")
|
||||
|
||||
// This is a temporary error tracker to make sure we've caught everything
|
||||
else if (registered_z != T.z)
|
||||
#ifdef TESTING
|
||||
message_admins("[src] [ADMIN_FLW(src)] has somehow ended up in Z-level [T.z] despite being registered in Z-level [registered_z]. If you could ask them how that happened and notify coderbus, it would be appreciated.")
|
||||
#endif
|
||||
log_game("Z-TRACKING: [src] has somehow ended up in Z-level [T.z] despite being registered in Z-level [registered_z].")
|
||||
update_z(T.z)
|
||||
else if (!client && registered_z)
|
||||
log_game("Z-TRACKING: [src] of type [src.type] has a Z-registration despite not having a client.")
|
||||
update_z(null)
|
||||
else if (registered_z)
|
||||
log_game("Z-TRACKING: [src] of type [src.type] has a Z-registration despite not having a client.")
|
||||
update_z(null)
|
||||
|
||||
if (notransform)
|
||||
return
|
||||
if(!loc)
|
||||
if(client)
|
||||
for(var/obj/effect/landmark/error/E in GLOB.landmarks_list)
|
||||
forceMove(E.loc)
|
||||
break
|
||||
var/msg = "[key_name_admin(src)] was found to have no .loc with an attached client, if the cause is unknown it would be wise to ask how this was accomplished."
|
||||
message_admins(msg)
|
||||
send2irc_adminless_only("Mob", msg, R_ADMIN)
|
||||
log_game("[key_name(src)] was found to have no .loc with an attached client.")
|
||||
else
|
||||
return
|
||||
return
|
||||
var/datum/gas_mixture/environment = loc.return_air()
|
||||
|
||||
if(stat != DEAD)
|
||||
|
||||
Reference in New Issue
Block a user