From a888c7c29afbf12349c088de757e8165a4b4b7ea Mon Sep 17 00:00:00 2001 From: kevinz000 <2003111+kevinz000@users.noreply.github.com> Date: Thu, 9 Apr 2020 02:52:32 -0700 Subject: [PATCH] continue --- code/_onclick/hud/screen_objects/storage.dm | 10 ++++++++++ code/datums/components/storage/storage.dm | 13 ++++++------- code/datums/components/storage/ui.dm | 9 +++------ code/game/objects/items.dm | 6 +++--- 4 files changed, 22 insertions(+), 16 deletions(-) diff --git a/code/_onclick/hud/screen_objects/storage.dm b/code/_onclick/hud/screen_objects/storage.dm index 56d921472c..04436a3b5a 100644 --- a/code/_onclick/hud/screen_objects/storage.dm +++ b/code/_onclick/hud/screen_objects/storage.dm @@ -40,7 +40,17 @@ S.hide_from(usr) return TRUE +/obj/screen/storage/left + icon_state = "storage_start" + +/obj/screen/storage/right + icon_state = "storage_end" + +/obj/screen/storage/continuous + icon_state = "storage_continue" + /obj/screen/storage/volumetric_box + icon_state = "stored_8px" var/obj/item/our_item /obj/screen/storage/volumetric_box/Initialize(mapload, new_master, our_item) diff --git a/code/datums/components/storage/storage.dm b/code/datums/components/storage/storage.dm index 8f053961e5..5fe5543f38 100644 --- a/code/datums/components/storage/storage.dm +++ b/code/datums/components/storage/storage.dm @@ -55,7 +55,7 @@ /// New volumetric storage display mode's center 'blocks' var/obj/screen/storage/continuous/ui_continuous /// The close button, used in all modes. - var/obj/screen/storage/close/ui_closer + var/obj/screen/storage/close/ui_close /// Associative list of list(item = screen object) for volumetric storage item screen blocks var/list/ui_item_blocks @@ -132,7 +132,7 @@ /datum/component/storage/Destroy() close_all() QDEL_NULL(ui_boxes) - QDEL_NULL(ui_closer) + QDEL_NULL(ui_close) QDEL_NULL(ui_continuous) QDEL_NULL(ui_left) QDEL_NULL(ui_right) @@ -327,8 +327,7 @@ if(check_locked()) close_all() - -/datum/component/storage/proc/close(mob/M) +/datui_um/component/storage/proc/close(mob/M) hide_from(M) /datum/component/storage/proc/close_all() @@ -376,7 +375,7 @@ /datum/component/storage/proc/refresh_mob_views() var/list/seeing = can_see_contents() for(var/i in seeing) - show_to(i) + ui_show_to(i) return TRUE /datum/component/storage/proc/can_see_contents() @@ -473,7 +472,7 @@ A.add_fingerprint(M) if(!force && (check_locked(null, M) || !M.CanReach(parent, view_only = TRUE))) return FALSE - show_to(M, !ghost) + ui_show_to(M, !ghost) /datum/component/storage/proc/mousedrop_receive(datum/source, atom/movable/O, mob/M) if(isitem(O)) @@ -656,7 +655,7 @@ if(A.loc == user) . = COMPONENT_NO_ATTACK_HAND if(!check_locked(source, user, TRUE)) - show_to(user) + ui_show_to(user) A.do_jiggle() /datum/component/storage/proc/signal_on_pickup(datum/source, mob/user) diff --git a/code/datums/components/storage/ui.dm b/code/datums/components/storage/ui.dm index 7b7f39e1e7..c062922700 100644 --- a/code/datums/components/storage/ui.dm +++ b/code/datums/components/storage/ui.dm @@ -131,21 +131,18 @@ var/xshift = FLOOR(pixel / 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]" - pixels += px - if(pixels >= horizontal_pixels) - row++ // finally add our things. . += B . += I // Then, continuous section. - ui_continuous.screen_loc = "[screen_start_x]:[screen_pixel_x],[screen_start_y]:[screen_pixel_y] to [screen_start_x+maxcolumns-1]:[screen_pixel_x],[screen_start_y+rows-1]:[screen_pixel_y]" + ui_continuous.screen_loc = "[screen_start_x]:[screen_pixel_x],[screen_start_y]:[screen_pixel_y] to [screen_start_x+maxcolumns-1]:[screen_pixel_x],[screen_start_y]:[screen_pixel_y]" . += ui_continuous // Then, left and right. - ui_left.screen_loc = "[screen_start_x]:[screen_pixel_x - 2],[screen_start_y]:[screen_pixel_y] to [screen_start_x]:[screen_pixel_x - 2],[screen_start_y+rows-1]:[screen_pixel_y]" + ui_left.screen_loc = "[screen_start_x]:[screen_pixel_x - 2],[screen_start_y]:[screen_pixel_y] to [screen_start_x]:[screen_pixel_x - 2],[screen_start_y]:[screen_pixel_y]" . += ui_left - ui_right.screen_loc = "[screen_start_x+maxcolumns-1]:[screen_pixel_x + 2],[screen_start_y]:[screen_pixel_y] to [screen_start_x+maxcolumns-1]:[screen_pixel_x + 2],[screen_start_y+rows-1]:[screen_pixel_y]" + ui_right.screen_loc = "[screen_start_x+maxcolumns-1]:[screen_pixel_x + 2],[screen_start_y]:[screen_pixel_y] to [screen_start_x+maxcolumns-1]:[screen_pixel_x + 2],[screen_start_y]:[screen_pixel_y]" . += ui_right // Then, closer. closer.screen_loc = "[screen_start_x + maxcolumns]:[screen_pixel_x],[screen_start_y]:[screen_pixel_y]" diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 6c16cb4060..112595cf19 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -38,7 +38,7 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE) /// 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/w_volume /// The amount of stamina it takes to swing an item in a normal melee attack do not lie to me and say it's for realism because it ain't. If null it will autocalculate from w_class. 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. @@ -862,8 +862,8 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE) 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 +/obj/item/proc/get_w_volume() + return isnull(volume)? AUTOSCALE_VOLUME(w_class) : w_volume /obj/item/proc/embedded(mob/living/carbon/human/embedded_mob) return