diff --git a/code/_onclick/hud/screen_objects/storage.dm b/code/_onclick/hud/screen_objects/storage.dm
index 04436a3b5a..a50554787a 100644
--- a/code/_onclick/hud/screen_objects/storage.dm
+++ b/code/_onclick/hud/screen_objects/storage.dm
@@ -37,7 +37,7 @@
/obj/screen/storage/close/Click()
var/datum/component/storage/S = master
- S.hide_from(usr)
+ S.ui_hide(usr)
return TRUE
/obj/screen/storage/left
diff --git a/code/datums/components/storage/concrete/_concrete.dm b/code/datums/components/storage/concrete/_concrete.dm
index 4c8f1b4c97..e044a59668 100644
--- a/code/datums/components/storage/concrete/_concrete.dm
+++ b/code/datums/components/storage/concrete/_concrete.dm
@@ -60,7 +60,7 @@
_contents_limbo = null
if(_user_limbo)
for(var/i in _user_limbo)
- show_to(i)
+ ui_show(i)
_user_limbo = null
/datum/component/storage/concrete/_insert_physical_item(obj/item/I, override = FALSE)
diff --git a/code/datums/components/storage/concrete/emergency.dm b/code/datums/components/storage/concrete/emergency.dm
index 348821a913..faaeada13d 100644
--- a/code/datums/components/storage/concrete/emergency.dm
+++ b/code/datums/components/storage/concrete/emergency.dm
@@ -18,7 +18,7 @@
return
. = COMPONENT_NO_ATTACK_HAND
if(!check_locked(source, user, TRUE))
- show_to(user)
+ ui_show(user)
A.do_jiggle()
if(rustle_sound)
playsound(A, "rustle", 50, 1, -5)
diff --git a/code/datums/components/storage/storage.dm b/code/datums/components/storage/storage.dm
index fd5451e65a..581798c904 100644
--- a/code/datums/components/storage/storage.dm
+++ b/code/datums/components/storage/storage.dm
@@ -88,9 +88,6 @@
max_volume = AUTO_SCALE_STORAGE_VOLUME(max_w_class, max_items)
if(master)
change_master(master)
- boxes = new(null, src)
- closer = new(null, src)
- orient2hud()
RegisterSignal(parent, COMSIG_CONTAINS_STORAGE, .proc/on_check)
RegisterSignal(parent, COMSIG_IS_STORAGE_LOCKED, .proc/check_locked)
diff --git a/code/datums/components/storage/ui.dm b/code/datums/components/storage/ui.dm
index a5c2a787f5..a2c9e31386 100644
--- a/code/datums/components/storage/ui.dm
+++ b/code/datums/components/storage/ui.dm
@@ -39,9 +39,9 @@
// Then orient the actual items.
var/cx = screen_start_x
var/cy = screen_start_y
- if(islist(numerical_display_contents))
- for(var/type in numerical_display_contents)
- var/datum/numbered_display/ND = numerical_display_contents[type]
+ if(islist(numbered_contents))
+ for(var/type in numbered_contents)
+ var/datum/numbered_display/ND = numbered_contents[type]
ND.sample_object.mouse_opacity = MOUSE_OPACITY_OPAQUE
ND.sample_object.screen_loc = "[cx]:[screen_pixel_x],[cy]:[screen_pixel_y]"
ND.sample_object.maptext = "[(ND.number > 1)? "[ND.number]" : ""]"
@@ -82,7 +82,7 @@
var/horizontal_pixels = maxcolumns * world.icon_size
// do the check for fallback for when someone has too much gamer gear
- if((MINIMUM_PIXELS_PER_ITEMS * length(contents)) > horizontal_pixels)
+ if((MINIMUM_PIXELS_PER_ITEM * length(contents)) > horizontal_pixels)
to_chat(user, "[parent] was showed to you in legacy mode due to your items overrunning the three row limit! Consider not carrying too much or bugging a maintainer to raise this limit!")
return orient2hud_legacy(user, maxcolumns)
// after this point we are sure we can somehow fit all items with 8 pixels or more into our one row.
@@ -94,7 +94,7 @@
var/list/volume_by_item = list()
var/list/percentage_by_item = list()
for(var/obj/item/I in contents)
- volume = I.get_volume
+ volume = I.get_w_volume()
used += volume
volume_by_item[I] = volume
percentage_by_item[I] = volume / max_volume
@@ -117,20 +117,14 @@
// now that we have pixels_to_use, place our thing and add it to the returned list.
- // uh oh, increment row or clamp.
- if((horizontal_pixels - pixel) < pixels_to_use)
- if(!pixels_to_use)
- row++
- else
- pixels_to_use = (horizontal_pixels - pixel)
// now, scale the thing
var/multiply = pixels_to_use / VOLUMETRIC_STORAGE_BOX_SIZE
B.transform = matrix(multiply, 0, 0, 0, 1, 0)
// unfortunately since scaling means expand-from-center.. ugh..
var/px_add = (pixels_to_use - VOLUMETRIC_STORAGE_BOX_SIZE) * 0.5
// now, screenloc the thing.
- var/xshift = FLOOR(pixel / icon_size, 1)
- var/px = pixel % world.icon_Size
+ var/xshift = FLOOR(pixel / world.icon_size, 1)
+ var/px = pixel % world.icon_size
B.screen_loc = I.screen_loc = "[screen_start_x + xshift]:[px + px_add],[screen_start_y+rows-1]:[screen_pixel_y]"
// add the used pixels to pixel after we place the object
pixel += pixels_to_use
@@ -215,7 +209,7 @@
*/
/datum/component/storage/proc/volumetric_ui()
var/atom/real_location = real_location()
- return (storage_flags & STORAGE_LIMIT_VOLUME) && (length(real_location.contents) <= MAXIMUM_VOLUMETRIC_OBJECTS) && !display_numeric_stacking
+ return (storage_flags & STORAGE_LIMIT_VOLUME) && (length(real_location.contents) <= MAXIMUM_VOLUMETRIC_ITEMS) && !display_numerical_stacking
/**
* Gets the ui item objects to ui_hide.
diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm
index 112595cf19..19ffb78e52 100644
--- a/code/game/objects/items.dm
+++ b/code/game/objects/items.dm
@@ -863,7 +863,7 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
/// Get an item's volume that it uses when being stored.
/obj/item/proc/get_w_volume()
- return isnull(volume)? AUTOSCALE_VOLUME(w_class) : w_volume
+ return isnull(volume)? AUTO_SCALE_VOLUME(w_class) : w_volume
/obj/item/proc/embedded(mob/living/carbon/human/embedded_mob)
return