diff --git a/code/WorkInProgress/mining.dm b/code/WorkInProgress/mining.dm index 6945b201d44..b0909133880 100644 --- a/code/WorkInProgress/mining.dm +++ b/code/WorkInProgress/mining.dm @@ -2528,6 +2528,7 @@ var/list/datum/material_recipe/MATERIAL_RECIPES = list( perunit = 2000 /obj/item/stack/sheet/gold/New() + ..() pixel_x = rand(0,4)-4 pixel_y = rand(0,4)-4 @@ -2543,6 +2544,7 @@ var/list/datum/material_recipe/MATERIAL_RECIPES = list( perunit = 2000 /obj/item/stack/sheet/silver/New() + ..() pixel_x = rand(0,4)-4 pixel_y = rand(0,4)-4 @@ -2557,6 +2559,7 @@ var/list/datum/material_recipe/MATERIAL_RECIPES = list( perunit = 1000 /obj/item/stack/sheet/diamond/New() + ..() pixel_x = rand(0,4)-4 pixel_y = rand(0,4)-4 @@ -2605,6 +2608,7 @@ var/list/datum/material_recipe/MATERIAL_RECIPES = list( perunit = 2000 /obj/item/stack/sheet/clown/New() + ..() pixel_x = rand(0,4)-4 pixel_y = rand(0,4)-4 diff --git a/code/defines/obj/toy.dm b/code/defines/obj/toy.dm index e1ea24fd610..c4503481efc 100644 --- a/code/defines/obj/toy.dm +++ b/code/defines/obj/toy.dm @@ -183,8 +183,9 @@ obj/item/toy/blink sleep(1) spawn(10) - new /obj/item/toy/ammo/crossbow(D.loc) - del(D) + if(D) + new /obj/item/toy/ammo/crossbow(D.loc) + del(D) return else if (bullets == 0) diff --git a/code/defines/procs/helpers.dm b/code/defines/procs/helpers.dm index a0b230c53e4..4d777fa8e8c 100644 --- a/code/defines/procs/helpers.dm +++ b/code/defines/procs/helpers.dm @@ -743,7 +743,7 @@ // Otherwise, the user mob's machine var will be reset directly. // /proc/onclose(mob/user, windowid, var/atom/ref=null) - + if(!user.client) return var/param = "null" if(ref) param = "\ref[ref]" diff --git a/code/game/gamemodes/wizard/spells.dm b/code/game/gamemodes/wizard/spells.dm index c0c08b06a58..f52c976a1be 100644 --- a/code/game/gamemodes/wizard/spells.dm +++ b/code/game/gamemodes/wizard/spells.dm @@ -485,8 +485,10 @@ break if(clear) L+=T - - usr.loc = pick(L) + if(L.len) + usr.loc = pick(L) + else + usr <<"The spell matrix was unable to locate a suitable teleport destination for an unknown reason. Sorry." smoke.start() diff --git a/code/game/machinery/computer/buildandrepair.dm b/code/game/machinery/computer/buildandrepair.dm index a8fec98642d..31f3fabf54c 100644 --- a/code/game/machinery/computer/buildandrepair.dm +++ b/code/game/machinery/computer/buildandrepair.dm @@ -183,11 +183,12 @@ if(P:amount >= 5) playsound(src.loc, 'Deconstruct.ogg', 50, 1) if(do_after(user, 20)) - P:amount -= 5 - if(!P:amount) del(P) - user << "\blue You add cables to the frame." - src.state = 3 - src.icon_state = "3" + if(P) + P:amount -= 5 + if(!P:amount) del(P) + user << "\blue You add cables to the frame." + src.state = 3 + src.icon_state = "3" if(3) if(istype(P, /obj/item/weapon/wirecutters)) playsound(src.loc, 'wirecutter.ogg', 50, 1) @@ -201,10 +202,11 @@ if(P:amount >= 2) playsound(src.loc, 'Deconstruct.ogg', 50, 1) if(do_after(user, 20)) - P:use(2) - user << "\blue You put in the glass panel." - src.state = 4 - src.icon_state = "4" + if(P) + P:use(2) + user << "\blue You put in the glass panel." + src.state = 4 + src.icon_state = "4" if(4) if(istype(P, /obj/item/weapon/crowbar)) playsound(src.loc, 'Crowbar.ogg', 50, 1) diff --git a/code/game/objects/stacks/metal.dm b/code/game/objects/stacks/metal.dm index 430ad58e2f8..8108e8ab850 100644 --- a/code/game/objects/stacks/metal.dm +++ b/code/game/objects/stacks/metal.dm @@ -102,7 +102,8 @@ var/global/list/datum/stack_recipe/r_metal_recipes = list ( \ // TILES -/obj/item/stack/tile/New() +/obj/item/stack/tile/New(var/loc, var/amount=null) + ..() src.pixel_x = rand(1, 14) src.pixel_y = rand(1, 14) return diff --git a/code/game/research/rdconsole.dm b/code/game/research/rdconsole.dm index 0bd5fbd18cb..1c0ce9636f5 100644 --- a/code/game/research/rdconsole.dm +++ b/code/game/research/rdconsole.dm @@ -258,6 +258,9 @@ won't update every console in existence) but it's more of a hassle to do. Also, spawn(24) linked_destroy.busy = 0 if(!linked_destroy.hacked) + if(!linked_destroy.loaded_item) + usr <<"\red The destructive analyzer appears to be empty." + return if(linked_destroy.loaded_item.reliability >= 90) var/list/temp_tech = linked_destroy.ConvertReqString2List(linked_destroy.loaded_item.origin_tech) for(var/T in temp_tech) diff --git a/code/modules/mob/living/carbon/alien/humanoid/life_new.dm b/code/modules/mob/living/carbon/alien/humanoid/life_new.dm index 3df38a5f830..f4994a26b58 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/life_new.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/life_new.dm @@ -164,8 +164,8 @@ breathe() - - if(src.reagents.has_reagent("lexorin")) return + if(src.reagents) + if(src.reagents.has_reagent("lexorin")) return if(istype(loc, /obj/machinery/atmospherics/unary/cryo_cell)) return var/datum/gas_mixture/environment = loc.return_air()