mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 20:48:56 +01:00
mining keys to open tendrills crates buyable with miner points (#56267)
This commit is contained in:
@@ -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, "<span class='notice'>You disable the magic lock, revealing the loot.</span>")
|
||||
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
|
||||
|
||||
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user