mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-21 20:13:45 +01:00
Fixes a niche dufflebag issue (#19883)
* fixes chat issues * removal fixes * this
This commit is contained in:
@@ -383,9 +383,12 @@
|
||||
playsound(src, 'sound/items/zip.ogg', 75, TRUE)
|
||||
zipped = !zipped
|
||||
|
||||
if(!zipped && zip_time) // Handle slowdown and stuff now that we just zipped it
|
||||
slowdown = 1
|
||||
if(!zipped) // Handle slowdown and stuff now that we just zipped it
|
||||
show_to(user)
|
||||
|
||||
if(zip_time)
|
||||
slowdown = 1
|
||||
|
||||
return
|
||||
|
||||
slowdown = 0
|
||||
@@ -395,14 +398,24 @@
|
||||
|
||||
// The following three procs handle refusing access to contents if the duffel is zipped
|
||||
|
||||
/obj/item/storage/backpack/duffel/handle_item_insertion(obj/item/I, prevent_warning)
|
||||
/obj/item/storage/backpack/duffel/handle_item_insertion(obj/item/I, prevent_warning, bypass_zip = FALSE)
|
||||
if(bypass_zip)
|
||||
return ..()
|
||||
|
||||
if(zipped)
|
||||
to_chat(usr, "<span class='notice'>[src] is zipped shut!</span>")
|
||||
return FALSE
|
||||
|
||||
return ..()
|
||||
|
||||
/obj/item/storage/backpack/duffel/remove_from_storage(obj/item/I, atom/new_location)
|
||||
/obj/item/storage/backpack/duffel/removal_allowed_check(mob/user)
|
||||
if(zipped)
|
||||
to_chat(user, "<span class='notice'>[src] is zipped shut!</span>")
|
||||
return FALSE
|
||||
|
||||
return TRUE
|
||||
|
||||
/obj/item/storage/backpack/duffel/drop_inventory(user)
|
||||
if(zipped)
|
||||
to_chat(usr, "<span class='notice'>[src] is zipped shut!</span>")
|
||||
return FALSE
|
||||
|
||||
@@ -93,6 +93,9 @@
|
||||
continue
|
||||
hide_from(player)
|
||||
|
||||
/obj/item/storage/proc/removal_allowed_check(mob/user)
|
||||
return TRUE
|
||||
|
||||
/obj/item/storage/MouseDrop(obj/over_object)
|
||||
if(!ismob(usr)) //so monkeys can take off their backpacks -- Urist
|
||||
return
|
||||
@@ -110,6 +113,9 @@
|
||||
if((istype(over_object, /obj/structure/table) || isfloorturf(over_object)) && length(contents) \
|
||||
&& loc == M && !M.stat && !M.restrained() && !HAS_TRAIT(M, TRAIT_HANDS_BLOCKED) && over_object.Adjacent(M) && !istype(src, /obj/item/storage/lockbox)) // Worlds longest `if()`
|
||||
var/turf/T = get_turf(over_object)
|
||||
if(!removal_allowed_check(M))
|
||||
return
|
||||
|
||||
if(isfloorturf(over_object))
|
||||
if(get_turf(M) != T)
|
||||
return // Can only empty containers onto the floor under you
|
||||
@@ -580,6 +586,8 @@
|
||||
|
||||
if((!ishuman(usr) && (loc != usr)) || usr.stat || usr.restrained())
|
||||
return
|
||||
if(!removal_allowed_check(usr))
|
||||
return
|
||||
|
||||
drop_inventory(usr)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user