From f582b37c4e2259ee4e260ef5c675ae973e362a73 Mon Sep 17 00:00:00 2001 From: Krausus Date: Mon, 17 Aug 2015 23:48:33 -0400 Subject: [PATCH 1/9] Fixes nuke processing and countdown speed --- code/game/gamemodes/nuclear/nuclearbomb.dm | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/code/game/gamemodes/nuclear/nuclearbomb.dm b/code/game/gamemodes/nuclear/nuclearbomb.dm index 741bc4769bd..ed2d939ae3e 100644 --- a/code/game/gamemodes/nuclear/nuclearbomb.dm +++ b/code/game/gamemodes/nuclear/nuclearbomb.dm @@ -10,7 +10,7 @@ var/bomb_set var/extended = 0.0 var/lighthack = 0 var/opened = 0.0 - var/timeleft = 60.0 + var/timeleft = 120.0 var/timing = 0.0 var/r_code = "ADMIN" var/code = "" @@ -51,12 +51,11 @@ var/bomb_set /obj/machinery/nuclearbomb/process() if (src.timing) bomb_set = 1 //So long as there is one nuke timing, it means one nuke is armed. - src.timeleft-- - if (src.timeleft <= 0) - explode() - for(var/mob/M in viewers(1, src)) - if ((M.client && M.machine == src)) - nanomanager.update_uis(src) + timeleft = max(timeleft - 2, 0) // 2 seconds per process() + if (timeleft <= 0) + spawn + explode() + nanomanager.update_uis(src) return /obj/machinery/nuclearbomb/attackby(obj/item/weapon/O as obj, mob/user as mob, params) @@ -277,7 +276,8 @@ var/bomb_set spawn(100) src.lighthack = !src.lighthack if(src.timing_wire == temp_wire) if(src.timing) - explode() + spawn + explode() if(src.safety_wire == temp_wire) src.safety = !src.safety spawn(100) src.safety = !src.safety @@ -295,7 +295,8 @@ var/bomb_set wires[temp_wire] = !wires[temp_wire] if(src.safety_wire == temp_wire) if(src.timing) - explode() + spawn + explode() if(src.timing_wire == temp_wire) if(!src.lighthack) if (src.icon_state == "nuclearbomb2") @@ -342,7 +343,7 @@ var/bomb_set if (href_list["time"]) var/time = text2num(href_list["time"]) src.timeleft += time - src.timeleft = min(max(round(src.timeleft), 60), 600) + src.timeleft = min(max(round(src.timeleft), 120), 600) if (href_list["timer"]) if (src.timing == -1.0) nanomanager.update_uis(src) From 66083d6d6a58c2f24d971cfbd8eec86d4802ce53 Mon Sep 17 00:00:00 2001 From: Krausus Date: Tue, 18 Aug 2015 00:00:53 -0400 Subject: [PATCH 2/9] Fixes timer assembly countdown rate Now counts down 2 per (2-second) tick instead of 1, with a minimum of 6 instead of 5 (5 being identical to 6 with the new rate). --- code/modules/assembly/timer.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/assembly/timer.dm b/code/modules/assembly/timer.dm index f773d23229f..2367f9a5c04 100644 --- a/code/modules/assembly/timer.dm +++ b/code/modules/assembly/timer.dm @@ -53,7 +53,7 @@ process() if(timing && (time > 0)) - time-- + time -= 2 // 2 seconds per process() if(timing && time <= 0) timing = repeat timer_end() @@ -120,7 +120,7 @@ if(href_list["tp"]) var/tp = text2num(href_list["tp"]) set_time += tp - set_time = min(max(round(set_time), 5), 600) + set_time = min(max(round(set_time), 6), 600) if(!timing) time = set_time From 59c4e30b0554a3435dfe0df794ff1a223401c1a9 Mon Sep 17 00:00:00 2001 From: Krausus Date: Tue, 18 Aug 2015 00:14:04 -0400 Subject: [PATCH 3/9] Fixes delivery chutes losing their gas datums --- code/modules/recycling/sortingmachinery.dm | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/code/modules/recycling/sortingmachinery.dm b/code/modules/recycling/sortingmachinery.dm index 21182bd0e10..ac92bd70b33 100755 --- a/code/modules/recycling/sortingmachinery.dm +++ b/code/modules/recycling/sortingmachinery.dm @@ -284,14 +284,12 @@ if(deliveryCheck == 0) H.destinationTag = 1 - air_contents = new() // new empty gas resv. - sleep(10) playsound(src, 'sound/machines/disposalflush.ogg', 50, 0, 0) sleep(5) // wait for animation to finish H.init(src) // copy the contents of disposer to holder - + air_contents = new() // The holder just took our gas; replace it H.start(src) // start the holder processing movement flushing = 0 // now reset disposal state From c3ec8d63f884cc22734b696e441fb09f6f4bad38 Mon Sep 17 00:00:00 2001 From: Krausus Date: Tue, 18 Aug 2015 01:34:15 -0400 Subject: [PATCH 4/9] Fixes AI late-joins not deleting the inactive core --- code/modules/mob/transform_procs.dm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/code/modules/mob/transform_procs.dm b/code/modules/mob/transform_procs.dm index bd2734c5134..ebd93479b98 100644 --- a/code/modules/mob/transform_procs.dm +++ b/code/modules/mob/transform_procs.dm @@ -121,8 +121,9 @@ O.add_ai_verbs() O.rename_self("ai",1) - . = O - qdel(src) + spawn + qdel(src) + return O /mob/living/carbon/human/make_into_mask(var/should_gib = 0) for(var/t in organs) From 621341317de636efdd7a812d4d1e3c080cbeb563 Mon Sep 17 00:00:00 2001 From: Krausus Date: Tue, 18 Aug 2015 01:43:45 -0400 Subject: [PATCH 5/9] Fixes AI power supplies runtiming after deletion --- code/modules/mob/living/silicon/ai/ai.dm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index c89552719bb..0437c048f23 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -242,6 +242,7 @@ var/list/ai_verbs_default = list( powered_ai = ai if(isnull(powered_ai)) qdel(src) + return loc = powered_ai.loc use_power(1) // Just incase we need to wake up the power system. @@ -251,6 +252,7 @@ var/list/ai_verbs_default = list( /obj/machinery/ai_powersupply/process() if(!powered_ai || powered_ai.stat & DEAD) qdel(src) + return if(!powered_ai.anchored) loc = powered_ai.loc use_power = 0 From 2090a6602315aa45200699614b77979fc201a94a Mon Sep 17 00:00:00 2001 From: Krausus Date: Tue, 18 Aug 2015 02:53:23 -0400 Subject: [PATCH 6/9] Fixes various runtimes - Fixes flashers runtiming when flashing someone who lacks eyes. - Fixes chem masters runtiming when told to make 0 pills. - Fixes job objective completion runtiming when someone without a PDA completes a job objective. - Fixes the HUDs of clientless robots runtiming when trying to update. - Fixes T-ray scanners causing runtimes when objects they're making visible get deleted. - Fixes mech bay recharge station turfs runtiming if destroyed while missing a recharging port/console. --- code/_onclick/hud/robot.dm | 2 ++ code/game/gamemodes/game_mode.dm | 2 +- code/game/machinery/flasher.dm | 2 +- code/game/mecha/mech_bay.dm | 11 ++++++++--- code/game/objects/items/devices/scanners.dm | 2 +- code/modules/reagents/Chemistry-Machinery.dm | 1 + 6 files changed, 14 insertions(+), 6 deletions(-) diff --git a/code/_onclick/hud/robot.dm b/code/_onclick/hud/robot.dm index 9c586c3873e..745f747684f 100644 --- a/code/_onclick/hud/robot.dm +++ b/code/_onclick/hud/robot.dm @@ -191,6 +191,8 @@ var/mob/living/silicon/robot/r = mymob + if(!r.client) return + if(r.shown_robot_modules) //Modules display is shown r.client.screen += r.throw_icon //"store" icon diff --git a/code/game/gamemodes/game_mode.dm b/code/game/gamemodes/game_mode.dm index 8fd1c2638bc..7438d5c7978 100644 --- a/code/game/gamemodes/game_mode.dm +++ b/code/game/gamemodes/game_mode.dm @@ -129,7 +129,7 @@ msg += "You have been sent the $[pay], as agreed." else msg += "However, we were unable to send you the $[pay] you're entitled." - if(useMS) + if(useMS && P) // THIS SHOULD HAVE DONE EVERYTHING FOR ME useMS.send_pda_message("[P.owner]", "[command_name()] Payroll", msg) diff --git a/code/game/machinery/flasher.dm b/code/game/machinery/flasher.dm index 5322c3da301..e32146ff69f 100644 --- a/code/game/machinery/flasher.dm +++ b/code/game/machinery/flasher.dm @@ -82,7 +82,7 @@ if (istype(O, /mob/living/carbon/human)) var/mob/living/carbon/human/H = O var/obj/item/organ/eyes/E = H.internal_organs_by_name["eyes"] - if ((E.damage > E.min_bruised_damage && prob(E.damage + 50))) + if (E && (E.damage > E.min_bruised_damage && prob(E.damage + 50))) flick("e_flash", O:flash) E.damage += rand(1, 2) else diff --git a/code/game/mecha/mech_bay.dm b/code/game/mecha/mech_bay.dm index 3f6b92c98ce..42837d06aba 100644 --- a/code/game/mecha/mech_bay.dm +++ b/code/game/mecha/mech_bay.dm @@ -13,8 +13,13 @@ temperature = TCMB /turf/simulated/floor/mech_bay_recharge_floor/Destroy() - recharge_console.recharge_floor = null - recharge_port.recharge_floor = null + if(recharge_console && recharge_console.recharge_floor == src) + recharge_console.recharge_floor = null + recharge_console = null + if(recharge_port && recharge_port.recharge_floor == src) + recharge_port.recharge_floor = null + recharge_port = null + recharging_mecha = null ..() /turf/simulated/floor/mech_bay_recharge_floor/Entered(var/obj/mecha/mecha) @@ -285,4 +290,4 @@ // open the new ui window ui.open() // auto update every Master Controller tick - ui.set_auto_update(1) + ui.set_auto_update(1) diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm index 2f23f8d47ba..d090712dea9 100644 --- a/code/game/objects/items/devices/scanners.dm +++ b/code/game/objects/items/devices/scanners.dm @@ -72,7 +72,7 @@ REAGENT SCANNER spawn(pulse_duration) if(O) var/turf/U = O.loc - if(U.intact) + if(U && U.intact) O.invisibility = 101 O.alpha = 255 for(var/mob/living/M in T.contents) diff --git a/code/modules/reagents/Chemistry-Machinery.dm b/code/modules/reagents/Chemistry-Machinery.dm index 6ffa7a03a46..03dd8cfbcf6 100644 --- a/code/modules/reagents/Chemistry-Machinery.dm +++ b/code/modules/reagents/Chemistry-Machinery.dm @@ -562,6 +562,7 @@ var/count = 1 if (href_list["createpill_multiple"]) count = isgoodnumber(input("Select the number of pills to make.", 10, pillamount) as num) if (count > 20) count = 20 //Pevent people from creating huge stacks of pills easily. Maybe move the number to defines? + if (count <= 0) return var/amount_per_pill = reagents.total_volume/count if (amount_per_pill > 50) amount_per_pill = 50 var/name = reject_bad_text(input(usr,"Name:","Name your pill!","[reagents.get_master_reagent_name()] ([amount_per_pill] units)")) From 7f75fe794e98114ab3c762e8742f7964e7ead3ea Mon Sep 17 00:00:00 2001 From: Krausus Date: Tue, 18 Aug 2015 03:33:29 -0400 Subject: [PATCH 7/9] Fixes heads not being able to call the shuttle Also fixes the inaccurate messages when attempting to call a shuttle too early. --- code/game/machinery/computer/communications.dm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/game/machinery/computer/communications.dm b/code/game/machinery/computer/communications.dm index 66c56dd196a..c86350d11f0 100644 --- a/code/game/machinery/computer/communications.dm +++ b/code/game/machinery/computer/communications.dm @@ -171,7 +171,7 @@ var/shuttle_call/shuttle_calls[0] if("callshuttle") var/input = stripped_input(usr, "Please enter the reason for calling the shuttle.", "Shuttle Call Reason.","") as text|null - if(!input || ..() || !(is_authenticated(usr) == 2)) + if(!input || ..() || !is_authenticated(usr)) nanomanager.update_uis(src) return @@ -426,7 +426,7 @@ var/shuttle_call/shuttle_calls[0] return if(world.time < 6000) // Ten minute grace period to let the game get going without lolmetagaming. -- TLE - user << "The emergency shuttle is refueling. Please wait another [round((6000-world.time)/60)] minutes before trying again." + user << "The emergency shuttle is refueling. Please wait another [round((6000-world.time)/600)] minutes before trying again." return if(emergency_shuttle.going_to_centcom()) @@ -470,7 +470,7 @@ var/shuttle_call/shuttle_calls[0] return if(world.time < 54000) // 30 minute grace period to let the game get going - user << "The shuttle is refueling. Please wait another [round((54000-world.time)/60)] minutes before trying again." + user << "The shuttle is refueling. Please wait another [round((54000-world.time)/600)] minutes before trying again." return if(ticker.mode.name == "epidemic") From a1cc629f6e0ca381f622e5247ccf4c9bc616544b Mon Sep 17 00:00:00 2001 From: Krausus Date: Tue, 18 Aug 2015 03:38:47 -0400 Subject: [PATCH 8/9] Gives constructs universal_speak This allows them to actually communicate with humans, rather than just causing runtimes. --- code/modules/mob/living/simple_animal/constructs.dm | 1 + 1 file changed, 1 insertion(+) diff --git a/code/modules/mob/living/simple_animal/constructs.dm b/code/modules/mob/living/simple_animal/constructs.dm index 9f28be0cd90..e099f8b3e4d 100644 --- a/code/modules/mob/living/simple_animal/constructs.dm +++ b/code/modules/mob/living/simple_animal/constructs.dm @@ -25,6 +25,7 @@ minbodytemp = 0 faction = list("cult") flying = 1 + universal_speak = 1 var/list/construct_spells = list() /mob/living/simple_animal/construct/New() From 6dc8b850acf977a3f07eec19d8525148330c7f94 Mon Sep 17 00:00:00 2001 From: Krausus Date: Tue, 18 Aug 2015 03:50:33 -0400 Subject: [PATCH 9/9] Removes "Guests not allowed" admin message Informing in-game admins that a guest failed to connect is completely useless. --- code/modules/admin/IsBanned.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/admin/IsBanned.dm b/code/modules/admin/IsBanned.dm index a670e9805bb..db1319ce854 100644 --- a/code/modules/admin/IsBanned.dm +++ b/code/modules/admin/IsBanned.dm @@ -6,7 +6,7 @@ world/IsBanned(key,address,computer_id) //Guest Checking if(!guests_allowed && IsGuestKey(key)) log_access("Failed Login: [key] - Guests not allowed") - message_admins("\blue Failed Login: [key] - Guests not allowed") + // message_admins("\blue Failed Login: [key] - Guests not allowed") return list("reason"="guest", "desc"="\nReason: Guests not allowed. Please sign in with a byond account.") //check if the IP address is a known TOR node