From bb6f219db65eba56758fc39eb8d486d337bf0b97 Mon Sep 17 00:00:00 2001 From: Aronai Sieyes Date: Wed, 14 Jul 2021 14:36:58 -0400 Subject: [PATCH] Merge pull request #11073 from VOREStation/Arokha/connless Make connections lists lazy --- _build_dependencies.sh | 4 ++-- code/game/objects/structures.dm | 4 ++-- code/game/objects/structures/barricades.dm | 3 ++- code/game/objects/structures/catwalk.dm | 3 ++- code/modules/tables/tables.dm | 11 +++++++---- 5 files changed, 15 insertions(+), 10 deletions(-) diff --git a/_build_dependencies.sh b/_build_dependencies.sh index b278c1115a..cf9e6ed7bd 100644 --- a/_build_dependencies.sh +++ b/_build_dependencies.sh @@ -4,8 +4,8 @@ export SPACEMAN_DMM_VERSION=suite-1.7 # For NanoUI + TGUI export NODE_VERSION=12 # Byond Major -export BYOND_MAJOR=513 +export BYOND_MAJOR=514 # Byond Minor -export BYOND_MINOR=1542 +export BYOND_MINOR=1557 # Macro Count export MACRO_COUNT=4 diff --git a/code/game/objects/structures.dm b/code/game/objects/structures.dm index f023f3e395..38e173e3ff 100644 --- a/code/game/objects/structures.dm +++ b/code/game/objects/structures.dm @@ -10,8 +10,8 @@ var/list/climbers var/block_turf_edges = FALSE // If true, turf edge icons will not be made on the turf this occupies. - var/list/connections = list("0", "0", "0", "0") - var/list/other_connections = list("0", "0", "0", "0") + var/list/connections + var/list/other_connections var/list/blend_objects = newlist() // Objects which to blend with var/list/noblend_objects = newlist() //Objects to avoid blending with (such as children of listed blend objects. diff --git a/code/game/objects/structures/barricades.dm b/code/game/objects/structures/barricades.dm index 34ab6025c7..c60c48375e 100644 --- a/code/game/objects/structures/barricades.dm +++ b/code/game/objects/structures/barricades.dm @@ -144,7 +144,8 @@ var/image/I for(var/i = 1 to 4) - I = image('icons/obj/sandbags.dmi', "sandbags[connections[i]]", dir = 1<<(i-1)) + var/connect = connections?[i] || 0 + I = image('icons/obj/sandbags.dmi', "sandbags[connect]", dir = 1<<(i-1)) I.color = material.icon_colour add_overlay(I) diff --git a/code/game/objects/structures/catwalk.dm b/code/game/objects/structures/catwalk.dm index 58674def1a..e77abbaa6f 100644 --- a/code/game/objects/structures/catwalk.dm +++ b/code/game/objects/structures/catwalk.dm @@ -51,7 +51,8 @@ var/image/I if(!hatch_open) for(var/i = 1 to 4) - I = image(icon, "catwalk[connections[i]]", dir = 1<<(i-1)) + var/connect = connections?[i] || 0 + I = image(icon, "catwalk[connect]", dir = 1<<(i-1)) add_overlay(I) if(plating_color) I = image(icon, "plated") diff --git a/code/modules/tables/tables.dm b/code/modules/tables/tables.dm index 7111cd52d7..914c478e17 100644 --- a/code/modules/tables/tables.dm +++ b/code/modules/tables/tables.dm @@ -359,24 +359,27 @@ var/list/table_icon_cache = list() // Base frame shape. Mostly done for glass/diamond tables, where this is visible. for(var/i = 1 to 4) - var/image/I = get_table_image(icon, connections[i], 1<<(i-1)) + var/image/I = get_table_image(icon, connections?[i] || 0, 1<<(i-1)) add_overlay(I) // Standard table image if(material) for(var/i = 1 to 4) - var/image/I = get_table_image(icon, "[material.icon_base]_[connections[i]]", 1<<(i-1), material.icon_colour, 255 * material.opacity) + var/connect = connections?[i] || 0 + var/image/I = get_table_image(icon, "[material.icon_base]_[connect]", 1<<(i-1), material.icon_colour, 255 * material.opacity) add_overlay(I) // Reinforcements if(reinforced) for(var/i = 1 to 4) - var/image/I = get_table_image(icon, "[reinforced.icon_reinf]_[connections[i]]", 1<<(i-1), reinforced.icon_colour, 255 * reinforced.opacity) + var/connect = connections?[i] || 0 + var/image/I = get_table_image(icon, "[reinforced.icon_reinf]_[connect]", 1<<(i-1), reinforced.icon_colour, 255 * reinforced.opacity) add_overlay(I) if(carpeted) for(var/i = 1 to 4) - var/image/I = get_table_image(icon, "carpet_[connections[i]]", 1<<(i-1)) + var/connect = connections?[i] || 0 + var/image/I = get_table_image(icon, "carpet_[connect]", 1<<(i-1)) add_overlay(I) else cut_overlays()