This commit is contained in:
kevinz000
2020-04-09 23:12:37 -07:00
parent ffe206f3e1
commit 9b13f009fe
3 changed files with 27 additions and 6 deletions
+13 -1
View File
@@ -115,7 +115,7 @@
I = i
var/percent = percentage_by_item[I]
if(!ui_item_blocks[I])
ui_item_blocks[I] = new /obj/screen/storage(null, src, I)
ui_item_blocks[I] = new /obj/screen/storage/volumetric_box(null, src, I)
var/obj/screen/storage/volumetric_box/B = ui_item_blocks[I]
var/pixels_to_use = overrun? MINIMUM_PIXELS_PER_ITEM : max(MINIMUM_PIXELS_PER_ITEM, FLOOR(horizontal_pixels * percent, MINIMUM_PIXELS_PER_ITEM))
@@ -133,6 +133,17 @@
// add the used pixels to pixel after we place the object
pixel += pixels_to_use
// set various things
B.layer = VOLUMETRIC_STORAGE_BOX_LAYER
B.plane = VOLUMETRIC_STORAGE_BOX_PLANE
B.name = I.name
I.mouse_opacity = MOUSE_OPACITY_ICON
I.maptext = ""
I.layer = VOLUMETRIC_STORAGE_ITEM_LAYER
I.plane = VOLUMETRIC_STORAGE_ITEM_PLANE
// finally add our things.
. += B
. += I
@@ -230,6 +241,7 @@
. = list()
for(var/i in ui_item_blocks)
. += ui_item_blocks[i] //get the block not the item
. += i
/**
* Gets our ui_boxes, making it if it doesn't exist.