From dfecfe34e63e0d301ec01d77bfaf2a4dd7183a20 Mon Sep 17 00:00:00 2001 From: Leshana Date: Wed, 17 May 2017 20:16:36 -0400 Subject: [PATCH 1/4] Stop turning op table! * Operating table and computer liked to literally spin around during initialization due to someone using `dir` as a loop counter without declaring it as a local variable. --- code/game/machinery/OpTable.dm | 4 ++-- code/game/machinery/computer/Operating.dm | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/code/game/machinery/OpTable.dm b/code/game/machinery/OpTable.dm index ba083031e7..4d56d6662d 100644 --- a/code/game/machinery/OpTable.dm +++ b/code/game/machinery/OpTable.dm @@ -14,8 +14,8 @@ /obj/machinery/optable/New() ..() - for(dir in list(NORTH,EAST,SOUTH,WEST)) - computer = locate(/obj/machinery/computer/operating, get_step(src, dir)) + for(var/direction in list(NORTH,EAST,SOUTH,WEST)) + computer = locate(/obj/machinery/computer/operating, get_step(src, direction)) if(computer) computer.table = src break diff --git a/code/game/machinery/computer/Operating.dm b/code/game/machinery/computer/Operating.dm index 5cc9801d0f..12fafff5ff 100644 --- a/code/game/machinery/computer/Operating.dm +++ b/code/game/machinery/computer/Operating.dm @@ -12,8 +12,8 @@ /obj/machinery/computer/operating/New() ..() - for(dir in list(NORTH,EAST,SOUTH,WEST)) - table = locate(/obj/machinery/optable, get_step(src, dir)) + for(var/direction in list(NORTH,EAST,SOUTH,WEST)) + table = locate(/obj/machinery/optable, get_step(src, direction)) if (table) table.computer = src break From 71feaa4f8fee4d2210eb0fe3adb41c1faa224752 Mon Sep 17 00:00:00 2001 From: Arokha Sieyes Date: Mon, 8 May 2017 03:22:20 -0400 Subject: [PATCH 2/4] Communications computer fix Stupid code. Why would you do that. Reference using_map instead of hard coding z levels. --- code/game/machinery/computer/communications.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/machinery/computer/communications.dm b/code/game/machinery/computer/communications.dm index a738ea66c1..0703d9f7e1 100644 --- a/code/game/machinery/computer/communications.dm +++ b/code/game/machinery/computer/communications.dm @@ -52,7 +52,7 @@ /obj/machinery/computer/communications/Topic(href, href_list) if(..()) return 1 - if (src.z > 1) + if (using_map && !(src.z in using_map.station_levels)) usr << "\red Unable to establish a connection: \black You're too far away from the station!" return usr.set_machine(src) From c79bdb056b60dfc7d1ee128f1dbabeb45399f0d0 Mon Sep 17 00:00:00 2001 From: Arokha Sieyes Date: Sun, 14 May 2017 00:09:24 -0400 Subject: [PATCH 3/4] Holodeck menu tweak Prevent the menu item from updating if the loaded area doesn't update due to the mandatory delay between changes for example --- code/modules/holodeck/HolodeckControl.dm | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/code/modules/holodeck/HolodeckControl.dm b/code/modules/holodeck/HolodeckControl.dm index ff0b95f365..821b3ae65c 100644 --- a/code/modules/holodeck/HolodeckControl.dm +++ b/code/modules/holodeck/HolodeckControl.dm @@ -128,8 +128,8 @@ if(href_list["program"]) var/prog = href_list["program"] if(prog in (supported_programs + restricted_programs)) - loadProgram(prog) - current_program = prog + if(loadProgram(prog)) + current_program = prog else if(href_list["AIoverride"]) if(!issilicon(usr)) @@ -294,11 +294,11 @@ if(check_delay) if(world.time < (last_change + 25)) if(world.time < (last_change + 15))//To prevent super-spam clicking, reduced process size and annoyance -Sieve - return + return 0 for(var/mob/M in range(3,src)) M.show_message("\b ERROR. Recalibrating projection apparatus.") last_change = world.time - return + return 0 last_change = world.time active = 1 @@ -349,6 +349,8 @@ update_projections() + return 1 + /obj/machinery/computer/HolodeckControl/proc/toggleGravity(var/area/A) if(world.time < (last_gravity_change + 25)) From d2ca5df40885470088328079eb232091b463c857 Mon Sep 17 00:00:00 2001 From: Leshana Date: Wed, 17 May 2017 20:26:13 -0400 Subject: [PATCH 4/4] Prevent runtime if accidentally have a spawnpoint authorized by using_map but without any landmarked turfs. --- code/game/jobs/job_controller.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/jobs/job_controller.dm b/code/game/jobs/job_controller.dm index 8bfb5760a2..297040931f 100644 --- a/code/game/jobs/job_controller.dm +++ b/code/game/jobs/job_controller.dm @@ -613,7 +613,7 @@ var/global/datum/controller/occupations/job_master else spawnpos = spawntypes[H.client.prefs.spawnpoint] - if(spawnpos && istype(spawnpos)) + if(spawnpos && istype(spawnpos) && spawnpos.turfs.len) // VOREStation Edit - Fix runtime if no landmarks exist for a spawntype if(spawnpos.check_job_spawning(rank)) H.forceMove(pick(spawnpos.turfs)) . = spawnpos.msg