diff --git a/code/game/objects/structures/girders.dm b/code/game/objects/structures/girders.dm index d98ae2d728d..d03639489b2 100644 --- a/code/game/objects/structures/girders.dm +++ b/code/game/objects/structures/girders.dm @@ -57,30 +57,30 @@ return if(istype(W, /obj/item/stack/rods)) - var/obj/item/stack/rods/S = W + var/obj/item/stack/rods/rod = W if(state == GIRDER_DISPLACED) - if(S.get_amount() < 5) + if(rod.get_amount() < 5) to_chat(user, span_warning("You need at least five rods to create a false wall!")) return to_chat(user, span_notice("You start building a false wall...")) if(do_after(user, 20, target = src)) - if(S.get_amount() < 5) + if(rod.get_amount() < 5) return - S.use(5) + rod.use(5) to_chat(user, span_notice("You create a false wall. Push on it to open or close the passage.")) var/obj/structure/falsewall/iron/FW = new (loc) transfer_fingerprints_to(FW) qdel(src) return else - if(S.get_amount() < 5) + if(rod.get_amount() < 5) to_chat(user, span_warning("You need at least five rods to add plating!")) return to_chat(user, span_notice("You start adding plating...")) if(do_after(user, 40, target = src)) - if(S.get_amount() < 5) + if(rod.get_amount() < 5) return - S.use(5) + rod.use(5) to_chat(user, span_notice("You add the plating.")) var/turf/T = get_turf(src) T.PlaceOnTop(/turf/closed/wall/mineral/iron) @@ -91,17 +91,17 @@ if(!istype(W, /obj/item/stack/sheet)) return - var/obj/item/stack/sheet/S = W - if(istype(S, /obj/item/stack/sheet/iron)) + var/obj/item/stack/sheet/sheets = W + if(istype(sheets, /obj/item/stack/sheet/iron)) if(state == GIRDER_DISPLACED) - if(S.get_amount() < 2) + if(sheets.get_amount() < 2) to_chat(user, span_warning("You need two sheets of iron to create a false wall!")) return to_chat(user, span_notice("You start building a false wall...")) if(do_after(user, 20*platingmodifier, target = src)) - if(S.get_amount() < 2) + if(sheets.get_amount() < 2) return - S.use(2) + sheets.use(2) to_chat(user, span_notice("You create a false wall. Push on it to open or close the passage.")) var/obj/structure/falsewall/F = new (loc) transfer_fingerprints_to(F) @@ -111,14 +111,14 @@ to_chat(user, span_warning("You can't finish a reinforced girder with regular iron. You need a plasteel sheet for that.")) return else - if(S.get_amount() < 2) + if(sheets.get_amount() < 2) to_chat(user, span_warning("You need two sheets of iron to finish a wall!")) return to_chat(user, span_notice("You start adding plating...")) if (do_after(user, 40*platingmodifier, target = src)) - if(S.get_amount() < 2) + if(sheets.get_amount() < 2) return - S.use(2) + sheets.use(2) to_chat(user, span_notice("You add the plating.")) var/turf/T = get_turf(src) T.PlaceOnTop(/turf/closed/wall) @@ -126,29 +126,29 @@ qdel(src) return - if(istype(S, /obj/item/stack/sheet/plasteel)) + if(istype(sheets, /obj/item/stack/sheet/plasteel)) if(state == GIRDER_DISPLACED) - if(S.get_amount() < 2) + if(sheets.get_amount() < 2) to_chat(user, span_warning("You need at least two sheets to create a false wall!")) return to_chat(user, span_notice("You start building a reinforced false wall...")) if(do_after(user, 20, target = src)) - if(S.get_amount() < 2) + if(sheets.get_amount() < 2) return - S.use(2) + sheets.use(2) to_chat(user, span_notice("You create a reinforced false wall. Push on it to open or close the passage.")) var/obj/structure/falsewall/reinforced/FW = new (loc) transfer_fingerprints_to(FW) qdel(src) return else if(state == GIRDER_REINF) - if(S.get_amount() < 1) + if(sheets.get_amount() < 1) return to_chat(user, span_notice("You start finalizing the reinforced wall...")) if(do_after(user, 50*platingmodifier, target = src)) - if(S.get_amount() < 1) + if(sheets.get_amount() < 1) return - S.use(1) + sheets.use(1) to_chat(user, span_notice("You fully reinforce the wall.")) var/turf/T = get_turf(src) T.PlaceOnTop(/turf/closed/wall/r_wall) @@ -156,56 +156,55 @@ qdel(src) return else - if(S.get_amount() < 1) + if(sheets.get_amount() < 1) return to_chat(user, span_notice("You start reinforcing the girder...")) if(do_after(user, 60*platingmodifier, target = src)) - if(S.get_amount() < 1) + if(sheets.get_amount() < 1) return - S.use(1) + sheets.use(1) to_chat(user, span_notice("You reinforce the girder.")) var/obj/structure/girder/reinforced/R = new (loc) transfer_fingerprints_to(R) qdel(src) return - if(!S.has_unique_girder) - var/M = S.sheettype + if(!sheets.has_unique_girder && sheets.material_type) + var/M = sheets.sheettype if(state == GIRDER_DISPLACED) var/falsewall_type = text2path("/obj/structure/falsewall/[M]") if(!falsewall_type) - to_chat(user, span_warning("You can't seem to figure out how to make a false wall with [S]!")) + to_chat(user, span_warning("You can't seem to figure out how to make a false wall with [sheets]!")) return - if(S.get_amount() < 2) + if(sheets.get_amount() < 2) to_chat(user, span_warning("You need at least two sheets to create a false wall!")) return if(do_after(user, 20, target = src)) - if(S.get_amount() < 2) + if(sheets.get_amount() < 2) return - S.use(2) + sheets.use(2) to_chat(user, span_notice("You create a false wall. Push on it to open or close the passage.")) var/obj/structure/falsewall/FW = new falsewall_type (loc) transfer_fingerprints_to(FW) qdel(src) return else - if(S.get_amount() < 2) + if(sheets.get_amount() < 2) to_chat(user, span_warning("You need at least two sheets to add plating!")) return to_chat(user, span_notice("You start adding plating...")) if (do_after(user, 40, target = src)) - if(S.get_amount() < 2) + if(sheets.get_amount() < 2) return - S.use(2) + sheets.use(2) to_chat(user, span_notice("You add the plating.")) var/turf/T = get_turf(src) - if(S.walltype) - T.PlaceOnTop(S.walltype) + if(sheets.walltype) + T.PlaceOnTop(sheets.walltype) else var/turf/newturf = T.PlaceOnTop(/turf/closed/wall/material) var/list/material_list = list() - if(S.material_type) - material_list[GET_MATERIAL_REF(S.material_type)] = MINERAL_MATERIAL_AMOUNT * 2 + material_list[GET_MATERIAL_REF(sheets.material_type)] = MINERAL_MATERIAL_AMOUNT * 2 if(material_list) newturf.set_custom_materials(material_list)