diff --git a/code/_onclick/observer.dm b/code/_onclick/observer.dm index b5a74240a31..3452400edbb 100644 --- a/code/_onclick/observer.dm +++ b/code/_onclick/observer.dm @@ -84,17 +84,13 @@ user.forceMove(get_turf(target)) /obj/machinery/gateway/centerstation/attack_ghost(mob/user as mob) - if(!awaygate) - awaygate = locate(/obj/machinery/gateway/centeraway) in GLOB.machines - if(!awaygate) - to_chat(user, "Error: No destination found.") - return - user.forceMove(awaygate.loc) + if(awaygate) + user.forceMove(awaygate.loc) + else + to_chat(user, "[src] has no destination.") /obj/machinery/gateway/centeraway/attack_ghost(mob/user as mob) - if(!stationgate) - stationgate = locate(/obj/machinery/gateway/centerstation) in GLOB.machines - if(!stationgate) - to_chat(user, "Error: No destination found.") - return - user.forceMove(stationgate.loc) + if(stationgate) + user.forceMove(stationgate.loc) + else + to_chat(user, "[src] has no destination.") diff --git a/code/controllers/configuration.dm b/code/controllers/configuration.dm index 756ce6f8527..a78288116ce 100644 --- a/code/controllers/configuration.dm +++ b/code/controllers/configuration.dm @@ -159,7 +159,7 @@ var/simultaneous_pm_warning_timeout = 100 var/assistant_maint = 0 //Do assistants get maint access? - var/gateway_delay = 6000 //How long the gateway takes before it activates. Default is half an hour. + var/gateway_delay = 6000 var/ghost_interaction = 0 var/comms_password = "" diff --git a/code/modules/awaymissions/gateway.dm b/code/modules/awaymissions/gateway.dm index 0118b0febb4..19cefa36fa5 100644 --- a/code/modules/awaymissions/gateway.dm +++ b/code/modules/awaymissions/gateway.dm @@ -47,7 +47,10 @@ GLOBAL_DATUM_INIT(the_gateway, /obj/machinery/gateway/centerstation, null) /obj/machinery/gateway/centerstation/Initialize() ..() update_icon() - wait = world.time + config.gateway_delay //+ thirty minutes default + wait = world.time + config.gateway_delay + return INITIALIZE_HINT_LATELOAD + +/obj/machinery/gateway/centerstation/LateInitialize() awaygate = locate(/obj/machinery/gateway/centeraway) in GLOB.machines /obj/machinery/gateway/centerstation/update_density_from_dir()