diff --git a/code/datums/elements/uses_girder_wall_recipes.dm b/code/datums/elements/uses_girder_wall_recipes.dm index b313f78200e..38593f89f54 100644 --- a/code/datums/elements/uses_girder_wall_recipes.dm +++ b/code/datums/elements/uses_girder_wall_recipes.dm @@ -82,6 +82,8 @@ structure.add_fingerprint(user) stack.add_fingerprint(user) + // Save refernce to the materials for the case when we place last tile in the stack + var/list/saved_mats_per_unit = stack.mats_per_unit if (!stack.use_tool(structure, user, recipe.make_delay, recipe.stack_amount, extra_checks = CALLBACK(src, PROC_REF(check_recipe), structure, user, recipe))) return @@ -103,7 +105,7 @@ qdel(structure) if (is_material_recipe) - wall.set_custom_materials(stack.mats_per_unit, recipe.stack_amount) + wall.set_custom_materials(saved_mats_per_unit, recipe.stack_amount) /// Checks if the user can do the wall recipe. /datum/element/uses_girder_wall_recipes/proc/check_recipe(obj/structure/structure, mob/living/user, datum/girder_wall_recipe/recipe) diff --git a/code/game/objects/items/stacks/tiles/tile_types.dm b/code/game/objects/items/stacks/tiles/tile_types.dm index c8f2c59d7c3..915fbf2af5e 100644 --- a/code/game/objects/items/stacks/tiles/tile_types.dm +++ b/code/game/objects/items/stacks/tiles/tile_types.dm @@ -1162,9 +1162,11 @@ merge_type = /obj/item/stack/tile/material /obj/item/stack/tile/material/place_tile(turf/open/target_plating, mob/user) + // Save refernce to the materials for the case when we place last tile in the stack + var/list/saved_mats_per_unit = mats_per_unit . = ..() var/turf/open/floor/material/floor = . - floor?.set_custom_materials(mats_per_unit) + floor?.set_custom_materials(saved_mats_per_unit) /obj/item/stack/tile/eighties name = "retro tile"