mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-26 22:50:26 +01:00
icon2html optimization stuff (#58607)
This commit is contained in:
@@ -62,6 +62,8 @@ GLOBAL_LIST_INIT(bitflags, list(1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 204
|
||||
#define SUPERMATTER_IGNORES_1 (1 << 19)
|
||||
/// If a turf can be made dirty at roundstart. This is also used in areas.
|
||||
#define CAN_BE_DIRTY_1 (1<<20)
|
||||
/// Should we use the initial icon for display? Mostly used by overlay only objects
|
||||
#define HTML_USE_INITAL_ICON_1 (1<<21)
|
||||
|
||||
// Update flags for [/atom/proc/update_appearance]
|
||||
/// Update the atom's name
|
||||
|
||||
@@ -152,6 +152,7 @@ DEFINE_BITFIELD(smoothing_junction, list(
|
||||
//do not use, use QUEUE_SMOOTH(atom)
|
||||
/atom/proc/smooth_icon()
|
||||
smoothing_flags &= ~SMOOTH_QUEUED
|
||||
flags_1 |= HTML_USE_INITAL_ICON_1
|
||||
if (!z)
|
||||
CRASH("[type] called smooth_icon() without being on a z-level")
|
||||
if(smoothing_flags & SMOOTH_CORNERS)
|
||||
|
||||
@@ -1104,7 +1104,6 @@ GLOBAL_LIST_INIT(freon_color_matrix, list("#2E5E69", "#60A2A8", "#A1AFB1", rgb(0
|
||||
/proc/generate_asset_name(file)
|
||||
return "asset.[md5(fcopy_rsc(file))]"
|
||||
|
||||
|
||||
/**
|
||||
* Converts an icon to base64. Operates by putting the icon in the iconCache savefile,
|
||||
* exporting it as text, and then parsing the base64 from that.
|
||||
@@ -1141,6 +1140,7 @@ GLOBAL_LIST_INIT(freon_color_matrix, list("#2E5E69", "#60A2A8", "#A1AFB1", rgb(0
|
||||
targets = target
|
||||
if (!targets.len)
|
||||
return
|
||||
|
||||
if (!isicon(I))
|
||||
if (isfile(thing)) //special snowflake
|
||||
var/name = sanitize_filename("[generate_asset_name(thing)].png")
|
||||
@@ -1154,9 +1154,10 @@ GLOBAL_LIST_INIT(freon_color_matrix, list("#2E5E69", "#60A2A8", "#A1AFB1", rgb(0
|
||||
var/atom/A = thing
|
||||
|
||||
I = A.icon
|
||||
|
||||
if (isnull(icon_state))
|
||||
icon_state = A.icon_state
|
||||
if (!(icon_state in icon_states(I, 1)))
|
||||
if (isnull(icon_state) || A.flags_1 & HTML_USE_INITAL_ICON_1)
|
||||
icon_state = initial(A.icon_state)
|
||||
if (isnull(dir))
|
||||
dir = initial(A.dir)
|
||||
|
||||
@@ -114,7 +114,7 @@
|
||||
var/air_tight = FALSE //TRUE means density will be set as soon as the door begins to close
|
||||
var/prying_so_hard = FALSE
|
||||
|
||||
flags_1 = RAD_PROTECT_CONTENTS_1 | RAD_NO_CONTAMINATE_1
|
||||
flags_1 = RAD_PROTECT_CONTENTS_1 | RAD_NO_CONTAMINATE_1 | HTML_USE_INITAL_ICON_1
|
||||
rad_insulation = RAD_MEDIUM_INSULATION
|
||||
|
||||
network_id = NETWORK_DOOR_AIRLOCKS
|
||||
|
||||
Reference in New Issue
Block a user