storage
This commit is contained in:
@@ -33,7 +33,12 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
|
||||
var/hitsound = null
|
||||
var/usesound = null
|
||||
var/throwhitsound = null
|
||||
|
||||
/// Weight class for how much storage capacity it uses and how big it physically is meaning storages can't hold it if their maximum weight class isn't as high as it.
|
||||
var/w_class = WEIGHT_CLASS_NORMAL
|
||||
/// Volume override for the item, otherwise automatically calculated from w_class.
|
||||
var/volume
|
||||
|
||||
var/total_mass //Total mass in arbitrary pound-like values. If there's no balance reasons for an item to have otherwise, this var should be the item's weight in pounds.
|
||||
var/slot_flags = 0 //This is used to determine on which slots an item can fit.
|
||||
pass_flags = PASSTABLE
|
||||
@@ -850,3 +855,7 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
|
||||
if (HAS_TRAIT(src, TRAIT_NODROP))
|
||||
return
|
||||
return ..()
|
||||
|
||||
/// Get an item's volume that it uses when being stored.
|
||||
/obj/item/proc/get_volume()
|
||||
return isnull(volume)? AUTOSCALE_VOLUME(w_class) : volume
|
||||
|
||||
Reference in New Issue
Block a user