mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-14 08:34:16 +01:00
Merge pull request #10663 from AzuleUtama/backpackSpace
Examining backpacks now gives a rough indication of remaining space
This commit is contained in:
@@ -26,6 +26,23 @@
|
||||
playsound(src.loc, "rustle", 50, 1, -5)
|
||||
return ..()
|
||||
|
||||
/obj/item/storage/backpack/examine(mob/user)
|
||||
var/space_used = 0
|
||||
if(!..(user, 1))
|
||||
return
|
||||
for(var/obj/item/I in contents)
|
||||
space_used += I.w_class
|
||||
if(!space_used)
|
||||
to_chat(user, "<span class='notice'> [src] is empty.</span>")
|
||||
else if(space_used <= max_combined_w_class*0.6)
|
||||
to_chat(user, "<span class='notice'> [src] still has plenty of remaining space.</span>")
|
||||
else if(space_used <= max_combined_w_class*0.8)
|
||||
to_chat(user, "<span class='notice'> [src] is beginning to run out of space.</span>")
|
||||
else if(space_used < max_combined_w_class)
|
||||
to_chat(user, "<span class='notice'> [src] doesn't have much space left.</span>")
|
||||
else
|
||||
to_chat(user, "<span class='notice'> [src] is full.</span>")
|
||||
|
||||
/*
|
||||
* Backpack Types
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user