mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2025-12-10 18:02:57 +00:00
The bag of holding (and I guess backpack) balancing pass no one asked for (#11864)
* Ok * whew * ok * fix * ehh * fix * buff disks * Update _compile_options.dm * Update tgstation.dme
This commit is contained in:
@@ -256,6 +256,9 @@
|
|||||||
// THE FOLLOWING TWO BLOCKS SHOULD RETURN BLOCK FLAGS AS DEFINED IN __DEFINES/combat.dm!
|
// THE FOLLOWING TWO BLOCKS SHOULD RETURN BLOCK FLAGS AS DEFINED IN __DEFINES/combat.dm!
|
||||||
#define COMSIG_ITEM_CHECK_BLOCK "check_block" //from base of obj/item/check_block(): (mob/living/owner, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, final_block_chance, list/block_return)
|
#define COMSIG_ITEM_CHECK_BLOCK "check_block" //from base of obj/item/check_block(): (mob/living/owner, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, final_block_chance, list/block_return)
|
||||||
#define COMSIG_ITEM_RUN_BLOCK "run_block" //from base of obj/item/run_block(): (mob/living/owner, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, final_block_chance, list/block_return)
|
#define COMSIG_ITEM_RUN_BLOCK "run_block" //from base of obj/item/run_block(): (mob/living/owner, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, final_block_chance, list/block_return)
|
||||||
|
// Item mouse siganls
|
||||||
|
#define COMSIG_ITEM_MOUSE_EXIT "item_mouse_exit" //from base of obj/item/MouseExited(): (location, control, params)
|
||||||
|
#define COMSIG_ITEM_MOUSE_ENTER "item_mouse_enter" //from base of obj/item/MouseEntered(): (location, control, params)
|
||||||
#define COMSIG_ITEM_DECONSTRUCTOR_DEEPSCAN "deconstructor_deepscan" //Called by deconstructive analyzers deepscanning an item: (obj/machinery/rnd/destructive_analyzer/analyzer_machine, mob/user, list/information_list)
|
#define COMSIG_ITEM_DECONSTRUCTOR_DEEPSCAN "deconstructor_deepscan" //Called by deconstructive analyzers deepscanning an item: (obj/machinery/rnd/destructive_analyzer/analyzer_machine, mob/user, list/information_list)
|
||||||
// Uncovered information
|
// Uncovered information
|
||||||
#define COMPONENT_DEEPSCAN_UNCOVERED_INFORMATION 1
|
#define COMPONENT_DEEPSCAN_UNCOVERED_INFORMATION 1
|
||||||
|
|||||||
@@ -143,13 +143,15 @@
|
|||||||
|
|
||||||
#define VOLUMETRIC_STORAGE_ITEM_PLANE 24
|
#define VOLUMETRIC_STORAGE_ITEM_PLANE 24
|
||||||
#define VOLUMETRIC_STORAGE_ITEM_LAYER 24
|
#define VOLUMETRIC_STORAGE_ITEM_LAYER 24
|
||||||
|
#define VOLUMETRIC_STORAGE_ACTIVE_ITEM_LAYER 25
|
||||||
|
#define VOLUMETRIC_STORAGE_ACTIVE_ITEM_PLANE 25
|
||||||
#define VOLUMETRIC_STORAGE_ITEM_RENDER_TARGET "VOLUME_STORAGE_ITEM_PLANE"
|
#define VOLUMETRIC_STORAGE_ITEM_RENDER_TARGET "VOLUME_STORAGE_ITEM_PLANE"
|
||||||
|
|
||||||
#define ABOVE_HUD_PLANE 25
|
#define ABOVE_HUD_PLANE 30
|
||||||
#define ABOVE_HUD_LAYER 25
|
#define ABOVE_HUD_LAYER 30
|
||||||
#define ABOVE_HUD_RENDER_TARGET "ABOVE_HUD_PLANE"
|
#define ABOVE_HUD_RENDER_TARGET "ABOVE_HUD_PLANE"
|
||||||
|
|
||||||
#define SPLASHSCREEN_LAYER 30
|
#define SPLASHSCREEN_LAYER 90
|
||||||
#define SPLASHSCREEN_PLANE 30
|
#define SPLASHSCREEN_PLANE 90
|
||||||
#define SPLASHSCREEN_RENDER_TARGET "SPLASHSCREEN_PLANE"
|
#define SPLASHSCREEN_RENDER_TARGET "SPLASHSCREEN_PLANE"
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,21 @@
|
|||||||
#define STORAGE_LIMIT_MAX_W_CLASS (1<<3)
|
#define STORAGE_LIMIT_MAX_W_CLASS (1<<3)
|
||||||
|
|
||||||
#define STORAGE_FLAGS_LEGACY_DEFAULT (STORAGE_LIMIT_MAX_ITEMS | STORAGE_LIMIT_COMBINED_W_CLASS | STORAGE_LIMIT_MAX_W_CLASS)
|
#define STORAGE_FLAGS_LEGACY_DEFAULT (STORAGE_LIMIT_MAX_ITEMS | STORAGE_LIMIT_COMBINED_W_CLASS | STORAGE_LIMIT_MAX_W_CLASS)
|
||||||
#define STORAGE_FLAGS_VOLUME_DEFAULT (STORAGE_LIMIT_MAX_ITEMS | STORAGE_LIMIT_VOLUME | STORAGE_LIMIT_MAX_W_CLASS)
|
#define STORAGE_FLAGS_VOLUME_DEFAULT (STORAGE_LIMIT_VOLUME | STORAGE_LIMIT_MAX_W_CLASS)
|
||||||
|
|
||||||
|
// UI defines
|
||||||
|
/// Size of volumetric box icon
|
||||||
|
#define VOLUMETRIC_STORAGE_BOX_ICON_SIZE 32
|
||||||
|
/// Size of EACH left/right border icon for volumetric boxes
|
||||||
|
#define VOLUMETRIC_STORAGE_BOX_BORDER_SIZE 1
|
||||||
|
/// Minimum pixels an item must have in volumetric scaled storage UI
|
||||||
|
#define MINIMUM_PIXELS_PER_ITEM 8
|
||||||
|
/// Maximum number of objects that will be allowed to be displayed using the volumetric display system. Arbitrary number to prevent server lockups.
|
||||||
|
#define MAXIMUM_VOLUMETRIC_ITEMS 256
|
||||||
|
/// How much padding to give between items
|
||||||
|
#define VOLUMETRIC_STORAGE_ITEM_PADDING 4
|
||||||
|
/// How much padding to give to edges
|
||||||
|
#define VOLUMETRIC_STORAGE_EDGE_PADDING 1
|
||||||
|
|
||||||
//ITEM INVENTORY WEIGHT, FOR w_class
|
//ITEM INVENTORY WEIGHT, FOR w_class
|
||||||
/// Usually items smaller then a human hand, ex: Playing Cards, Lighter, Scalpel, Coins/Money
|
/// Usually items smaller then a human hand, ex: Playing Cards, Lighter, Scalpel, Coins/Money
|
||||||
@@ -26,22 +40,3 @@
|
|||||||
#define WEIGHT_CLASS_HUGE 5
|
#define WEIGHT_CLASS_HUGE 5
|
||||||
/// Essentially means it cannot be picked up or placed in an inventory, ex: Mech Parts, Safe - Can not fit in Boh
|
/// Essentially means it cannot be picked up or placed in an inventory, ex: Mech Parts, Safe - Can not fit in Boh
|
||||||
#define WEIGHT_CLASS_GIGANTIC 6
|
#define WEIGHT_CLASS_GIGANTIC 6
|
||||||
|
|
||||||
/// Macro for automatically getting the volume of an item from its w_class.
|
|
||||||
#define AUTO_SCALE_VOLUME(w_class) (2 ** w_class)
|
|
||||||
/// Macro for automatically getting the volume of a storage item from its max_w_class and max_combined_w_class.
|
|
||||||
#define AUTO_SCALE_STORAGE_VOLUME(w_class, max_combined_w_class) (AUTO_SCALE_VOLUME(w_class) * (max_combined_w_class / w_class))
|
|
||||||
|
|
||||||
// UI defines
|
|
||||||
/// Size of volumetric box icon
|
|
||||||
#define VOLUMETRIC_STORAGE_BOX_ICON_SIZE 32
|
|
||||||
/// Size of EACH left/right border icon for volumetric boxes
|
|
||||||
#define VOLUMETRIC_STORAGE_BOX_BORDER_SIZE 1
|
|
||||||
/// Minimum pixels an item must have in volumetric scaled storage UI
|
|
||||||
#define MINIMUM_PIXELS_PER_ITEM 6
|
|
||||||
/// Maximum number of objects that will be allowed to be displayed using the volumetric display system. Arbitrary number to prevent server lockups.
|
|
||||||
#define MAXIMUM_VOLUMETRIC_ITEMS 256
|
|
||||||
/// How much padding to give between items
|
|
||||||
#define VOLUMETRIC_STORAGE_ITEM_PADDING 1
|
|
||||||
/// How much padding to give to edges
|
|
||||||
#define VOLUMETRIC_STORAGE_EDGE_PADDING 1
|
|
||||||
39
code/__DEFINES/storage/volumetrics.dm
Normal file
39
code/__DEFINES/storage/volumetrics.dm
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
// PLEASE KEEP ALL VOLUME DEFINES IN THIS FILE, it's going to be hell to keep track of them later.
|
||||||
|
|
||||||
|
#define DEFAULT_VOLUME_TINY 2
|
||||||
|
#define DEFAULT_VOLUME_SMALL 3
|
||||||
|
#define DEFAULT_VOLUME_NORMAL 4
|
||||||
|
#define DEFAULT_VOLUME_BULKY 8
|
||||||
|
#define DEFAULT_VOLUME_HUGE 16
|
||||||
|
#define DEFAULT_VOLUME_GIGANTIC 32
|
||||||
|
|
||||||
|
GLOBAL_LIST_INIT(default_weight_class_to_volume, list(
|
||||||
|
"[WEIGHT_CLASS_TINY]" = DEFAULT_VOLUME_TINY,
|
||||||
|
"[WEIGHT_CLASS_SMALL]" = DEFAULT_VOLUME_SMALL,
|
||||||
|
"[WEIGHT_CLASS_NORMAL]" = DEFAULT_VOLUME_NORMAL,
|
||||||
|
"[WEIGHT_CLASS_BULKY]" = DEFAULT_VOLUME_BULKY,
|
||||||
|
"[WEIGHT_CLASS_HUGE]" = DEFAULT_VOLUME_HUGE,
|
||||||
|
"[WEIGHT_CLASS_GIGANTIC]" = DEFAULT_VOLUME_GIGANTIC
|
||||||
|
))
|
||||||
|
|
||||||
|
/// Macro for automatically getting the volume of an item from its w_class.
|
||||||
|
#define AUTO_SCALE_VOLUME(w_class) (GLOB.default_weight_class_to_volume["[w_class]"])
|
||||||
|
/// Macro for automatically getting the volume of a storage item from its max_w_class and max_combined_w_class.
|
||||||
|
#define AUTO_SCALE_STORAGE_VOLUME(w_class, max_combined_w_class) (AUTO_SCALE_VOLUME(w_class) * (max_combined_w_class / w_class))
|
||||||
|
|
||||||
|
// Let's keep all of this in one place. given what we put above anyways..
|
||||||
|
|
||||||
|
// volume amount for items
|
||||||
|
#define ITEM_VOLUME_DISK DEFAULT_VOLUME_TINY
|
||||||
|
|
||||||
|
// #define SAMPLE_VOLUME_AMOUNT 2
|
||||||
|
|
||||||
|
// max_weight_class for storages
|
||||||
|
#define MAX_WEIGHT_CLASS_BACKPACK WEIGHT_CLASS_NORMAL
|
||||||
|
#define MAX_WEIGHT_CLASS_BAG_OF_HOLDING WEIGHT_CLASS_BULKY
|
||||||
|
|
||||||
|
// max_volume for storages
|
||||||
|
#define STORAGE_VOLUME_BACKPACK (DEFAULT_VOLUME_NORMAL * 7)
|
||||||
|
#define STORAGE_VOLUME_DUFFLEBAG (DEFAULT_VOLUME_NORMAL * 10)
|
||||||
|
#define STORAGE_VOLUME_BAG_OF_HOLDING (DEFAULT_VOLUME_NORMAL * 20)
|
||||||
|
|
||||||
@@ -54,10 +54,14 @@
|
|||||||
|
|
||||||
/obj/screen/storage/volumetric_box
|
/obj/screen/storage/volumetric_box
|
||||||
icon_state = "stored_continue"
|
icon_state = "stored_continue"
|
||||||
|
layer = VOLUMETRIC_STORAGE_BOX_LAYER
|
||||||
|
plane = VOLUMETRIC_STORAGE_BOX_PLANE
|
||||||
var/obj/item/our_item
|
var/obj/item/our_item
|
||||||
|
|
||||||
/obj/screen/storage/volumetric_box/Initialize(mapload, new_master, our_item)
|
/obj/screen/storage/volumetric_box/Initialize(mapload, new_master, obj/item/our_item)
|
||||||
src.our_item = our_item
|
src.our_item = our_item
|
||||||
|
RegisterSignal(our_item, COMSIG_ITEM_MOUSE_ENTER, .proc/on_item_mouse_enter)
|
||||||
|
RegisterSignal(our_item, COMSIG_ITEM_MOUSE_EXIT, .proc/on_item_mouse_exit)
|
||||||
return ..()
|
return ..()
|
||||||
|
|
||||||
/obj/screen/storage/volumetric_box/Destroy()
|
/obj/screen/storage/volumetric_box/Destroy()
|
||||||
@@ -70,10 +74,30 @@
|
|||||||
/obj/screen/storage/volumetric_box/MouseDrop(atom/over, src_location, over_location, src_control, over_control, params)
|
/obj/screen/storage/volumetric_box/MouseDrop(atom/over, src_location, over_location, src_control, over_control, params)
|
||||||
return our_item.MouseDrop(over, src_location, over_location, src_control, over_control, params)
|
return our_item.MouseDrop(over, src_location, over_location, src_control, over_control, params)
|
||||||
|
|
||||||
|
/obj/screen/storage/volumetric_box/MouseExited(location, control, params)
|
||||||
|
makeItemInactive()
|
||||||
|
|
||||||
|
/obj/screen/storage/volumetric_box/MouseEntered(location, control, params)
|
||||||
|
makeItemActive()
|
||||||
|
|
||||||
|
/obj/screen/storage/volumetric_box/proc/on_item_mouse_enter()
|
||||||
|
makeItemActive()
|
||||||
|
|
||||||
|
/obj/screen/storage/volumetric_box/proc/on_item_mouse_exit()
|
||||||
|
makeItemInactive()
|
||||||
|
|
||||||
|
/obj/screen/storage/volumetric_box/proc/makeItemInactive()
|
||||||
|
our_item.layer = VOLUMETRIC_STORAGE_ITEM_LAYER
|
||||||
|
our_item.plane = VOLUMETRIC_STORAGE_ITEM_PLANE
|
||||||
|
|
||||||
|
/obj/screen/storage/volumetric_box/proc/makeItemActive()
|
||||||
|
our_item.layer = VOLUMETRIC_STORAGE_ACTIVE_ITEM_LAYER //make sure we display infront of the others!
|
||||||
|
our_item.plane = VOLUMETRIC_STORAGE_ACTIVE_ITEM_PLANE
|
||||||
|
|
||||||
/obj/screen/storage/volumetric_box/center
|
/obj/screen/storage/volumetric_box/center
|
||||||
icon_state = "stored_continue"
|
icon_state = "stored_continue"
|
||||||
var/obj/screen/storage/stored_left/left
|
var/obj/screen/storage/volumetric_edge/stored_left/left
|
||||||
var/obj/screen/storage/stored_right/right
|
var/obj/screen/storage/volumetric_edge/stored_right/right
|
||||||
var/pixel_size
|
var/pixel_size
|
||||||
|
|
||||||
/obj/screen/storage/volumetric_box/center/Initialize(mapload, new_master, our_item)
|
/obj/screen/storage/volumetric_box/center/Initialize(mapload, new_master, our_item)
|
||||||
@@ -87,7 +111,7 @@
|
|||||||
return ..()
|
return ..()
|
||||||
|
|
||||||
/obj/screen/storage/volumetric_box/center/proc/on_screen_objects()
|
/obj/screen/storage/volumetric_box/center/proc/on_screen_objects()
|
||||||
return list(src, left, right)
|
return list(src)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the size of this box screen object and regenerates its left/right borders. This includes the actual border's size!
|
* Sets the size of this box screen object and regenerates its left/right borders. This includes the actual border's size!
|
||||||
@@ -96,18 +120,38 @@
|
|||||||
if(pixel_size == pixels)
|
if(pixel_size == pixels)
|
||||||
return
|
return
|
||||||
pixel_size = pixels
|
pixel_size = pixels
|
||||||
cut_overlays()
|
cut_overlays(TRUE)
|
||||||
//our icon size is 32 pixels.
|
//our icon size is 32 pixels.
|
||||||
transform = matrix((pixels - (VOLUMETRIC_STORAGE_BOX_BORDER_SIZE * 2)) / VOLUMETRIC_STORAGE_BOX_ICON_SIZE, 0, 0, 0, 1, 0)
|
transform = matrix((pixels - (VOLUMETRIC_STORAGE_BOX_BORDER_SIZE * 2)) / VOLUMETRIC_STORAGE_BOX_ICON_SIZE, 0, 0, 0, 1, 0)
|
||||||
left.pixel_x = -((pixels - VOLUMETRIC_STORAGE_BOX_ICON_SIZE) * 0.5) - VOLUMETRIC_STORAGE_BOX_BORDER_SIZE
|
left.pixel_x = -((pixels - VOLUMETRIC_STORAGE_BOX_ICON_SIZE) * 0.5) - VOLUMETRIC_STORAGE_BOX_BORDER_SIZE
|
||||||
right.pixel_x = ((pixels - VOLUMETRIC_STORAGE_BOX_ICON_SIZE) * 0.5) + VOLUMETRIC_STORAGE_BOX_BORDER_SIZE
|
right.pixel_x = ((pixels - VOLUMETRIC_STORAGE_BOX_ICON_SIZE) * 0.5) + VOLUMETRIC_STORAGE_BOX_BORDER_SIZE
|
||||||
add_overlay(left)
|
add_overlay(left, TRUE)
|
||||||
add_overlay(right)
|
add_overlay(right, TRUE)
|
||||||
|
|
||||||
/obj/screen/storage/stored_left
|
/obj/screen/storage/volumetric_edge
|
||||||
|
layer = VOLUMETRIC_STORAGE_BOX_LAYER
|
||||||
|
plane = VOLUMETRIC_STORAGE_BOX_PLANE
|
||||||
|
|
||||||
|
/obj/screen/storage/volumetric_edge/Initialize(mapload, master, our_item)
|
||||||
|
src.master = master
|
||||||
|
return ..()
|
||||||
|
|
||||||
|
/obj/screen/storage/volumetric_edge/Click(location, control, params)
|
||||||
|
return master.Click(location, control, params)
|
||||||
|
|
||||||
|
/obj/screen/storage/volumetric_edge/MouseDrop(atom/over, src_location, over_location, src_control, over_control, params)
|
||||||
|
return master.MouseDrop(over, src_location, over_location, src_control, over_control, params)
|
||||||
|
|
||||||
|
/obj/screen/storage/volumetric_edge/MouseExited(location, control, params)
|
||||||
|
return master.MouseExited(location, control, params)
|
||||||
|
|
||||||
|
/obj/screen/storage/volumetric_edge/MouseEntered(location, control, params)
|
||||||
|
return master.MouseEntered(location, control, params)
|
||||||
|
|
||||||
|
/obj/screen/storage/volumetric_edge/stored_left
|
||||||
icon_state = "stored_start"
|
icon_state = "stored_start"
|
||||||
appearance_flags = APPEARANCE_UI | KEEP_APART | RESET_TRANSFORM // Yes I know RESET_TRANSFORM is in APPEARANCE_UI but we're hard-asserting this incase someone changes it.
|
appearance_flags = APPEARANCE_UI | KEEP_APART | RESET_TRANSFORM // Yes I know RESET_TRANSFORM is in APPEARANCE_UI but we're hard-asserting this incase someone changes it.
|
||||||
|
|
||||||
/obj/screen/storage/stored_right
|
/obj/screen/storage/volumetric_edge/stored_right
|
||||||
icon_state = "stored_end"
|
icon_state = "stored_end"
|
||||||
appearance_flags = APPEARANCE_UI | KEEP_APART | RESET_TRANSFORM
|
appearance_flags = APPEARANCE_UI | KEEP_APART | RESET_TRANSFORM
|
||||||
|
|||||||
@@ -353,8 +353,12 @@
|
|||||||
/datum/component/storage/proc/_remove_and_refresh(datum/source, atom/movable/thing)
|
/datum/component/storage/proc/_remove_and_refresh(datum/source, atom/movable/thing)
|
||||||
_removal_reset(thing)
|
_removal_reset(thing)
|
||||||
if(LAZYACCESS(ui_item_blocks, thing))
|
if(LAZYACCESS(ui_item_blocks, thing))
|
||||||
qdel(ui_item_blocks[thing])
|
var/obj/screen/storage/volumetric_box/center/C = ui_item_blocks[thing]
|
||||||
|
for(var/i in can_see_contents()) //runtimes result if mobs can access post deletion.
|
||||||
|
var/mob/M = i
|
||||||
|
M.client?.screen -= C.on_screen_objects()
|
||||||
ui_item_blocks -= thing
|
ui_item_blocks -= thing
|
||||||
|
qdel(C)
|
||||||
refresh_mob_views()
|
refresh_mob_views()
|
||||||
|
|
||||||
//Call this proc to handle the removal of an item from the storage item. The item will be moved to the new_location target, if that is null it's being deleted
|
//Call this proc to handle the removal of an item from the storage item. The item will be moved to the new_location target, if that is null it's being deleted
|
||||||
|
|||||||
@@ -92,6 +92,8 @@
|
|||||||
var/list/volume_by_item = list()
|
var/list/volume_by_item = list()
|
||||||
var/list/percentage_by_item = list()
|
var/list/percentage_by_item = list()
|
||||||
for(var/obj/item/I in contents)
|
for(var/obj/item/I in contents)
|
||||||
|
if(QDELETED(I))
|
||||||
|
continue
|
||||||
volume = I.get_w_volume()
|
volume = I.get_w_volume()
|
||||||
used += volume
|
used += volume
|
||||||
volume_by_item[I] = volume
|
volume_by_item[I] = volume
|
||||||
@@ -123,6 +125,7 @@
|
|||||||
var/obj/item/I
|
var/obj/item/I
|
||||||
// start at this pixel from screen_start_x.
|
// start at this pixel from screen_start_x.
|
||||||
var/current_pixel = VOLUMETRIC_STORAGE_EDGE_PADDING
|
var/current_pixel = VOLUMETRIC_STORAGE_EDGE_PADDING
|
||||||
|
var/first = TRUE
|
||||||
var/row = 1
|
var/row = 1
|
||||||
|
|
||||||
LAZYINITLIST(ui_item_blocks)
|
LAZYINITLIST(ui_item_blocks)
|
||||||
@@ -140,10 +143,10 @@
|
|||||||
addrow = TRUE
|
addrow = TRUE
|
||||||
|
|
||||||
// now that we have pixels_to_use, place our thing and add it to the returned list.
|
// now that we have pixels_to_use, place our thing and add it to the returned list.
|
||||||
|
B.screen_loc = I.screen_loc = "[screen_start_x]:[round(current_pixel + (pixels_to_use * 0.5) + (first? 0 : VOLUMETRIC_STORAGE_ITEM_PADDING), 1)],[screen_start_y+row-1]:[screen_pixel_y]"
|
||||||
B.screen_loc = I.screen_loc = "[screen_start_x]:[round(current_pixel + (pixels_to_use * 0.5) + VOLUMETRIC_STORAGE_ITEM_PADDING, 1)],[screen_start_y+row-1]:[screen_pixel_y]"
|
|
||||||
// add the used pixels to pixel after we place the object
|
// add the used pixels to pixel after we place the object
|
||||||
current_pixel += pixels_to_use + VOLUMETRIC_STORAGE_ITEM_PADDING
|
current_pixel += pixels_to_use + (first? 0 : VOLUMETRIC_STORAGE_ITEM_PADDING)
|
||||||
|
first = FALSE //apply padding to everything after this
|
||||||
|
|
||||||
// set various things
|
// set various things
|
||||||
B.set_pixel_size(pixels_to_use)
|
B.set_pixel_size(pixels_to_use)
|
||||||
@@ -163,6 +166,7 @@
|
|||||||
// go up a row if needed
|
// go up a row if needed
|
||||||
if(addrow)
|
if(addrow)
|
||||||
row++
|
row++
|
||||||
|
first = TRUE //first in the row, don't apply between-item padding.
|
||||||
current_pixel = VOLUMETRIC_STORAGE_EDGE_PADDING
|
current_pixel = VOLUMETRIC_STORAGE_EDGE_PADDING
|
||||||
|
|
||||||
// Then, continuous section.
|
// Then, continuous section.
|
||||||
|
|||||||
@@ -56,10 +56,6 @@
|
|||||||
em_block = new(src, render_target)
|
em_block = new(src, render_target)
|
||||||
vis_contents += em_block
|
vis_contents += em_block
|
||||||
|
|
||||||
/atom/movable/Destroy()
|
|
||||||
QDEL_NULL(em_block)
|
|
||||||
return ..()
|
|
||||||
|
|
||||||
/atom/movable/proc/update_emissive_block()
|
/atom/movable/proc/update_emissive_block()
|
||||||
if(blocks_emissive != EMISSIVE_BLOCK_GENERIC)
|
if(blocks_emissive != EMISSIVE_BLOCK_GENERIC)
|
||||||
return
|
return
|
||||||
@@ -232,10 +228,12 @@
|
|||||||
/atom/movable/Destroy(force)
|
/atom/movable/Destroy(force)
|
||||||
QDEL_NULL(proximity_monitor)
|
QDEL_NULL(proximity_monitor)
|
||||||
QDEL_NULL(language_holder)
|
QDEL_NULL(language_holder)
|
||||||
|
QDEL_NULL(em_block)
|
||||||
|
|
||||||
unbuckle_all_mobs(force=1)
|
unbuckle_all_mobs(force=1)
|
||||||
|
|
||||||
. = ..()
|
. = ..()
|
||||||
|
|
||||||
if(loc)
|
if(loc)
|
||||||
//Restore air flow if we were blocking it (movables with ATMOS_PASS_PROC will need to do this manually if necessary)
|
//Restore air flow if we were blocking it (movables with ATMOS_PASS_PROC will need to do this manually if necessary)
|
||||||
if(((CanAtmosPass == ATMOS_PASS_DENSITY && density) || CanAtmosPass == ATMOS_PASS_NO) && isturf(loc))
|
if(((CanAtmosPass == ATMOS_PASS_DENSITY && density) || CanAtmosPass == ATMOS_PASS_NO) && isturf(loc))
|
||||||
|
|||||||
@@ -782,10 +782,13 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
|
|||||||
var/user = usr
|
var/user = usr
|
||||||
tip_timer = addtimer(CALLBACK(src, .proc/openTip, location, control, params, user), timedelay, TIMER_STOPPABLE)//timer takes delay in deciseconds, but the pref is in milliseconds. dividing by 100 converts it.
|
tip_timer = addtimer(CALLBACK(src, .proc/openTip, location, control, params, user), timedelay, TIMER_STOPPABLE)//timer takes delay in deciseconds, but the pref is in milliseconds. dividing by 100 converts it.
|
||||||
|
|
||||||
/obj/item/MouseExited()
|
/obj/item/MouseExited(location,control,params)
|
||||||
|
SEND_SIGNAL(src, COMSIG_ITEM_MOUSE_EXIT, location, control, params)
|
||||||
deltimer(tip_timer)//delete any in-progress timer if the mouse is moved off the item before it finishes
|
deltimer(tip_timer)//delete any in-progress timer if the mouse is moved off the item before it finishes
|
||||||
closeToolTip(usr)
|
closeToolTip(usr)
|
||||||
|
|
||||||
|
/obj/item/MouseEntered(location,control,params)
|
||||||
|
SEND_SIGNAL(src, COMSIG_ITEM_MOUSE_ENTER, location, control, params)
|
||||||
|
|
||||||
// Called when a mob tries to use the item as a tool.
|
// Called when a mob tries to use the item as a tool.
|
||||||
// Handles most checks.
|
// Handles most checks.
|
||||||
|
|||||||
@@ -24,9 +24,9 @@
|
|||||||
/obj/item/storage/backpack/ComponentInitialize()
|
/obj/item/storage/backpack/ComponentInitialize()
|
||||||
. = ..()
|
. = ..()
|
||||||
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
|
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
|
||||||
STR.max_combined_w_class = 21
|
STR.storage_flags = STORAGE_FLAGS_VOLUME_DEFAULT
|
||||||
STR.max_w_class = WEIGHT_CLASS_NORMAL
|
STR.max_volume = STORAGE_VOLUME_BACKPACK
|
||||||
STR.max_items = 21
|
STR.max_w_class = MAX_WEIGHT_CLASS_BACKPACK
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Backpack Types
|
* Backpack Types
|
||||||
@@ -64,9 +64,9 @@
|
|||||||
/obj/item/storage/backpack/holding/ComponentInitialize()
|
/obj/item/storage/backpack/holding/ComponentInitialize()
|
||||||
. = ..()
|
. = ..()
|
||||||
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
|
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
|
||||||
STR.allow_big_nesting = TRUE
|
STR.max_w_class = MAX_WEIGHT_CLASS_BAG_OF_HOLDING
|
||||||
STR.max_w_class = WEIGHT_CLASS_BULKY
|
STR.storage_flags = STORAGE_FLAGS_VOLUME_DEFAULT
|
||||||
STR.max_combined_w_class = 35
|
STR.max_volume = STORAGE_VOLUME_BAG_OF_HOLDING
|
||||||
|
|
||||||
/obj/item/storage/backpack/holding/suicide_act(mob/living/user)
|
/obj/item/storage/backpack/holding/suicide_act(mob/living/user)
|
||||||
user.visible_message("<span class='suicide'>[user] is jumping into [src]! It looks like [user.p_theyre()] trying to commit suicide.</span>")
|
user.visible_message("<span class='suicide'>[user] is jumping into [src]! It looks like [user.p_theyre()] trying to commit suicide.</span>")
|
||||||
@@ -344,7 +344,7 @@
|
|||||||
/obj/item/storage/backpack/duffelbag/ComponentInitialize()
|
/obj/item/storage/backpack/duffelbag/ComponentInitialize()
|
||||||
. = ..()
|
. = ..()
|
||||||
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
|
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
|
||||||
STR.max_combined_w_class = 30
|
STR.max_volume = STORAGE_VOLUME_DUFFLEBAG
|
||||||
|
|
||||||
/obj/item/storage/backpack/duffelbag/captain
|
/obj/item/storage/backpack/duffelbag/captain
|
||||||
name = "captain's duffel bag"
|
name = "captain's duffel bag"
|
||||||
|
|||||||
@@ -606,6 +606,7 @@ This is here to make the tiles around the station mininuke change when it's arme
|
|||||||
lefthand_file = 'icons/mob/inhands/equipment/idcards_lefthand.dmi'
|
lefthand_file = 'icons/mob/inhands/equipment/idcards_lefthand.dmi'
|
||||||
righthand_file = 'icons/mob/inhands/equipment/idcards_righthand.dmi'
|
righthand_file = 'icons/mob/inhands/equipment/idcards_righthand.dmi'
|
||||||
icon_state = "datadisk0"
|
icon_state = "datadisk0"
|
||||||
|
w_volume = ITEM_VOLUME_DISK
|
||||||
|
|
||||||
/obj/item/disk/nuclear
|
/obj/item/disk/nuclear
|
||||||
name = "nuclear authentication disk"
|
name = "nuclear authentication disk"
|
||||||
|
|||||||
@@ -105,7 +105,6 @@
|
|||||||
#include "code\__DEFINES\stat.dm"
|
#include "code\__DEFINES\stat.dm"
|
||||||
#include "code\__DEFINES\stat_tracking.dm"
|
#include "code\__DEFINES\stat_tracking.dm"
|
||||||
#include "code\__DEFINES\status_effects.dm"
|
#include "code\__DEFINES\status_effects.dm"
|
||||||
#include "code\__DEFINES\storage.dm"
|
|
||||||
#include "code\__DEFINES\subsystems.dm"
|
#include "code\__DEFINES\subsystems.dm"
|
||||||
#include "code\__DEFINES\tgs.config.dm"
|
#include "code\__DEFINES\tgs.config.dm"
|
||||||
#include "code\__DEFINES\tgs.dm"
|
#include "code\__DEFINES\tgs.dm"
|
||||||
@@ -132,6 +131,8 @@
|
|||||||
#include "code\__DEFINES\research\stock_parts.dm"
|
#include "code\__DEFINES\research\stock_parts.dm"
|
||||||
#include "code\__DEFINES\skills\defines.dm"
|
#include "code\__DEFINES\skills\defines.dm"
|
||||||
#include "code\__DEFINES\skills\helpers.dm"
|
#include "code\__DEFINES\skills\helpers.dm"
|
||||||
|
#include "code\__DEFINES\storage\_storage.dm"
|
||||||
|
#include "code\__DEFINES\storage\volumetrics.dm"
|
||||||
#include "code\__HELPERS\_cit_helpers.dm"
|
#include "code\__HELPERS\_cit_helpers.dm"
|
||||||
#include "code\__HELPERS\_lists.dm"
|
#include "code\__HELPERS\_lists.dm"
|
||||||
#include "code\__HELPERS\_logging.dm"
|
#include "code\__HELPERS\_logging.dm"
|
||||||
@@ -1087,6 +1088,7 @@
|
|||||||
#include "code\game\objects\items\stacks\tiles\light.dm"
|
#include "code\game\objects\items\stacks\tiles\light.dm"
|
||||||
#include "code\game\objects\items\stacks\tiles\tile_mineral.dm"
|
#include "code\game\objects\items\stacks\tiles\tile_mineral.dm"
|
||||||
#include "code\game\objects\items\stacks\tiles\tile_types.dm"
|
#include "code\game\objects\items\stacks\tiles\tile_types.dm"
|
||||||
|
#include "code\game\objects\items\storage\_storage.dm"
|
||||||
#include "code\game\objects\items\storage\backpack.dm"
|
#include "code\game\objects\items\storage\backpack.dm"
|
||||||
#include "code\game\objects\items\storage\bags.dm"
|
#include "code\game\objects\items\storage\bags.dm"
|
||||||
#include "code\game\objects\items\storage\belt.dm"
|
#include "code\game\objects\items\storage\belt.dm"
|
||||||
@@ -1098,7 +1100,6 @@
|
|||||||
#include "code\game\objects\items\storage\firstaid.dm"
|
#include "code\game\objects\items\storage\firstaid.dm"
|
||||||
#include "code\game\objects\items\storage\lockbox.dm"
|
#include "code\game\objects\items\storage\lockbox.dm"
|
||||||
#include "code\game\objects\items\storage\secure.dm"
|
#include "code\game\objects\items\storage\secure.dm"
|
||||||
#include "code\game\objects\items\storage\storage.dm"
|
|
||||||
#include "code\game\objects\items\storage\toolbox.dm"
|
#include "code\game\objects\items\storage\toolbox.dm"
|
||||||
#include "code\game\objects\items\storage\uplink_kits.dm"
|
#include "code\game\objects\items\storage\uplink_kits.dm"
|
||||||
#include "code\game\objects\items\storage\wallets.dm"
|
#include "code\game\objects\items\storage\wallets.dm"
|
||||||
|
|||||||
Reference in New Issue
Block a user