mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 02:34:00 +00:00
Merge pull request #11073 from VOREStation/Arokha/connless
Make connections lists lazy
This commit is contained in:
committed by
Chompstation Bot
parent
b246cfd374
commit
bb6f219db6
@@ -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
|
||||
|
||||
@@ -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.
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user