Made check less snowflakey

This commit is contained in:
warior4356
2020-11-08 23:20:23 -08:00
parent 18ceb59950
commit 673623d942
3 changed files with 11 additions and 7 deletions
+1 -1
View File
@@ -28,7 +28,7 @@
if(istype(C, /obj/structure/closet/secure_closet))
var/obj/structure/closet/secure_closet/SC = C
SC.locked = 0
C.open(TRUE)
C.open()
/obj/effect/proc_holder/spell/aoe_turf/knock/greater
name = "Greater Knock"
@@ -261,7 +261,7 @@
if(window && window.fulltile)
new/obj/effect/temp_visual/revenant/cracks(window.loc)
for(var/obj/structure/closet/closet in T.contents)
closet.open(TRUE)
closet.open()
if(!istype(T, /turf/simulated/floor/plating) && !istype(T, /turf/simulated/floor/engine/cult) && istype(T, /turf/simulated/floor) && prob(15))
var/turf/simulated/floor/floor = T
@@ -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)