Manually ports Bay's volume inventory system.

This commit is contained in:
Neerti
2016-04-06 03:31:21 -04:00
parent 54627608e1
commit 469c01daf9
17 changed files with 187 additions and 75 deletions
+2 -2
View File
@@ -10,13 +10,13 @@
// Try put it in their backpack
if(istype(src.back,/obj/item/weapon/storage))
var/obj/item/weapon/storage/backpack = src.back
if(backpack.contents.len < backpack.storage_slots)
if(backpack.can_be_inserted(newitem, 1))
newitem.forceMove(src.back)
return 1
// Try to place it in any item that can store stuff, on the mob.
for(var/obj/item/weapon/storage/S in src.contents)
if (S.contents.len < S.storage_slots)
if (S.can_be_inserted(newitem, 1))
newitem.forceMove(S)
return 1
return 0
+1 -1
View File
@@ -590,7 +590,7 @@
icon = 'icons/obj/lighting.dmi'
force = 2
throwforce = 5
w_class = 2
w_class = 1
var/status = 0 // LIGHT_OK, LIGHT_BURNED or LIGHT_BROKEN
var/base_state
var/switchcount = 0 // number of times switched
+2 -2
View File
@@ -366,13 +366,13 @@
return
if(istype(O,/obj/item/weapon/storage/bag/plants))
var/obj/item/weapon/storage/bag/plants/bag = O
var/failed = 1
for(var/obj/item/G in O.contents)
if(!G.reagents || !G.reagents.total_volume)
continue
failed = 0
O.contents -= G
G.loc = src
bag.remove_from_storage(G, src)
holdingitems += G
if(holdingitems && holdingitems.len >= limit)
break
@@ -30,7 +30,6 @@
icon_state = "satchel"
slot_flags = SLOT_BELT | SLOT_POCKET
w_class = 3
storage_slots = 50
max_storage_space = 200 //Doesn't matter what this is, so long as it's more or equal to storage_slots * ore.w_class
max_storage_space = 100
max_w_class = 3
can_hold = list(/obj/item/weapon/fossil)