mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2025-12-21 15:42:35 +00:00
29 lines
610 B
Plaintext
29 lines
610 B
Plaintext
/obj/item/key
|
|
name = "key"
|
|
desc = "Used to unlock things."
|
|
icon = 'icons/obj/items.dmi'
|
|
icon_state = "keys"
|
|
w_class = ITEMSIZE_TINY
|
|
var/key_data = ""
|
|
|
|
/obj/item/key/New(var/newloc,var/data)
|
|
if(data)
|
|
key_data = data
|
|
..(newloc)
|
|
|
|
/obj/item/key/proc/get_data(var/mob/user)
|
|
return key_data
|
|
|
|
/obj/item/key/soap
|
|
name = "soap key"
|
|
desc = "a fragile key made using a bar of soap."
|
|
var/uses = 0
|
|
|
|
/obj/item/key/soap/get_data(var/mob/user)
|
|
uses--
|
|
if(uses <= 0)
|
|
user.drop_from_inventory(src,user)
|
|
to_chat(user, "<span class='warning'>\The [src] crumbles in your hands!</span>")
|
|
qdel(src)
|
|
return ..()
|