diff --git a/code/game/objects/structures/door_assembly.dm b/code/game/objects/structures/door_assembly.dm
index 271ae72d47..f35e9e7d55 100644
--- a/code/game/objects/structures/door_assembly.dm
+++ b/code/game/objects/structures/door_assembly.dm
@@ -205,6 +205,9 @@
if(!mineral)
if(istype(G, /obj/item/stack/sheet/mineral) && G.sheettype)
var/M = G.sheettype
+ var/mineralassembly = text2path("/obj/structure/door_assembly/door_assembly_[M]")
+ if(!mineralassembly)
+ return
if(G.get_amount() >= 2)
playsound(src, 'sound/items/crowbar.ogg', 100, 1)
user.visible_message("[user] adds [G.name] to the airlock assembly.", \
@@ -214,7 +217,6 @@
return
to_chat(user, "You install [M] plating into the airlock assembly.")
G.use(2)
- var/mineralassembly = text2path("/obj/structure/door_assembly/door_assembly_[M]")
var/obj/structure/door_assembly/MA = new mineralassembly(loc)
transfer_assembly_vars(src, MA, TRUE)
else
diff --git a/code/game/objects/structures/girders.dm b/code/game/objects/structures/girders.dm
index 94619e1858..7c373f2734 100644
--- a/code/game/objects/structures/girders.dm
+++ b/code/game/objects/structures/girders.dm
@@ -166,6 +166,9 @@
if(S.sheettype && S.sheettype != "runed")
var/M = S.sheettype
if(state == GIRDER_DISPLACED)
+ var/F = text2path("/obj/structure/falsewall/[M]")
+ if(!F)
+ return
if(S.get_amount() < 2)
to_chat(user, "You need at least two sheets to create a false wall!")
return
@@ -174,11 +177,13 @@
return
S.use(2)
to_chat(user, "You create a false wall. Push on it to open or close the passage.")
- var/F = text2path("/obj/structure/falsewall/[M]")
var/obj/structure/FW = new F (loc)
transfer_fingerprints_to(FW)
qdel(src)
else
+ var/F = text2path("/turf/closed/wall/mineral/[M]")
+ if(!F)
+ return
if(S.get_amount() < 2)
to_chat(user, "You need at least two sheets to add plating!")
return
@@ -189,7 +194,7 @@
S.use(2)
to_chat(user, "You add the plating.")
var/turf/T = get_turf(src)
- T.PlaceOnTop(text2path("/turf/closed/wall/mineral/[M]"))
+ T.PlaceOnTop(F)
transfer_fingerprints_to(T)
qdel(src)
return
diff --git a/code/modules/reagents/reagent_containers.dm b/code/modules/reagents/reagent_containers.dm
index f311537641..5fb51ddaa9 100644
--- a/code/modules/reagents/reagent_containers.dm
+++ b/code/modules/reagents/reagent_containers.dm
@@ -108,10 +108,12 @@
/obj/item/reagent_containers/proc/bartender_check(atom/target)
. = FALSE
- if(target.CanPass(src, get_turf(src)) && thrownby && thrownby.actions)
- for(var/datum/action/innate/drink_fling/D in thrownby.actions)
- if(D.active)
- return TRUE
+ var/turf/T = get_turf(src)
+ if(!T || target.CanPass(src, T) || !thrownby || !thrownby.actions)
+ return
+ for(var/datum/action/innate/drink_fling/D in thrownby.actions)
+ if(D.active)
+ return TRUE
/obj/item/reagent_containers/proc/ForceResetRotation()
transform = initial(transform)