diff --git a/code/game/objects/items/stacks/rods.dm b/code/game/objects/items/stacks/rods.dm index adf6fa59869..262c6b53734 100644 --- a/code/game/objects/items/stacks/rods.dm +++ b/code/game/objects/items/stacks/rods.dm @@ -1,5 +1,5 @@ GLOBAL_LIST_INIT(rod_recipes, list ( \ - new /datum/stack_recipe("grille", /obj/structure/grille, 2, time = 10, one_per_turf = 1, on_floor = 1), \ + new /datum/stack_recipe("grille", /obj/structure/grille, 2, time = 10, one_per_turf = 1, on_floor_or_lattice = 1), \ new /datum/stack_recipe("table frame", /obj/structure/table_frame, 2, time = 10, one_per_turf = 1, on_floor = 1), \ null, new /datum/stack_recipe("railing", /obj/structure/railing, 3, time = 10, one_per_turf = 1, on_floor = 1), \ diff --git a/code/game/objects/items/stacks/stack.dm b/code/game/objects/items/stacks/stack.dm index ef1aac958f9..046ede2c5c3 100644 --- a/code/game/objects/items/stacks/stack.dm +++ b/code/game/objects/items/stacks/stack.dm @@ -210,12 +210,15 @@ if(R.on_floor && !istype(get_turf(src), /turf/simulated)) to_chat(usr, "\The [R.title] must be constructed on the floor!") return FALSE + if(R.on_floor_or_lattice && !(istype(get_turf(src), /turf/simulated) || locate(/obj/structure/lattice) in get_turf(src))) + to_chat(usr, "\The [R.title] must be constructed on the floor or lattice!") + return FALSE if(R.cult_structure) if(usr.holy_check()) return if(!is_level_reachable(usr.z)) - to_chat(usr, "The energies of this place interfere with the metal shaping!") + to_chat(usr, "\The energies of this place interfere with the metal shaping!") return if(locate(/obj/structure/cult) in get_turf(src)) to_chat(usr, "There is a structure here!") diff --git a/code/game/objects/items/stacks/stack_recipe.dm b/code/game/objects/items/stacks/stack_recipe.dm index 73523c37d85..67e80bd9156 100644 --- a/code/game/objects/items/stacks/stack_recipe.dm +++ b/code/game/objects/items/stacks/stack_recipe.dm @@ -11,10 +11,11 @@ var/time = 0 var/one_per_turf = 0 var/on_floor = 0 + var/on_floor_or_lattice = 0 var/window_checks = FALSE var/cult_structure = FALSE -/datum/stack_recipe/New(title, result_type, req_amount = 1, res_amount = 1, max_res_amount = 1, time = 0, one_per_turf = 0, on_floor = 0, window_checks = FALSE, cult_structure = FALSE) +/datum/stack_recipe/New(title, result_type, req_amount = 1, res_amount = 1, max_res_amount = 1, time = 0, one_per_turf = 0, on_floor = 0, on_floor_or_lattice = 0, window_checks = FALSE, cult_structure = FALSE) src.title = title src.result_type = result_type src.req_amount = req_amount @@ -23,6 +24,7 @@ src.time = time src.one_per_turf = one_per_turf src.on_floor = on_floor + src.on_floor_or_lattice = on_floor_or_lattice src.window_checks = window_checks src.cult_structure = cult_structure diff --git a/code/game/objects/structures/grille.dm b/code/game/objects/structures/grille.dm index d8b572b3d3d..18f530b8c5c 100644 --- a/code/game/objects/structures/grille.dm +++ b/code/game/objects/structures/grille.dm @@ -146,7 +146,7 @@ deconstruct() /obj/structure/grille/screwdriver_act(mob/user, obj/item/I) - if(!(istype(loc, /turf/simulated) || anchored)) + if(!(anchored || istype(loc, /turf/simulated) || locate(/obj/structure/lattice) in get_turf(src))) return . = TRUE if(shock(user, 90)) @@ -154,8 +154,11 @@ if(!I.use_tool(src, user, 0, volume = I.tool_volume)) return anchored = !anchored + var/support = locate(/obj/structure/lattice) in get_turf(src) + if(!support) + support = get_turf(src) user.visible_message("[user] [anchored ? "fastens" : "unfastens"] [src].", \ - "You [anchored ? "fasten [src] to" : "unfasten [src] from"] the floor.") + "You [anchored ? "fasten [src] to" : "unfasten [src] from"] \the [support].") /obj/structure/grille/proc/build_window(obj/item/stack/sheet/S, mob/user) var/dir_to_set = SOUTHWEST