mirror of
https://github.com/CHOMPstation/CHOMPstation.git
synced 2026-08-24 20:46:29 +01:00
Ports Bay's custodial bag tweaks
This commit is contained in:
@@ -478,6 +478,27 @@
|
||||
src.add_fingerprint(user)
|
||||
return
|
||||
|
||||
/obj/item/weapon/storage/proc/gather_all(turf/T as turf, mob/user as mob)
|
||||
var/list/rejections = list()
|
||||
var/success = 0
|
||||
var/failure = 0
|
||||
|
||||
for(var/obj/item/I in T)
|
||||
if(I.type in rejections) // To limit bag spamming: any given type only complains once
|
||||
continue
|
||||
if(!can_be_inserted(I, user)) // Note can_be_inserted still makes noise when the answer is no
|
||||
rejections += I.type // therefore full bags are still a little spammy
|
||||
failure = 1
|
||||
continue
|
||||
success = 1
|
||||
handle_item_insertion(I, 1) //The 1 stops the "You put the [src] into [S]" insertion message from being displayed.
|
||||
if(success && !failure)
|
||||
to_chat(user, "<span class='notice'>You put everything in [src].</span>")
|
||||
else if(success)
|
||||
to_chat(user, "<span class='notice'>You put some things in [src].</span>")
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You fail to pick anything up with \the [src].</span>")
|
||||
|
||||
/obj/item/weapon/storage/verb/toggle_gathering_mode()
|
||||
set name = "Switch Gathering Method"
|
||||
set category = "Object"
|
||||
|
||||
Reference in New Issue
Block a user