diff --git a/code/defines/obj/weapon.dm b/code/defines/obj/weapon.dm
index 72ee42ae79..bb81eabbc5 100644
--- a/code/defines/obj/weapon.dm
+++ b/code/defines/obj/weapon.dm
@@ -437,7 +437,7 @@
collection_mode = 1
display_contents_with_number = 1
max_w_class = 3
- max_combined_w_class = 100
+ max_storage_space = 100
/obj/item/weapon/stock_parts
name = "stock part"
diff --git a/code/game/objects/items/weapons/storage/backpack.dm b/code/game/objects/items/weapons/storage/backpack.dm
index 2b38772b86..d76f594a2a 100644
--- a/code/game/objects/items/weapons/storage/backpack.dm
+++ b/code/game/objects/items/weapons/storage/backpack.dm
@@ -8,10 +8,10 @@
desc = "You wear this on your back and put items into it."
icon_state = "backpack"
item_state = "backpack"
- w_class = 4.0
- slot_flags = SLOT_BACK //ERROOOOO
+ w_class = 4
+ slot_flags = SLOT_BACK
max_w_class = 3
- max_combined_w_class = 21
+ max_storage_space = 28
/obj/item/weapon/storage/backpack/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (src.use_sound)
@@ -40,7 +40,7 @@
origin_tech = "bluespace=4"
icon_state = "holdingpack"
max_w_class = 4
- max_combined_w_class = 28
+ max_storage_space = 56
New()
..()
@@ -88,7 +88,7 @@
w_class = 4.0
storage_slots = 20
max_w_class = 3
- max_combined_w_class = 400 // can store a ton of shit!
+ max_storage_space = 400 // can store a ton of shit!
/obj/item/weapon/storage/backpack/cultpack
name = "trophy rack"
diff --git a/code/game/objects/items/weapons/storage/bags.dm b/code/game/objects/items/weapons/storage/bags.dm
index 560729af39..ab5e189420 100644
--- a/code/game/objects/items/weapons/storage/bags.dm
+++ b/code/game/objects/items/weapons/storage/bags.dm
@@ -77,7 +77,7 @@
slot_flags = SLOT_BELT | SLOT_POCKET
w_class = 3
storage_slots = 50
- max_combined_w_class = 200 //Doesn't matter what this is, so long as it's more or equal to storage_slots * ore.w_class
+ 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_w_class = 3
can_hold = list(/obj/item/weapon/ore)
@@ -91,7 +91,7 @@
icon = 'icons/obj/hydroponics_machines.dmi'
icon_state = "plantbag"
storage_slots = 50; //the number of plant pieces it can carry.
- max_combined_w_class = 200 //Doesn't matter what this is, so long as it's more or equal to storage_slots * plants.w_class
+ max_storage_space = 200 //Doesn't matter what this is, so long as it's more or equal to storage_slots * plants.w_class
max_w_class = 3
w_class = 2
can_hold = list(/obj/item/weapon/reagent_containers/food/snacks/grown,/obj/item/seeds,/obj/item/weapon/grown)
@@ -249,7 +249,7 @@
icon_state = "cashbag"
desc = "A bag for carrying lots of cash. It's got a big dollar sign printed on the front."
storage_slots = 50; //the number of cash pieces it can carry.
- max_combined_w_class = 200 //Doesn't matter what this is, so long as it's more or equal to storage_slots * cash.w_class
+ max_storage_space = 200 //Doesn't matter what this is, so long as it's more or equal to storage_slots * cash.w_class
max_w_class = 3
w_class = 2
can_hold = list(/obj/item/weapon/coin,/obj/item/weapon/spacecash)
diff --git a/code/game/objects/items/weapons/storage/belt.dm b/code/game/objects/items/weapons/storage/belt.dm
index f2222beead..d5c1cd851f 100644
--- a/code/game/objects/items/weapons/storage/belt.dm
+++ b/code/game/objects/items/weapons/storage/belt.dm
@@ -94,7 +94,7 @@
item_state = "security"
storage_slots = 7
max_w_class = 3
- max_combined_w_class = 21
+ max_storage_space = 28
can_hold = list(
/obj/item/weapon/grenade,
/obj/item/weapon/reagent_containers/spray/pepper,
@@ -154,4 +154,4 @@
item_state = "swatbelt"
storage_slots = 9
max_w_class = 3
- max_combined_w_class = 21
+ max_storage_space = 28
diff --git a/code/game/objects/items/weapons/storage/boxes.dm b/code/game/objects/items/weapons/storage/boxes.dm
index 4436a179de..ca4227dd91 100644
--- a/code/game/objects/items/weapons/storage/boxes.dm
+++ b/code/game/objects/items/weapons/storage/boxes.dm
@@ -564,7 +564,7 @@
foldable = /obj/item/stack/sheet/cardboard //BubbleWrap
storage_slots=21
can_hold = list(/obj/item/weapon/light/tube, /obj/item/weapon/light/bulb)
- max_combined_w_class = 42 //holds 21 items of w_class 2
+ max_storage_space = 42 //holds 21 items of w_class 2
use_to_pickup = 1 // for picking up broken bulbs, not that most people will try
/obj/item/weapon/storage/box/lights/bulbs/New()
diff --git a/code/game/objects/items/weapons/storage/briefcase.dm b/code/game/objects/items/weapons/storage/briefcase.dm
index f6addee005..0f534ade9e 100644
--- a/code/game/objects/items/weapons/storage/briefcase.dm
+++ b/code/game/objects/items/weapons/storage/briefcase.dm
@@ -7,9 +7,9 @@
force = 8.0
throw_speed = 1
throw_range = 4
- w_class = 4.0
+ w_class = 4
max_w_class = 3
- max_combined_w_class = 16
+ max_storage_space = 16
/obj/item/weapon/storage/briefcase/New()
..()
diff --git a/code/game/objects/items/weapons/storage/fancy.dm b/code/game/objects/items/weapons/storage/fancy.dm
index a07013a79c..ff5dfdda6c 100644
--- a/code/game/objects/items/weapons/storage/fancy.dm
+++ b/code/game/objects/items/weapons/storage/fancy.dm
@@ -47,7 +47,7 @@
icon_type = "egg"
name = "egg box"
storage_slots = 12
- max_combined_w_class = 24
+ max_storage_space = 24
can_hold = list(/obj/item/weapon/reagent_containers/food/snacks/egg)
/obj/item/weapon/storage/fancy/egg_box/New()
@@ -254,9 +254,9 @@
icon = 'icons/obj/vialbox.dmi'
icon_state = "vialbox0"
item_state = "syringe_kit"
- max_w_class = 3
+ max_w_class = 2
can_hold = list(/obj/item/weapon/reagent_containers/glass/beaker/vial)
- max_combined_w_class = 14 //The sum of the w_classes of all the items in this storage item.
+ max_storage_space = 12 //The sum of the w_classes of all the items in this storage item.
storage_slots = 6
req_access = list(access_virology)
diff --git a/code/game/objects/items/weapons/storage/lockbox.dm b/code/game/objects/items/weapons/storage/lockbox.dm
index 4bc4fb5f3c..2b584dc86e 100644
--- a/code/game/objects/items/weapons/storage/lockbox.dm
+++ b/code/game/objects/items/weapons/storage/lockbox.dm
@@ -7,7 +7,7 @@
item_state = "syringe_kit"
w_class = 4
max_w_class = 3
- max_combined_w_class = 14 //The sum of the w_classes of all the items in this storage item.
+ max_storage_space = 14 //The sum of the w_classes of all the items in this storage item.
storage_slots = 4
req_access = list(access_armory)
var/locked = 1
diff --git a/code/game/objects/items/weapons/storage/secure.dm b/code/game/objects/items/weapons/storage/secure.dm
index 26ed522a38..1499c89d2c 100644
--- a/code/game/objects/items/weapons/storage/secure.dm
+++ b/code/game/objects/items/weapons/storage/secure.dm
@@ -23,9 +23,9 @@
var/l_hacking = 0
var/emagged = 0
var/open = 0
- w_class = 3.0
+ w_class = 3
max_w_class = 2
- max_combined_w_class = 14
+ max_storage_space = 14
examine(mob/user)
if(..(user, 1))
diff --git a/code/game/objects/items/weapons/storage/storage.dm b/code/game/objects/items/weapons/storage/storage.dm
index dd9851bb4c..14501aa343 100644
--- a/code/game/objects/items/weapons/storage/storage.dm
+++ b/code/game/objects/items/weapons/storage/storage.dm
@@ -8,11 +8,11 @@
/obj/item/weapon/storage
name = "storage"
icon = 'icons/obj/storage.dmi'
- w_class = 3.0
+ w_class = 3
var/list/can_hold = new/list() //List of objects which this item can store (if set, it can't store anything else)
var/list/cant_hold = new/list() //List of objects which this item can't store (in effect only if can_hold isn't set)
var/max_w_class = 2 //Max size of objects that this object can store (in effect only if can_hold isn't set)
- var/max_combined_w_class = 14 //The sum of the w_classes of all the items in this storage item.
+ var/max_storage_space = 14 //The sum of the storage costs of all the items in this storage item.
var/storage_slots = 7 //The number of storage slots in this container.
var/obj/screen/storage/boxes = null
var/obj/screen/close/closer = null
@@ -226,16 +226,17 @@
usr << "[W] is too big for this [src]."
return 0
- var/sum_w_class = W.w_class
+ var/total_storage_space = W.get_storage_cost()
for(var/obj/item/I in contents)
- sum_w_class += I.w_class //Adds up the combined w_classes which will be in the storage item if the item is added to it.
+ total_storage_space += I.get_storage_cost() //Adds up the combined w_classes which will be in the storage item if the item is added to it.
- if(sum_w_class > max_combined_w_class)
+ if(total_storage_space > max_storage_space)
if(!stop_messages)
usr << "[src] is full, make some space."
return 0
if(W.w_class >= src.w_class && (istype(W, /obj/item/weapon/storage)))
+ //TODO: remove hack
if(!istype(src, /obj/item/weapon/storage/backpack/holding)) //bohs should be able to hold backpacks again. The override for putting a boh in a boh is in backpack.dm.
if(!stop_messages)
usr << "[src] cannot hold [W] as it's a storage item of the same size."
@@ -265,7 +266,7 @@
usr << "You put \the [W] into [src]."
else if (M in range(1)) //If someone is standing close enough, they can tell what it is...
M.show_message("[usr] puts [W] into [src].")
- else if (W && W.w_class >= 3.0) //Otherwise they can only see large or normal items from a distance...
+ else if (W && W.w_class >= 3) //Otherwise they can only see large or normal items from a distance...
M.show_message("[usr] puts [W] into [src].")
src.orient2hud(usr)
@@ -486,3 +487,6 @@
return -1 //inside something with a null loc.
return depth
+
+/obj/item/proc/get_storage_cost()
+ return 2**(w_class-1) //1,2,4,8,16,...
\ No newline at end of file
diff --git a/code/game/objects/structures/inflatable.dm b/code/game/objects/structures/inflatable.dm
index 1f760797fc..4bbb01a9c5 100644
--- a/code/game/objects/structures/inflatable.dm
+++ b/code/game/objects/structures/inflatable.dm
@@ -3,7 +3,7 @@
desc = "A folded membrane which rapidly expands into a large cubical shape on activation."
icon = 'icons/obj/inflatable.dmi'
icon_state = "folded_wall"
- w_class = 3.0
+ w_class = 3
attack_self(mob/user)
playsound(loc, 'sound/items/zip.ogg', 75, 1)
@@ -252,7 +252,7 @@
desc = "Contains inflatable walls and doors."
icon_state = "inf_box"
item_state = "syringe_kit"
- max_combined_w_class = 21
+ max_storage_space = 28
can_hold = list(/obj/item/inflatable)
New()
diff --git a/code/modules/clothing/suits/storage.dm b/code/modules/clothing/suits/storage.dm
index 044eb1cbb7..692e2987f5 100644
--- a/code/modules/clothing/suits/storage.dm
+++ b/code/modules/clothing/suits/storage.dm
@@ -6,7 +6,7 @@
pockets = new/obj/item/weapon/storage/internal(src)
pockets.storage_slots = 2 //two slots
pockets.max_w_class = 2 //fit only pocket sized items
- pockets.max_combined_w_class = 4
+ pockets.max_storage_space = 4
/obj/item/clothing/suit/storage/attack_hand(mob/user as mob)
if (pockets.handle_attack_hand(user))
@@ -57,7 +57,7 @@
pockets = new/obj/item/weapon/storage/internal(src)
pockets.storage_slots = 4
pockets.max_w_class = 2
- pockets.max_combined_w_class = 8
+ pockets.max_storage_space = 8
/obj/item/clothing/suit/storage/vest
diff --git a/code/modules/clothing/under/accessories/storage.dm b/code/modules/clothing/under/accessories/storage.dm
index 7bc9f88af3..77f32edb9a 100644
--- a/code/modules/clothing/under/accessories/storage.dm
+++ b/code/modules/clothing/under/accessories/storage.dm
@@ -75,7 +75,7 @@
/obj/item/clothing/accessory/storage/knifeharness/New()
..()
- hold.max_combined_w_class = 4
+ hold.max_storage_space = 4
hold.can_hold = list(/obj/item/weapon/hatchet/unathiknife,\
/obj/item/weapon/kitchen/utensil/knife,\
/obj/item/weapon/kitchen/utensil/pknife,\
diff --git a/code/modules/mining/ore.dm b/code/modules/mining/ore.dm
index a637c45626..30385d49a5 100644
--- a/code/modules/mining/ore.dm
+++ b/code/modules/mining/ore.dm
@@ -2,6 +2,7 @@
name = "rock"
icon = 'icons/obj/mining.dmi'
icon_state = "ore2"
+ w_class = 2
var/datum/geosample/geologic_data
var/oretag
diff --git a/code/modules/projectiles/guns/launcher/pneumatic.dm b/code/modules/projectiles/guns/launcher/pneumatic.dm
index 138c823f87..9fac802bda 100644
--- a/code/modules/projectiles/guns/launcher/pneumatic.dm
+++ b/code/modules/projectiles/guns/launcher/pneumatic.dm
@@ -12,7 +12,7 @@
var/fire_pressure // Used in fire checks/pressure checks.
var/max_w_class = 3 // Hopper intake size.
- var/max_combined_w_class = 20 // Total internal storage size.
+ var/max_storage_space = 20 // Total internal storage size.
var/obj/item/weapon/tank/tank = null // Tank of gas for use in firing the cannon.
var/obj/item/weapon/storage/tank_container // Something to hold the tank item so we don't accidentally fire it.
var/pressure_setting = 10 // Percentage of the gas in the tank used to fire the projectile.
@@ -64,13 +64,13 @@
else if(istype(W) && W.w_class <= max_w_class)
var/total_stored = 0
for(var/obj/item/O in src.contents)
- total_stored += O.w_class
- if(total_stored + W.w_class <= max_combined_w_class)
+ total_stored += O.get_storage_cost()
+ if(total_stored + W.get_storage_cost() <= max_storage_space)
user.drop_item(W)
W.loc = src
user << "You shove [W] into the hopper."
else
- user << "That won't fit into the hopper - it's full."
+ user << "That won't fit into the hopper - it's too full."
return
else
user << "That won't fit into the hopper."
diff --git a/code/modules/reagents/reagent_containers/glass.dm b/code/modules/reagents/reagent_containers/glass.dm
index d49f8d1d2a..1175ac60c4 100644
--- a/code/modules/reagents/reagent_containers/glass.dm
+++ b/code/modules/reagents/reagent_containers/glass.dm
@@ -12,6 +12,7 @@
amount_per_transfer_from_this = 10
possible_transfer_amounts = list(5,10,15,25,30,60)
volume = 60
+ w_class = 2
flags = OPENCONTAINER
var/label_text = ""
diff --git a/code/modules/research/xenoarchaeology/finds/finds.dm b/code/modules/research/xenoarchaeology/finds/finds.dm
index 518b2ddc40..1525ff956b 100644
--- a/code/modules/research/xenoarchaeology/finds/finds.dm
+++ b/code/modules/research/xenoarchaeology/finds/finds.dm
@@ -208,7 +208,8 @@
new_item.icon_state = "box"
var/obj/item/weapon/storage/box/new_box = new_item
new_box.max_w_class = pick(1,2,2,3,3,3,4,4)
- new_box.max_combined_w_class = rand(new_box.max_w_class, new_box.max_w_class * 10)
+ var/storage_amount = 2**(new_box.max_w_class-1)
+ new_box.max_storage_space = rand(storage_amount, storage_amount * 10)
if(prob(30))
apply_image_decorations = 1
if(12)
diff --git a/code/modules/research/xenoarchaeology/tools/tools.dm b/code/modules/research/xenoarchaeology/tools/tools.dm
index bd1b9d8505..e16db119c5 100644
--- a/code/modules/research/xenoarchaeology/tools/tools.dm
+++ b/code/modules/research/xenoarchaeology/tools/tools.dm
@@ -31,6 +31,6 @@
slot_flags = SLOT_BELT | SLOT_POCKET
w_class = 3
storage_slots = 50
- max_combined_w_class = 200 //Doesn't matter what this is, so long as it's more or equal to storage_slots * ore.w_class
+ 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_w_class = 3
can_hold = list(/obj/item/weapon/fossil)
diff --git a/code/modules/research/xenoarchaeology/tools/tools_pickaxe.dm b/code/modules/research/xenoarchaeology/tools/tools_pickaxe.dm
index dbe979d374..1762cfbb0d 100644
--- a/code/modules/research/xenoarchaeology/tools/tools_pickaxe.dm
+++ b/code/modules/research/xenoarchaeology/tools/tools_pickaxe.dm
@@ -117,8 +117,8 @@
/obj/item/weapon/pickaxe/four_pick,\
/obj/item/weapon/pickaxe/five_pick,\
/obj/item/weapon/pickaxe/six_pick)
- max_combined_w_class = 17
- max_w_class = 4
+ max_storage_space = 18
+ max_w_class = 3
use_to_pickup = 1 // for picking up broken bulbs, not that most people will try
/obj/item/weapon/storage/box/excavation/New()