mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2025-12-26 10:03:45 +00:00
Updates storage costs
Storage cost of an item is now twice that of the next smallest item, instead of being equal to the w_class. Items with w_class 1 or 2 are unaffected. This produces much better behaviour for containers that are limited by storage space instead of slots, such as how toolboxes are planned to work in a future update.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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,\
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
name = "rock"
|
||||
icon = 'icons/obj/mining.dmi'
|
||||
icon_state = "ore2"
|
||||
w_class = 2
|
||||
var/datum/geosample/geologic_data
|
||||
var/oretag
|
||||
|
||||
|
||||
@@ -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."
|
||||
|
||||
@@ -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 = ""
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user