mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2025-12-25 09:41:29 +00:00
Made check less snowflakey
This commit is contained in:
@@ -28,17 +28,17 @@
|
||||
/obj/structure/closet/crate/can_close()
|
||||
return TRUE
|
||||
|
||||
/obj/structure/closet/crate/open(irregular_open = FALSE)
|
||||
/obj/structure/closet/crate/open(by_hand = FALSE)
|
||||
if(src.opened)
|
||||
return FALSE
|
||||
if(!src.can_open())
|
||||
return FALSE
|
||||
|
||||
if(!irregular_open)
|
||||
if(by_hand)
|
||||
for(var/obj/O in src)
|
||||
if(O.density)
|
||||
var/response = alert(usr, "This crate has been packed with bluespace compression, an item inside won't fit back inside. Are you sure you want to open it?","Bluespace Compression Warning", "No", "Yes")
|
||||
if(response == "No")
|
||||
if(response == "No" || !Adjacent(usr))
|
||||
return FALSE
|
||||
break
|
||||
|
||||
@@ -91,6 +91,10 @@
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/structure/closet/crate/toggle(mob/user, by_hand = FALSE)
|
||||
if(!(opened ? close() : open(by_hand)))
|
||||
to_chat(user, "<span class='notice'>It won't budge!</span>")
|
||||
|
||||
/obj/structure/closet/crate/proc/try_rig(obj/item/W, mob/user)
|
||||
if(istype(W, /obj/item/stack/cable_coil))
|
||||
var/obj/item/stack/cable_coil/C = W
|
||||
@@ -145,7 +149,7 @@
|
||||
do_sparks(5, 1, src)
|
||||
return
|
||||
src.add_fingerprint(user)
|
||||
src.toggle(user)
|
||||
src.toggle(user, by_hand = TRUE)
|
||||
|
||||
// Called when a crate is delivered by MULE at a location, for notifying purposes
|
||||
/obj/structure/closet/crate/proc/notifyRecipient(var/destination)
|
||||
@@ -245,7 +249,7 @@
|
||||
if(locked)
|
||||
src.togglelock(user)
|
||||
else
|
||||
src.toggle(user)
|
||||
src.toggle(user, by_hand = TRUE)
|
||||
|
||||
/obj/structure/closet/crate/secure/closed_item_click(mob/user)
|
||||
togglelock(user)
|
||||
|
||||
Reference in New Issue
Block a user