mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-27 22:18:27 +01:00
Centralizes weight class definitions
A lot of new defines are now in inventory_sizes.dm, which contains; All the size identifiers (the thing that tells the game if something is bulky, or w/e). Storage costs for all the sizes, which are exponents of two, as previously. A few constants for inventory size. Also changes all storage item's capacity definitions by basing it off of how many 'normal slots' exist for it. This allows one to change the definition for all of the defines in the file, and everything will follow along without needing to change 500 files. In testing, I made all ITEMSIZE_COST_* defines doubled, and nothing had broke. The benefit of doing all of this is that it makes adding new weight classes in the future much simpler, and makes knowing how much space a container has easier, as seeing ITEMSIZE_COST_NORMAL * 7 means it can hold seven normal items.
This commit is contained in:
@@ -14,7 +14,7 @@ LINEN BINS
|
||||
throwforce = 1
|
||||
throw_speed = 1
|
||||
throw_range = 2
|
||||
w_class = 2.0
|
||||
w_class = ITEMSIZE_SMALL
|
||||
|
||||
/obj/item/weapon/bedsheet/attack_self(mob/user as mob)
|
||||
user.drop_item()
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
icon = 'icons/obj/closet.dmi'
|
||||
icon_state = "closed"
|
||||
density = 1
|
||||
w_class = 5
|
||||
w_class = ITEMSIZE_HUGE
|
||||
var/icon_closed = "closed"
|
||||
var/icon_opened = "open"
|
||||
var/opened = 0
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
icon_state = "door_as_0"
|
||||
anchored = 0
|
||||
density = 1
|
||||
w_class = 5
|
||||
w_class = ITEMSIZE_HUGE
|
||||
var/state = 0
|
||||
var/base_icon_state = ""
|
||||
var/base_name = "airlock"
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
anchored = 1
|
||||
density = 1
|
||||
layer = 2
|
||||
w_class = 5
|
||||
w_class = ITEMSIZE_HUGE
|
||||
var/state = 0
|
||||
var/health = 200
|
||||
var/cover = 50 //how much cover the girder provides against projectiles.
|
||||
|
||||
@@ -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
|
||||
w_class = ITEMSIZE_NORMAL
|
||||
|
||||
attack_self(mob/user)
|
||||
playsound(loc, 'sound/items/zip.ogg', 75, 1)
|
||||
@@ -248,8 +248,8 @@
|
||||
desc = "Contains inflatable walls and doors."
|
||||
icon_state = "inf_box"
|
||||
item_state = "syringe_kit"
|
||||
w_class = 3
|
||||
max_storage_space = 28
|
||||
w_class = ITEMSIZE_NORMAL
|
||||
max_storage_space = ITEMSIZE_COST_NORMAL * 7
|
||||
can_hold = list(/obj/item/inflatable)
|
||||
|
||||
New()
|
||||
|
||||
@@ -291,4 +291,4 @@
|
||||
desc = "A keyring with a small steel key, and a pink fob reading \"Pussy Wagon\"."
|
||||
icon = 'icons/obj/vehicles.dmi'
|
||||
icon_state = "keys"
|
||||
w_class = 1
|
||||
w_class = ITEMSIZE_TINY
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
icon_state = "latticefull"
|
||||
density = 0
|
||||
anchored = 1.0
|
||||
w_class = 3
|
||||
w_class = ITEMSIZE_NORMAL
|
||||
layer = 2.3 //under pipes
|
||||
// flags = CONDUCT
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
icon = 'icons/obj/janitor.dmi'
|
||||
icon_state = "mopbucket"
|
||||
density = 1
|
||||
w_class = 3
|
||||
w_class = ITEMSIZE_NORMAL
|
||||
pressure_resistance = 5
|
||||
flags = OPENCONTAINER
|
||||
var/amount_per_transfer_from_this = 5 //shit I dunno, adding this so syringes stop runtime erroring. --NeoFite
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
opacity = 0
|
||||
density = 0
|
||||
layer = 3.5
|
||||
w_class = 3
|
||||
w_class = ITEMSIZE_NORMAL
|
||||
|
||||
/obj/structure/sign/ex_act(severity)
|
||||
switch(severity)
|
||||
@@ -37,7 +37,7 @@
|
||||
name = "sign"
|
||||
desc = ""
|
||||
icon = 'icons/obj/decals.dmi'
|
||||
w_class = 3 //big
|
||||
w_class = ITEMSIZE_NORMAL //big
|
||||
var/sign_state = ""
|
||||
|
||||
/obj/item/sign/attackby(obj/item/tool as obj, mob/user as mob) //construction
|
||||
|
||||
@@ -226,7 +226,7 @@
|
||||
desc = "A collapsed roller bed that can be carried around."
|
||||
icon = 'icons/obj/rollerbed.dmi'
|
||||
icon_state = "folded"
|
||||
w_class = 4.0 // Can't be put in backpacks. Oh well.
|
||||
w_class = ITEMSIZE_LARGE // Can't be put in backpacks. Oh well.
|
||||
|
||||
/obj/item/roller/attack_self(mob/user)
|
||||
var/obj/structure/bed/roller/R = new /obj/structure/bed/roller(user.loc)
|
||||
|
||||
@@ -8,7 +8,7 @@ var/global/list/stool_cache = list() //haha stool
|
||||
icon_state = "stool_preview" //set for the map
|
||||
force = 10
|
||||
throwforce = 10
|
||||
w_class = 5
|
||||
w_class = ITEMSIZE_HUGE
|
||||
var/base_icon = "stool_base"
|
||||
var/material/material
|
||||
var/material/padding_material
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
icon_state = "dispenser"
|
||||
density = 1
|
||||
anchored = 1.0
|
||||
w_class = 5
|
||||
w_class = ITEMSIZE_HUGE
|
||||
var/oxygentanks = 10
|
||||
var/phorontanks = 10
|
||||
var/list/oxytanks = list() //sorry for the similar var names
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
icon = 'icons/obj/objects.dmi'
|
||||
icon_state = "target_stake"
|
||||
density = 1
|
||||
w_class = 5
|
||||
w_class = ITEMSIZE_HUGE
|
||||
flags = CONDUCT
|
||||
var/obj/item/target/pinned_target // the current pinned target
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ obj/structure/windoor_assembly
|
||||
anchored = 0
|
||||
density = 0
|
||||
dir = NORTH
|
||||
w_class = 3
|
||||
w_class = ITEMSIZE_NORMAL
|
||||
|
||||
var/obj/item/weapon/airlock_electronics/electronics = null
|
||||
var/created_name = null
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
desc = "A window."
|
||||
icon = 'icons/obj/structures.dmi'
|
||||
density = 1
|
||||
w_class = 3
|
||||
w_class = ITEMSIZE_NORMAL
|
||||
|
||||
layer = 3.2//Just above doors
|
||||
pressure_resistance = 4*ONE_ATMOSPHERE
|
||||
|
||||
Reference in New Issue
Block a user