From 9a21d7363c1053a624d42ded9bc4ea865df29891 Mon Sep 17 00:00:00 2001 From: CRUNCH <143041327+CRUNCH-Borg@users.noreply.github.com> Date: Sun, 30 Nov 2025 09:49:05 +0000 Subject: [PATCH] Updates Mineral Doors (#31071) * door * Update mineral_doors.dm * Update test_attack_chain_structures.dmm * Update rocky_motel_submap.dmm --------- Co-authored-by: Fordoxia <143041327+Fordoxia@users.noreply.github.com> --- .../SpaceRuins/submaps/rocky_motel_submap.dmm | 4 +- .../tests/test_attack_chain_structures.dmm | 2 +- .../items/stacks/sheets/sheet_types.dm | 2 + code/game/objects/structures/mineral_doors.dm | 53 ++++++++++++++----- .../projectile/magic_projectiles.dm | 4 +- .../test_attack_chain_structures.dm | 2 +- 6 files changed, 47 insertions(+), 20 deletions(-) diff --git a/_maps/map_files/RandomRuins/SpaceRuins/submaps/rocky_motel_submap.dmm b/_maps/map_files/RandomRuins/SpaceRuins/submaps/rocky_motel_submap.dmm index 08ca33e966c..1660658874b 100644 --- a/_maps/map_files/RandomRuins/SpaceRuins/submaps/rocky_motel_submap.dmm +++ b/_maps/map_files/RandomRuins/SpaceRuins/submaps/rocky_motel_submap.dmm @@ -61,7 +61,7 @@ /turf/simulated/floor/mineral/titanium, /area/template_noop) "hB" = ( -/obj/structure/mineral_door/iron, +/obj/structure/mineral_door, /turf/simulated/floor/carpet/black, /area/template_noop) "hK" = ( @@ -146,7 +146,7 @@ /turf/space, /area/template_noop) "nJ" = ( -/obj/structure/mineral_door/iron, +/obj/structure/mineral_door, /turf/simulated/floor/vault, /area/template_noop) "oF" = ( diff --git a/_maps/map_files/tests/test_attack_chain_structures.dmm b/_maps/map_files/tests/test_attack_chain_structures.dmm index a00f72337bc..e9d506e45e1 100644 --- a/_maps/map_files/tests/test_attack_chain_structures.dmm +++ b/_maps/map_files/tests/test_attack_chain_structures.dmm @@ -20,7 +20,7 @@ /turf/simulated/floor/plasteel, /area/game_test) "eN" = ( -/obj/structure/mineral_door/iron, +/obj/structure/mineral_door, /turf/simulated/floor/plasteel, /area/game_test) "eY" = ( diff --git a/code/game/objects/items/stacks/sheets/sheet_types.dm b/code/game/objects/items/stacks/sheets/sheet_types.dm index bdefb5e2676..e6dbcb1d7a7 100644 --- a/code/game/objects/items/stacks/sheets/sheet_types.dm +++ b/code/game/objects/items/stacks/sheets/sheet_types.dm @@ -128,6 +128,8 @@ GLOBAL_LIST_INIT(metal_recipes, list( new /datum/stack_recipe("bench press", /obj/structure/weightmachine/weightlifter, 5, time = 5 SECONDS, one_per_turf = TRUE, on_floor = TRUE), new /datum/stack_recipe("chest press", /obj/structure/weightmachine/stacklifter, 5, time = 5 SECONDS, one_per_turf = TRUE, on_floor = TRUE), )), + null, + new /datum/stack_recipe("metal door", /obj/structure/mineral_door, 10, time = 2 SECONDS, one_per_turf = TRUE, on_floor = TRUE), )) /obj/item/stack/sheet/metal diff --git a/code/game/objects/structures/mineral_doors.dm b/code/game/objects/structures/mineral_doors.dm index f4231e421c5..63b4db7a3b8 100644 --- a/code/game/objects/structures/mineral_doors.dm +++ b/code/game/objects/structures/mineral_doors.dm @@ -1,13 +1,13 @@ //NOT using the existing /obj/machinery/door type, since that has some complications on its own, mainly based on its machineryness /obj/structure/mineral_door name = "metal door" + desc = "An old-fashioned door built from two slabs of steel. Somehow completely airtight, and doesn't require any electricity to work." density = TRUE anchored = TRUE opacity = TRUE icon = 'icons/obj/doors/mineral_doors.dmi' icon_state = "metal" - max_integrity = 200 armor = list(MELEE = 10, BULLET = 0, LASER = 0, ENERGY = 100, BOMB = 10, RAD = 100, FIRE = 50, ACID = 50) flags_2 = RAD_PROTECT_CONTENTS_2 | RAD_NO_CONTAMINATE_2 rad_insulation_beta = RAD_BETA_BLOCKER @@ -19,13 +19,18 @@ var/hardness = 1 var/sheetType = /obj/item/stack/sheet/metal - var/sheetAmount = 7 + var/sheetAmount = 10 var/open_sound = 'sound/effects/stonedoor_openclose.ogg' var/close_sound = 'sound/effects/stonedoor_openclose.ogg' var/damageSound = null /// How much foam is on the door. Max 5 levels. var/foam_level = 0 +/obj/structure/mineral_door/examine(mob/user) + . = ..() + . += "It is held inside its frame by screws." + . += "It could be smashed or drilled with a digging tool." + /obj/structure/mineral_door/Initialize(mapload) . = ..() initial_state = icon_state @@ -116,11 +121,25 @@ else icon_state = initial_state +/obj/structure/mineral_door/screwdriver_act(mob/living/user, obj/item/I) + if(flags & NODECONSTRUCT) + to_chat(user, "You can't figure out how to deconstruct [src]!") + return TRUE + + if(!I.use_tool(src, user, 4 SECONDS * I.toolspeed * hardness, volume = I.tool_volume)) + return TRUE + + deconstruct(TRUE) + return TRUE + /obj/structure/mineral_door/item_interaction(mob/living/user, obj/item/W, list/modifiers) if(istype(W, /obj/item/pickaxe)) + if(flags & NODECONSTRUCT) + to_chat(user, "You can't figure out how to deconstruct [src]!") + return var/obj/item/pickaxe/digTool = W to_chat(user, "You start digging \the [src].") - if(do_after(user, 40 * digTool.toolspeed * hardness, target = src) && src) + if(do_after(user, 4 SECONDS * digTool.toolspeed * hardness, target = src) && src) to_chat(user, "You finished digging.") deconstruct(TRUE) return ITEM_INTERACT_COMPLETE @@ -131,38 +150,39 @@ return ..() /obj/structure/mineral_door/deconstruct(disassembled = TRUE) - var/turf/T = get_turf(src) - if(sheetType) - if(disassembled) - new sheetType(T, sheetAmount) - else - new sheetType(T, max(sheetAmount - 2, 1)) + if(!(flags & NODECONSTRUCT)) + var/turf/T = get_turf(src) + if(sheetType) + if(disassembled) + new sheetType(T, sheetAmount) + else + new sheetType(T, max(sheetAmount - 2, 1)) qdel(src) -/obj/structure/mineral_door/iron - max_integrity = 300 - /obj/structure/mineral_door/silver name = "silver door" + desc = "An old-fashioned door built from two slabs of silver. Somehow completely airtight, and doesn't require any electricity to work." icon_state = "silver" sheetType = /obj/item/stack/sheet/mineral/silver - max_integrity = 300 /obj/structure/mineral_door/gold name = "gold door" + desc = "An old-fashioned door built from two slabs of gold. Somehow completely airtight, and doesn't require any electricity to work." icon_state = "gold" sheetType = /obj/item/stack/sheet/mineral/gold rad_insulation_gamma = RAD_MEDIUM_INSULATION + max_integrity = 200 /obj/structure/mineral_door/uranium name = "uranium door" + desc = "An old-fashioned door built from two slabs of uranium. Somehow completely airtight, and doesn't require any electricity to work." icon_state = "uranium" sheetType = /obj/item/stack/sheet/mineral/uranium - max_integrity = 300 light_range = 2 /obj/structure/mineral_door/sandstone name = "sandstone door" + desc = "An old-fashioned door built from two slabs of sandstone. Somehow completely airtight, and doesn't require any electricity to work." icon_state = "sandstone" sheetType = /obj/item/stack/sheet/mineral/sandstone max_integrity = 100 @@ -180,9 +200,11 @@ /obj/structure/mineral_door/transparent/plasma name = "plasma door" + desc = "An old-fashioned door built from two slabs of plasma. Somehow completely airtight, and doesn't require any electricity to work." icon_state = "plasma" sheetType = /obj/item/stack/sheet/mineral/plasma cares_about_temperature = TRUE + max_integrity = 200 /obj/structure/mineral_door/transparent/plasma/item_interaction(mob/living/user, obj/item/W, list/modifiers) if(W.get_heat()) @@ -205,18 +227,21 @@ /obj/structure/mineral_door/transparent/diamond name = "diamond door" + desc = "An old-fashioned door built from two slabs of diamond. Somehow completely airtight, and doesn't require any electricity to work." icon_state = "diamond" sheetType = /obj/item/stack/sheet/mineral/diamond max_integrity = 1000 /obj/structure/mineral_door/wood name = "wood door" + desc = "An old-fashioned door built from two slabs of wood. Somehow completely airtight, and doesn't require any electricity to work." icon_state = "wood" open_sound = 'sound/effects/doorcreaky.ogg' close_sound = 'sound/effects/doorcreaky.ogg' sheetType = /obj/item/stack/sheet/wood resistance_flags = FLAMMABLE rad_insulation_beta = RAD_VERY_LIGHT_INSULATION + max_integrity = 200 /obj/structure/mineral_door/wood/Initialize(mapload) . = ..() diff --git a/code/modules/projectiles/projectile/magic_projectiles.dm b/code/modules/projectiles/projectile/magic_projectiles.dm index ae019e24eb6..1d246358c27 100644 --- a/code/modules/projectiles/projectile/magic_projectiles.dm +++ b/code/modules/projectiles/projectile/magic_projectiles.dm @@ -150,8 +150,8 @@ /obj/projectile/magic/door name = "bolt of door creation" - var/list/door_types = list(/obj/structure/mineral_door/wood,/obj/structure/mineral_door/iron,/obj/structure/mineral_door/silver,\ - /obj/structure/mineral_door/gold,/obj/structure/mineral_door/uranium,/obj/structure/mineral_door/sandstone,/obj/structure/mineral_door/transparent/plasma,\ + var/list/door_types = list(/obj/structure/mineral_door/wood, /obj/structure/mineral_door, /obj/structure/mineral_door/silver, \ + /obj/structure/mineral_door/gold,/obj/structure/mineral_door/uranium, /obj/structure/mineral_door/sandstone, /obj/structure/mineral_door/transparent/plasma,\ /obj/structure/mineral_door/transparent/diamond) /obj/projectile/magic/door/on_hit(atom/target) diff --git a/code/tests/attack_chain/test_attack_chain_structures.dm b/code/tests/attack_chain/test_attack_chain_structures.dm index 306adbb2b31..3042e522ea2 100644 --- a/code/tests/attack_chain/test_attack_chain_structures.dm +++ b/code/tests/attack_chain/test_attack_chain_structures.dm @@ -184,7 +184,7 @@ TEST_ASSERT_LAST_CHATLOG(player, "You dismantle [loom]") player.drop_held_item() - var/obj/structure/mineral_door/iron/door = teleport_to_first(player, /obj/structure/mineral_door/iron) + var/obj/structure/mineral_door/door = teleport_to_first(player, /obj/structure/mineral_door) player.spawn_fast_tool(/obj/item/pickaxe) player.click_on(door) TEST_ASSERT_LAST_CHATLOG(player, "You finished digging.")