crush my lock with a rock i must
This commit is contained in:
@@ -49,6 +49,12 @@
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/structure/closet/body_bag/handle_lock_addition()
|
||||
return
|
||||
|
||||
/obj/structure/closet/body_bag/handle_lock_removal()
|
||||
return
|
||||
|
||||
/obj/structure/closet/body_bag/MouseDrop(over_object, src_location, over_location)
|
||||
. = ..()
|
||||
if(over_object == usr && Adjacent(usr) && (in_range(src, usr) || usr.contents.Find(src)))
|
||||
|
||||
@@ -57,6 +57,11 @@
|
||||
I.alpha = 0
|
||||
animate(I, pixel_z = 32, alpha = 255, time = 5, easing = ELASTIC_EASING)
|
||||
|
||||
/obj/structure/closet/cardboard/handle_lock_addition() //Whoever heard of a lockable cardboard box anyway
|
||||
return
|
||||
|
||||
/obj/structure/closet/cardboard/handle_lock_removal()
|
||||
return
|
||||
|
||||
/obj/structure/closet/cardboard/metal
|
||||
name = "large metal box"
|
||||
|
||||
@@ -358,3 +358,8 @@
|
||||
new /obj/item/clothing/shoes/workboots/mining(src)
|
||||
new /obj/item/storage/backpack/satchel/explorer(src)
|
||||
|
||||
/obj/structure/closet/coffin/handle_lock_addition()
|
||||
return
|
||||
|
||||
/obj/structure/closet/coffin/handle_lock_removal()
|
||||
return
|
||||
|
||||
@@ -4,6 +4,18 @@
|
||||
req_access = list(ACCESS_ALL_PERSONAL_LOCKERS)
|
||||
var/registered_name = null
|
||||
|
||||
/obj/structure/closet/secure_closet/personal/examine(mob/user)
|
||||
..()
|
||||
if(registered_name)
|
||||
to_chat(user, "<span class='notice'>The display reads, \"Owned by [registered_name]\".</span>")
|
||||
|
||||
/obj/structure/closet/secure_closet/personal/check_access(obj/item/card/id/I)
|
||||
. = ..()
|
||||
if(!I || !istype(I))
|
||||
return
|
||||
if(registered_name == I.registered_name)
|
||||
return TRUE
|
||||
|
||||
/obj/structure/closet/secure_closet/personal/PopulateContents()
|
||||
..()
|
||||
if(prob(50))
|
||||
@@ -33,21 +45,21 @@
|
||||
|
||||
/obj/structure/closet/secure_closet/personal/attackby(obj/item/W, mob/user, params)
|
||||
var/obj/item/card/id/I = W.GetID()
|
||||
if(istype(I))
|
||||
if(broken)
|
||||
to_chat(user, "<span class='danger'>It appears to be broken.</span>")
|
||||
return
|
||||
if(!I || !I.registered_name)
|
||||
return
|
||||
if(allowed(user) || !registered_name || (istype(I) && (registered_name == I.registered_name)))
|
||||
//they can open all lockers, or nobody owns this, or they own this locker
|
||||
locked = !locked
|
||||
update_icon()
|
||||
|
||||
if(!registered_name)
|
||||
registered_name = I.registered_name
|
||||
desc = "Owned by [I.registered_name]."
|
||||
else
|
||||
to_chat(user, "<span class='danger'>Access Denied.</span>")
|
||||
else
|
||||
if(!I || !istype(I))
|
||||
return ..()
|
||||
if(!can_lock(user, FALSE)) //Can't do anything if there isn't a lock!
|
||||
return
|
||||
if(I.registered_name && !registered_name)
|
||||
to_chat(user, "<span class='notice'>You claim [src].</span>")
|
||||
registered_name = I.registered_name
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/structure/closet/secure_closet/personal/handle_lock_addition() //If lock construction is successful we don't care what access the electronics had, so we override it
|
||||
if(..())
|
||||
req_access = list(ACCESS_ALL_PERSONAL_LOCKERS)
|
||||
lockerelectronics.accesses = req_access
|
||||
|
||||
/obj/structure/closet/secure_closet/personal/handle_lock_removal()
|
||||
if(..())
|
||||
registered_name = null
|
||||
|
||||
Reference in New Issue
Block a user