diff --git a/code/datums/components/crafting/recipes.dm b/code/datums/components/crafting/recipes.dm index 8b104de0144..bfd953e2684 100644 --- a/code/datums/components/crafting/recipes.dm +++ b/code/datums/components/crafting/recipes.dm @@ -823,6 +823,14 @@ result = /obj/structure/bonfire category = CAT_PRIMAL +/datum/crafting_recipe/skeleton_key + name = "Skeleton Key" + time = 30 + reqs = list(/obj/item/stack/sheet/bone = 5) + result = /obj/item/skeleton_key + always_available = FALSE + category = CAT_PRIMAL + /datum/crafting_recipe/rake //Category resorting incoming name = "Rake" time = 30 diff --git a/code/game/objects/items/storage/belt.dm b/code/game/objects/items/storage/belt.dm index ce3c6ae650e..0d25f071c4f 100644 --- a/code/game/objects/items/storage/belt.dm +++ b/code/game/objects/items/storage/belt.dm @@ -308,7 +308,8 @@ /obj/item/organ/regenerative_core, /obj/item/wormhole_jaunter, /obj/item/stack/marker_beacon, - /obj/item/key/lasso + /obj/item/key/lasso, + /obj/item/skeleton_key )) diff --git a/code/modules/antagonists/ashwalker/ashwalker.dm b/code/modules/antagonists/ashwalker/ashwalker.dm index 871cb9c82d6..9b195abc232 100644 --- a/code/modules/antagonists/ashwalker/ashwalker.dm +++ b/code/modules/antagonists/ashwalker/ashwalker.dm @@ -30,6 +30,7 @@ /datum/antagonist/ashwalker/on_gain() . = ..() RegisterSignal(owner.current, COMSIG_MOB_EXAMINATE, .proc/on_examinate) + owner.teach_crafting_recipe(/datum/crafting_recipe/skeleton_key) /datum/antagonist/ashwalker/on_removal() . = ..() diff --git a/code/modules/mining/lavaland/necropolis_chests.dm b/code/modules/mining/lavaland/necropolis_chests.dm index e4b4cd444ed..889afb3cf50 100644 --- a/code/modules/mining/lavaland/necropolis_chests.dm +++ b/code/modules/mining/lavaland/necropolis_chests.dm @@ -10,9 +10,21 @@ resistance_flags = LAVA_PROOF | FIRE_PROOF | ACID_PROOF /obj/structure/closet/crate/necropolis/tendril - desc = "It's watching you suspiciously." + desc = "It's watching you suspiciously. You need a skeleton key to open it." + ///prevents bust_open to fire + integrity_failure = 0 + /// var to check if it got opened by a key + var/spawned_loot = FALSE -/obj/structure/closet/crate/necropolis/tendril/PopulateContents() +/obj/structure/closet/crate/necropolis/tendril/Initialize() + . = ..() + RegisterSignal(src, COMSIG_PARENT_ATTACKBY, .proc/try_spawn_loot) + +/obj/structure/closet/crate/necropolis/tendril/proc/try_spawn_loot(datum/source, obj/item/item, mob/user, params) ///proc that handles key checking and generating loot + SIGNAL_HANDLER + + if(!istype(item, /obj/item/skeleton_key) || spawned_loot) + return FALSE var/loot = rand(1,21) switch(loot) if(1) @@ -67,6 +79,15 @@ new /obj/item/bedsheet/cult(src) if(21) new /obj/item/clothing/neck/necklace/memento_mori(src) + spawned_loot = TRUE + qdel(item) + to_chat(user, "You disable the magic lock, revealing the loot.") + return TRUE + +/obj/structure/closet/crate/necropolis/tendril/can_open(mob/living/user, force = FALSE) + if(!spawned_loot) + return FALSE + return ..() //KA modkit design discs /obj/item/disk/design_disk/modkit_disc @@ -1325,5 +1346,12 @@ if(3) new /obj/item/prisoncube(src) +/obj/item/skeleton_key + name = "skeleton key" + desc = "An artifact usually found in the hands of the natives of lavaland, which NT now holds a monopoly on." + icon = 'icons/obj/lavaland/artefacts.dmi' + icon_state = "skeleton_key" + w_class = WEIGHT_CLASS_SMALL + #undef HIEROPHANT_BLINK_RANGE #undef HIEROPHANT_BLINK_COOLDOWN diff --git a/code/modules/mining/machine_vending.dm b/code/modules/mining/machine_vending.dm index 44213aa1412..9c589541592 100644 --- a/code/modules/mining/machine_vending.dm +++ b/code/modules/mining/machine_vending.dm @@ -13,6 +13,7 @@ new /datum/data/mining_equipment("1 Marker Beacon", /obj/item/stack/marker_beacon, 10), new /datum/data/mining_equipment("10 Marker Beacons", /obj/item/stack/marker_beacon/ten, 100), new /datum/data/mining_equipment("30 Marker Beacons", /obj/item/stack/marker_beacon/thirty, 300), + new /datum/data/mining_equipment("Skeleton Key", /obj/item/skeleton_key, 777), new /datum/data/mining_equipment("Whiskey", /obj/item/reagent_containers/food/drinks/bottle/whiskey, 100), new /datum/data/mining_equipment("Absinthe", /obj/item/reagent_containers/food/drinks/bottle/absinthe/premium, 100), new /datum/data/mining_equipment("Bubblegum Gum Packet", /obj/item/storage/box/gum/bubblegum, 100), diff --git a/icons/obj/lavaland/artefacts.dmi b/icons/obj/lavaland/artefacts.dmi index 35b29bfff56..ae273d71c37 100644 Binary files a/icons/obj/lavaland/artefacts.dmi and b/icons/obj/lavaland/artefacts.dmi differ