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/gamemodes/nuclear/nuclearbomb.dm b/code/game/gamemodes/nuclear/nuclearbomb.dm
index 2128fe19db2..faf3f353c16 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)
diff --git a/code/game/machinery/computer/communications.dm b/code/game/machinery/computer/communications.dm
index 5e5d62cfb4f..189338e14e9 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 = 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")
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/admin/IsBanned.dm b/code/modules/admin/IsBanned.dm
index d7b53b751f6..6f843bc148b 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
diff --git a/code/modules/assembly/timer.dm b/code/modules/assembly/timer.dm
index 8e17227c0a2..2b0e72aaade 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()
@@ -124,7 +124,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
diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm
index 3afd24a4e36..714e9523feb 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
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()
diff --git a/code/modules/mob/transform_procs.dm b/code/modules/mob/transform_procs.dm
index fec89e77b98..93aa753e446 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)
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)"))
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