Merge pull request #8316 from Trilbyspaceclone/Lock_and_key

Better Locked Collar checks
This commit is contained in:
kevinz000
2019-05-11 22:21:16 -07:00
committed by GitHub
2 changed files with 24 additions and 9 deletions
+8 -9
View File
@@ -193,15 +193,14 @@
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, "<span class='warning'>With a click the collar unlocks!</span>")
lock = FALSE
item_flags = NONE
else
to_chat(user, "<span class='warning'>With a click the collar locks!</span>")
lock = TRUE
item_flags = NODROP
/obj/item/clothing/neck/petcollar/locked/attackby(obj/item/K, mob/user, params)
if(istype(K, /obj/item/key/collar))
if(lock != FALSE)
to_chat(user, "<span class='warning'>With a click the collar unlocks!</span>")
lock = FALSE
else
to_chat(user, "<span class='warning'>With a click the collar locks!</span>")
lock = TRUE
return
/obj/item/clothing/neck/petcollar/locked/attack_hand(mob/user)
@@ -870,3 +870,19 @@
materials = list(MAT_METAL = 100, MAT_GLASS = 100)
build_path = /obj/item/disk/holodisk
category = list("initial", "Misc")
/datum/design/lock_collar
name = "Lockable Collar"
id = "lock_collar"
build_type = AUTOLATHE
materials = list(MAT_METAL = 1200, MAT_GLASS = 100)
build_path = /obj/item/clothing/neck/petcollar/locked
category = list("initial", "Misc")
/datum/design/collar_key
name = "Collar Key"
id = "collar_key"
build_type = AUTOLATHE
materials = list(MAT_METAL = 300, MAT_GLASS = 150)
build_path = /obj/item/key/collar
category = list("initial", "Misc")