mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-10 09:42:29 +00:00
[SEMI-MODULAR] Adds an override to allow the use of icon2html RARELY when we need it, fixing in the same swoop the in-game GAGS coloring screen (#7615)
* Adds an override to allow the use of icon2html in rare cases * That should've been properly documented as SKYRAT EDIT, whoops
This commit is contained in:
@@ -1053,9 +1053,12 @@ GLOBAL_LIST_INIT(freon_color_matrix, list("#2E5E69", "#60A2A8", "#A1AFB1", rgb(0
|
||||
dummySave = null
|
||||
fdel("tmp/dummySave.sav") //if you get the idea to try and make this more optimized, make sure to still call unlock on the savefile after every write to unlock it.
|
||||
|
||||
/proc/icon2html(thing, target, icon_state, dir = SOUTH, frame = 1, moving = FALSE, sourceonly = FALSE, extra_classes = null)
|
||||
/proc/icon2html(thing, target, icon_state, dir = SOUTH, frame = 1, moving = FALSE, sourceonly = FALSE, extra_classes = null, override_skyrat = FALSE) /// SKYRAT EDIT - icon2html override instead of fully disabling it - Original: /proc/icon2html(thing, target, icon_state, dir = SOUTH, frame = 1, moving = FALSE, sourceonly = FALSE, extra_classes = null)
|
||||
// SKYRAT EDIT START - icon2html override instead of fully disabling it
|
||||
if(!override_skyrat)
|
||||
return "" //SKYRAT EDIT DISABLE - ICON2HTML
|
||||
/*
|
||||
// SKYRAT EDIT END
|
||||
|
||||
if (!thing)
|
||||
return
|
||||
if(SSlag_switch.measures[DISABLE_USR_ICON2HTML] && usr && !HAS_TRAIT(usr, TRAIT_BYPASS_MEASURES))
|
||||
@@ -1123,7 +1126,7 @@ GLOBAL_LIST_INIT(freon_color_matrix, list("#2E5E69", "#60A2A8", "#A1AFB1", rgb(0
|
||||
if(sourceonly)
|
||||
return SSassets.transport.get_asset_url(key)
|
||||
return "<img class='[extra_classes] icon icon-[icon_state]' src='[SSassets.transport.get_asset_url(key)]'>"
|
||||
*/
|
||||
|
||||
|
||||
/proc/icon2base64html(thing)
|
||||
if (!thing)
|
||||
|
||||
@@ -240,16 +240,26 @@ This is highly likely to cause a lag spike for a few seconds."},
|
||||
var/list/step_data = data["steps"][step]
|
||||
var/image/layer = image(step)
|
||||
var/image/result = step_data["result"]
|
||||
// SKYRAT EDIT BEGIN - Bringing back the GAGS coloring menu - ORIGINAL:
|
||||
/*
|
||||
steps += list(
|
||||
list(
|
||||
"layer"=icon2html(layer, user, dir=sprite_dir, sourceonly=TRUE),
|
||||
"result"=icon2html(result, user, dir=sprite_dir, sourceonly=TRUE),
|
||||
"layer"=icon2html(layer, user, dir=sprite_dir, sourceonly=TRUE, override_skyrat = TRUE),
|
||||
"result"=icon2html(result, user, dir=sprite_dir, sourceonly=TRUE, override_skyrat = TRUE),
|
||||
"config_name"=step_data["config_name"]
|
||||
)
|
||||
)*/
|
||||
steps += list(
|
||||
list(
|
||||
"layer"=icon2html(layer, user, dir=sprite_dir, sourceonly=TRUE, override_skyrat = TRUE),
|
||||
"result"=icon2html(result, user, dir=sprite_dir, sourceonly=TRUE, override_skyrat = TRUE),
|
||||
"config_name"=step_data["config_name"]
|
||||
)
|
||||
)
|
||||
// SKYRAT EDIT END
|
||||
|
||||
sprite_data["time_spent"] = TICK_DELTA_TO_MS(time_spent)
|
||||
sprite_data["finished"] = icon2html(finished, user, dir=sprite_dir, sourceonly=TRUE)
|
||||
sprite_data["finished"] = icon2html(finished, user, dir=sprite_dir, sourceonly=TRUE, override_skyrat = TRUE)
|
||||
refreshing = FALSE
|
||||
|
||||
/datum/greyscale_modify_menu/proc/Unlock()
|
||||
|
||||
Reference in New Issue
Block a user