diff --git a/code/WorkInProgress/Chemistry-Tools.dm b/code/WorkInProgress/Chemistry-Tools.dm index de4b763d764..fa7241e6348 100644 --- a/code/WorkInProgress/Chemistry-Tools.dm +++ b/code/WorkInProgress/Chemistry-Tools.dm @@ -251,16 +251,16 @@ del(D) return + if(D) + for(var/atom/A in D.loc) + if(A == user) continue + if(A.density) del(D) - for(var/atom/A in D.loc) - if(A == user) continue - if(A.density) del(D) + sleep(1) + if(D) + spawn(10) del(D) - sleep(1) - - spawn(10) del(D) - - return + return @@ -735,10 +735,11 @@ if(istype(M, /mob/living/carbon/human)) if(M == user) M << "\blue You take a bite of [src]." - if(reagents.total_volume) - reagents.reaction(M, INGEST) - spawn(5) - reagents.trans_to(M, reagents.total_volume) + if(reagents) + if(reagents.total_volume) + reagents.reaction(M, INGEST) + spawn(5) + reagents.trans_to(M, reagents.total_volume) src.amount-- playsound(M.loc,'eatfood.ogg', rand(10,50), 1) M.nutrition += src.heal_amt * 10 @@ -760,11 +761,11 @@ if(!do_mob(user, M)) return for(var/mob/O in viewers(world.view, user)) O.show_message("\red [user] feeds [M] [src].", 1) - - if(reagents.total_volume) - reagents.reaction(M, INGEST) - spawn(5) - reagents.trans_to(M, reagents.total_volume) + if(reagents) + if(reagents.total_volume) + reagents.reaction(M, INGEST) + spawn(5) + reagents.trans_to(M, reagents.total_volume) src.amount-- playsound(M.loc, 'eatfood.ogg', rand(10,50), 1) M.nutrition += src.heal_amt * 10 diff --git a/code/game/gamemodes/intercept_report.dm b/code/game/gamemodes/intercept_report.dm index 74b9ed02c10..6d9aafa0195 100644 --- a/code/game/gamemodes/intercept_report.dm +++ b/code/game/gamemodes/intercept_report.dm @@ -93,7 +93,8 @@ var/prob_right_dude = rand(prob_correct_person_lower, prob_correct_person_higher) var/prob_right_job = rand(prob_correct_job_lower, prob_correct_job_higher) if(prob(prob_right_job)) - traitor_job = correct_mob:assigned_role + if (correct_mob) + traitor_job = correct_mob:assigned_role else var/list/job_tmp = get_all_jobs() job_tmp.Remove("Captain", "Security Officer", "Detective", "Head Of Security", "Head of Personnel", "Chief Engineer", "Research Director") diff --git a/code/game/machinery/autolathe.dm b/code/game/machinery/autolathe.dm index 38bea9951a7..277535157cb 100644 --- a/code/game/machinery/autolathe.dm +++ b/code/game/machinery/autolathe.dm @@ -21,11 +21,12 @@ if (istype(O, /obj/item/weapon/sheet/metal)) if (src.m_amount < 150000.0) spawn(16) { - flick("autolathe_c",src) - src.m_amount += O:height * O:width * O:length * 100000.0 - O:amount-- - if (O:amount < 1) - del(O) + if (O) + flick("autolathe_c",src) + src.m_amount += O:height * O:width * O:length * 100000.0 + O:amount-- + if (O:amount < 1) + del(O) } else user << "The autolathe is full. Please remove metal from the autolathe in order to insert more." diff --git a/code/game/machinery/camera.dm b/code/game/machinery/camera.dm index 23361f1868c..70465ad642f 100644 --- a/code/game/machinery/camera.dm +++ b/code/game/machinery/camera.dm @@ -187,14 +187,15 @@ user.machine = null return 0 - if ((get_dist(user, src) > 1 || user.machine != src || user.blinded || !( user.canmove ) || !( C.status )) && (!istype(user, /mob/living/silicon/ai))) - return 0 - else - src.current = C - use_power(50) + if (C) + if ((get_dist(user, src) > 1 || user.machine != src || user.blinded || !( user.canmove ) || !( C.status )) && (!istype(user, /mob/living/silicon/ai))) + return 0 + else + src.current = C + use_power(50) - spawn( 5 ) - attack_hand(user) + spawn( 5 ) + attack_hand(user) /mob/living/silicon/ai/attack_ai(var/mob/user as mob) if (user != src) diff --git a/code/game/objects/alien/facehugger.dm b/code/game/objects/alien/facehugger.dm index 3ee3d5a93fc..dfa92f9e349 100644 --- a/code/game/objects/alien/facehugger.dm +++ b/code/game/objects/alien/facehugger.dm @@ -324,7 +324,8 @@ for(var/atom/A in get_turf(weed)) if(A.density) continue find_weeds the_weeds += weed - W = pick(the_weeds) + if(the_weeds.len) + W = pick(the_weeds) if(W) path_idle(W) diff --git a/code/game/objects/weapons.dm b/code/game/objects/weapons.dm index 5210fea46ef..89ce05f079b 100644 --- a/code/game/objects/weapons.dm +++ b/code/game/objects/weapons.dm @@ -94,7 +94,8 @@ ..() /obj/item/assembly/time_ignite/attack_self(mob/user as mob) - src.part1.attack_self(user, src.status) + if (src.part1) + src.part1.attack_self(user, src.status) src.add_fingerprint(user) return diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index da98a035910..d85d9a3c7f3 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -1276,8 +1276,9 @@ var/showadminmessages = 1 if("showgm") if(!ticker) alert("The game hasn't started yet!") - else + else if (ticker.mode) alert("The game mode is [ticker.mode.name]") + else alert("For some reason there's a ticker, but not a game mode") if("manifest") var/dat = "Showing Crew Manifest.
| Name | Position |
|---|