From aa847113c5a997bdc5e424157906220cffa0a8e4 Mon Sep 17 00:00:00 2001 From: ShizCalev Date: Tue, 14 Jul 2020 15:53:03 -0400 Subject: [PATCH] Fixes using sheets of glass / other materials that don't have a valid false wall type consuming your sheets without doing anything when you click on a displaced girder --- code/game/objects/structures/girders.dm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/code/game/objects/structures/girders.dm b/code/game/objects/structures/girders.dm index cd7b2034e41..a5230c49878 100644 --- a/code/game/objects/structures/girders.dm +++ b/code/game/objects/structures/girders.dm @@ -166,6 +166,10 @@ if(S.sheettype != "runed") var/M = S.sheettype if(state == GIRDER_DISPLACED) + var/falsewall_type = text2path("/obj/structure/falsewall/[M]") + if(!falsewall_type) + to_chat(user, "You can't seem to figure out how to make a false wall with [S]!") + return if(S.get_amount() < 2) to_chat(user, "You need at least two sheets to create a false wall!") return @@ -174,8 +178,7 @@ 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) + var/obj/structure/falsewall/FW = new falsewall_type (loc) transfer_fingerprints_to(FW) qdel(src) else