From fcda4c0fbb15d908b481ebdc155ba89d90e0d5b2 Mon Sep 17 00:00:00 2001
From: Trilbyspaceclone <30435998+Trilbyspaceclone@users.noreply.github.com>
Date: Thu, 25 Apr 2019 20:40:48 -0400
Subject: [PATCH] Update _neck.dm
---
code/modules/clothing/neck/_neck.dm | 44 +++++++++++++++++++++++++++--
1 file changed, 42 insertions(+), 2 deletions(-)
diff --git a/code/modules/clothing/neck/_neck.dm b/code/modules/clothing/neck/_neck.dm
index 8245148096..d4cfbd1a84 100644
--- a/code/modules/clothing/neck/_neck.dm
+++ b/code/modules/clothing/neck/_neck.dm
@@ -171,17 +171,57 @@
icon_state = "stripedbluescarf"
item_color = "stripedbluescarf"
-/obj/item/clothing/neck/petcollar //don't really wear this though please c'mon seriously guys
+///////////
+//COLLARS//
+///////////
+
+/obj/item/clothing/neck/petcollar
name = "pet collar"
desc = "It's for pets. Though you probably could wear it yourself, you'd doubtless be the subject of ridicule."
icon_state = "petcollar"
item_color = "petcollar"
+ pocket_storage_component_path = /datum/component/storage/concrete/pockets/small/collar
var/tagname = null
/obj/item/clothing/neck/petcollar/attack_self(mob/user)
tagname = copytext(sanitize(input(user, "Would you like to change the name on the tag?", "Name your new pet", "Spot") as null|text),1,MAX_NAME_LEN)
name = "[initial(name)] - [tagname]"
+/obj/item/clothing/neck/petcollar/locked
+ name = "locked collar"
+ desc = "A collar that has a small lock on it to keep it from being removed."
+ pocket_storage_component_path = /datum/component/storage/concrete/pockets/small/collar/locked
+ var/lock = FALSE
+
+/obj/item/clothing/neck/petcollar/locked/attackby(obj/item/key/collar, mob/user, params)
+ if(lock != FALSE)
+ to_chat(user, "With a click the collar unlocks!")
+ lock = FALSE
+ item_flags = NONE
+ else
+ to_chat(user, "With a click the collar locks!")
+ lock = TRUE
+ item_flags = NODROP
+ return
+
+/obj/item/clothing/neck/petcollar/locked/attack_hand(mob/user)
+ if(loc == user && user.get_item_by_slot(SLOT_NECK) && lock != FALSE)
+ to_chat(user, "The collar is locked! You'll need unlock the collar before you can take it off!")
+ return
+ ..()
+
+/obj/item/key/collar
+ name = "Collar Key"
+ desc = "A key for a tiny lock on a collar or bag."
+
+/obj/item/clothing/neck/petcollar/Initialize()
+ . = ..()
+ new /obj/item/reagent_containers/food/snacks/cookie(src)
+
+/obj/item/clothing/neck/petcollar/locked/Initialize()
+ . = ..()
+ new /obj/item/key/collar(src)
+
//////////////
//DOPE BLING//
//////////////
@@ -191,4 +231,4 @@
desc = "Damn, it feels good to be a gangster."
icon = 'icons/obj/clothing/neck.dmi'
icon_state = "bling"
- item_color = "bling"
\ No newline at end of file
+ item_color = "bling"