From b13ff7a9bca01a153f8b9ee6f4891a6e0ce9e0ad Mon Sep 17 00:00:00 2001 From: XeonMations <62395746+XeonMations@users.noreply.github.com> Date: Fri, 26 Jul 2024 15:42:09 +0300 Subject: [PATCH] Adds the ability to craft different types of lockers. (#11213) * done * done --- code/datums/components/crafting/recipes.dm | 11 +++++ .../stacks/sheets/mineral/metals_recipes.dm | 10 ++++- .../crates_lockers/closets/secure/personal.dm | 8 ++++ .../crates_lockers/closets/utility_closets.dm | 42 +++++++++++++++++++ .../crates_lockers/closets/wardrobe.dm | 8 ++++ 5 files changed, 78 insertions(+), 1 deletion(-) diff --git a/code/datums/components/crafting/recipes.dm b/code/datums/components/crafting/recipes.dm index 45e38c49d5f95..1489651c899e3 100644 --- a/code/datums/components/crafting/recipes.dm +++ b/code/datums/components/crafting/recipes.dm @@ -1221,6 +1221,17 @@ tools = list(TOOL_WRENCH, TOOL_WIRECUTTER) category = CAT_MISC +/datum/crafting_recipe/personal_locker + name = "Personal Locker" + result = /obj/structure/closet/secure_closet/personal/empty + time = 10 SECONDS + reqs = list(/obj/item/stack/sheet/iron = 2, + /obj/item/electronics/airlock = 1, + /obj/item/stack/cable_coil = 2 + ) + tools = list(TOOL_WIRECUTTER, TOOL_SCREWDRIVER) + category = CAT_STRUCTURE + /datum/crafting_recipe/shutters name = "Shutters" reqs = list(/obj/item/stack/sheet/plasteel = 5, diff --git a/code/game/objects/items/stacks/sheets/mineral/metals_recipes.dm b/code/game/objects/items/stacks/sheets/mineral/metals_recipes.dm index 2be915d8e08b7..cbe052eba15c9 100644 --- a/code/game/objects/items/stacks/sheets/mineral/metals_recipes.dm +++ b/code/game/objects/items/stacks/sheets/mineral/metals_recipes.dm @@ -44,7 +44,15 @@ GLOBAL_LIST_INIT(metal_recipes, list ( \ )), null, \ new/datum/stack_recipe("rack parts", /obj/item/rack_parts), \ - new/datum/stack_recipe("closet", /obj/structure/closet, 2, one_per_turf = TRUE, on_floor = TRUE, time = 2 SECONDS), \ + new /datum/stack_recipe_list("closets", list( \ + new/datum/stack_recipe("closet", /obj/structure/closet, 2, one_per_turf = TRUE, on_floor = TRUE, time = 1.5 SECONDS), \ + new/datum/stack_recipe("emergency closet", /obj/structure/closet/emcloset/empty, 2, one_per_turf = TRUE, on_floor = TRUE, time = 1.5 SECONDS), \ + new/datum/stack_recipe("fire closet", /obj/structure/closet/radiation/empty, 2, one_per_turf = TRUE, on_floor = TRUE, time = 1.5 SECONDS), \ + new/datum/stack_recipe("radiation closet", /obj/structure/closet/firecloset/empty, 2, one_per_turf = TRUE, on_floor = TRUE, time = 1.5 SECONDS), \ + new/datum/stack_recipe("tool closet", /obj/structure/closet/toolcloset/empty, 2, one_per_turf = TRUE, on_floor = TRUE, time = 1.5 SECONDS), \ + new/datum/stack_recipe("wardrobe closet", /obj/structure/closet/wardrobe/empty, 2, one_per_turf = TRUE, on_floor = TRUE, time = 1.5 SECONDS), \ + new/datum/stack_recipe("bomb closet", /obj/structure/closet/bombcloset/empty, 2, one_per_turf = TRUE, on_floor = TRUE, time = 1.5 SECONDS), \ + )), null, \ new/datum/stack_recipe("canister", /obj/machinery/portable_atmospherics/canister, 10, one_per_turf = TRUE, on_floor = TRUE, time = 1.5 SECONDS), \ null, \ diff --git a/code/game/objects/structures/crates_lockers/closets/secure/personal.dm b/code/game/objects/structures/crates_lockers/closets/secure/personal.dm index d9bec0c8ba199..8399b04611cf1 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/personal.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/personal.dm @@ -4,6 +4,14 @@ req_access = list(ACCESS_ALL_PERSONAL_LOCKERS) var/registered_name = null +/obj/structure/closet/secure_closet/personal/empty + desc = "It's a secure locker for personnel. The first card swiped gains control." + name = "personal closet" + req_access = list(ACCESS_ALL_PERSONAL_LOCKERS) + +/obj/structure/closet/secure_closet/personal/empty/PopulateContents() + return + /obj/structure/closet/secure_closet/personal/PopulateContents() ..() if(prob(50)) diff --git a/code/game/objects/structures/crates_lockers/closets/utility_closets.dm b/code/game/objects/structures/crates_lockers/closets/utility_closets.dm index 4af5206aba6e7..28be2cd91d92e 100644 --- a/code/game/objects/structures/crates_lockers/closets/utility_closets.dm +++ b/code/game/objects/structures/crates_lockers/closets/utility_closets.dm @@ -17,6 +17,14 @@ desc = "It's a storage unit for emergency breath masks and O2 tanks." icon_state = "emergency" +/obj/structure/closet/emcloset/empty + name = "emergency closet" + desc = "It's a storage unit for emergency breath masks and O2 tanks." + icon_state = "emergency" + +/obj/structure/closet/emcloset/empty/PopulateContents() + return + /obj/structure/closet/emcloset/anchored anchored = TRUE @@ -66,6 +74,14 @@ desc = "It's a storage unit for fire-fighting supplies." icon_state = "fire" +/obj/structure/closet/firecloset/empty + name = "fire-safety closet" + desc = "It's a storage unit for fire-fighting supplies." + icon_state = "fire" + +/obj/structure/closet/firecloset/empty/PopulateContents() + return + /obj/structure/closet/firecloset/PopulateContents() ..() @@ -92,6 +108,15 @@ icon_state = "eng" icon_door = "eng_tool" +/obj/structure/closet/toolcloset/empty + name = "tool closet" + desc = "It's a storage unit for tools." + icon_state = "eng" + icon_door = "eng_tool" + +/obj/structure/closet/toolcloset/empty/PopulateContents() + return + /obj/structure/closet/toolcloset/PopulateContents() ..() if(prob(40)) @@ -135,6 +160,15 @@ icon_state = "eng" icon_door = "eng_rad" +/obj/structure/closet/radiation/empty + name = "radiation suit closet" + desc = "It's a storage unit for rad-protective suits." + icon_state = "eng" + icon_door = "eng_rad" + +/obj/structure/closet/radiation/empty/PopulateContents() + return + /obj/structure/closet/radiation/PopulateContents() ..() new /obj/item/geiger_counter(src) @@ -153,6 +187,14 @@ desc = "It's a storage unit for explosion-protective suits." icon_state = "bomb" +/obj/structure/closet/bombcloset/empty + name = "\improper EOD closet" + desc = "It's a storage unit for explosion-protective suits." + icon_state = "bomb" + +/obj/structure/closet/bombcloset/empty/PopulateContents() + return + /obj/structure/closet/bombcloset/PopulateContents() ..() new /obj/item/clothing/suit/utility/bomb_suit(src) diff --git a/code/game/objects/structures/crates_lockers/closets/wardrobe.dm b/code/game/objects/structures/crates_lockers/closets/wardrobe.dm index f83db4c4aabd9..824c549fbe094 100644 --- a/code/game/objects/structures/crates_lockers/closets/wardrobe.dm +++ b/code/game/objects/structures/crates_lockers/closets/wardrobe.dm @@ -3,6 +3,14 @@ desc = "It's a storage unit for standard-issue Nanotrasen attire." icon_door = "blue" +/obj/structure/closet/wardrobe/empty + name = "wardrobe" + desc = "It's a storage unit for standard-issue Nanotrasen attire." + icon_door = "blue" + +/obj/structure/closet/wardrobe/empty/PopulateContents() + return + /obj/structure/closet/wardrobe/PopulateContents() ..() for(var/i in 1 to 3)