[MIRROR] move the spoiler (#11417)

Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
CHOMPStation2StaffMirrorBot
2025-08-14 17:24:30 +02:00
committed by GitHub
co-authored by Kashargul
parent 2f9ea4bf5f
commit 7aba7be802
5 changed files with 19 additions and 8 deletions
+2 -1
View File
@@ -7,6 +7,7 @@ SUBSYSTEM_DEF(asset_loading)
flags = SS_NO_INIT
runlevels = RUNLEVEL_LOBBY|RUNLEVELS_DEFAULT
var/list/datum/asset/generate_queue = list()
var/assets_generating = 0
var/last_queue_len = 0
/datum/controller/subsystem/asset_loading/fire(resumed)
@@ -22,7 +23,7 @@ SUBSYSTEM_DEF(asset_loading)
return
// We just emptied the queue
if(last_queue_len && !length(generate_queue))
if(last_queue_len && !length(generate_queue) && !assets_generating)
// Clean up cached icons, freeing memory.
rustg_iconforge_cleanup()
+1 -2
View File
@@ -209,8 +209,7 @@
borg = span_boldnotice("\The [G]") + span_notice(" can hold this.")
break
var/examine_text = replacetext(get_examine_desc(), "||", "")
var/list/output = list("[icon2html(src,user.client)] That's [f_name] [suffix] [borg]", examine_text)
var/list/output = list("[icon2html(src,user.client)] That's [f_name] [suffix] [borg]", get_examine_desc())
SEND_SIGNAL(src, COMSIG_PARENT_EXAMINE, user, output)
return output
+1 -1
View File
@@ -271,7 +271,7 @@ GLOBAL_LIST_EMPTY(asset_datums)
SSasset_loading.dequeue_asset(src)
/datum/asset/spritesheet/queued_generation()
INVOKE_ASYNC(src, PROC_REF(realize_spritesheets), TRUE)
realize_spritesheets(yield = TRUE)
/datum/asset/spritesheet/ensure_ready()
if(!fully_generated)
@@ -193,9 +193,11 @@
if(yield || !isnull(job_id))
if(isnull(job_id))
getting_genned = TRUE
SSasset_loading.assets_generating++
job_id = rustg_iconforge_generate_async("data/spritesheets/", name, entries_json, do_cache, FALSE, TRUE)
UNTIL((data_out = rustg_iconforge_check(job_id)) != RUSTG_JOB_NO_RESULTS_YET)
getting_genned = FALSE
SSasset_loading.assets_generating--
else
data_out = rustg_iconforge_generate("data/spritesheets/", name, entries_json, do_cache, FALSE, TRUE)
if (data_out == RUSTG_JOB_ERROR)
@@ -237,7 +239,7 @@
CRASH("Error during spritesheet generation for [name]: [data["error"]]")
/datum/asset/spritesheet_batched/queued_generation()
realize_spritesheets(yield = TRUE)
INVOKE_ASYNC(src, PROC_REF(realize_spritesheets), TRUE) // The proc is called inside a subsystem and waits with an UNTIL
/datum/asset/spritesheet_batched/ensure_ready()
if(!fully_generated)
+12 -3
View File
@@ -96,20 +96,29 @@
//do pref check here
var/desc_info_temp = A.get_description_info()
if(desc_info_temp)
. += span_details("️ | Information",desc_info_temp)
. += span_details("️ | Information", desc_info_temp)
var/fluff_info_temp = A.get_description_fluff()
if(fluff_info_temp && fluff_info_temp != "")
var/title = "🪐 | Flavor Information"
var/examine_text = splittext(fluff_info_temp, "||")
var/index = 0
var/rendered_text = ""
for(var/part in examine_text)
if(index % 2)
rendered_text += span_spoiler("[part]")
else
rendered_text += "[part]"
index++
if(isliving(A)) //ehhh
var/mob/living/B = A
if(B.flavor_text)
title = "🔍 | Flavor Text"
. += span_details(title,fluff_info_temp)
. += span_details(title, rendered_text)
var/is_antagish = antag_check()
var/antag_info_temp = A.get_description_antag()
if(is_antagish && antag_info_temp)
. += span_details("🏴‍☠️ | Antag Information",antag_info_temp)
. += span_details("🏴‍☠️ | Antag Information", antag_info_temp)
var/list/interaction_info = A.get_description_interaction()
if(interaction_info.len > 0)
var/temp = ""