Merge pull request #10095 from RavingManiac/dev-2

Capacity-based storage system
This commit is contained in:
Chinsky
2016-01-07 07:17:10 +03:00
17 changed files with 168 additions and 53 deletions
+2 -2
View File
@@ -77,13 +77,13 @@ var/list/slot_equipment_priority = list( \
// 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
@@ -595,7 +595,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
@@ -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)