Merge remote-tracking branch 'skrat/master' into upstream-christmas

# Conflicts:
#	README.md
#	code/controllers/subsystem/dynamic/dynamic_rulesets_midround.dm
#	code/game/machinery/bank_machine.dm
#	code/modules/unit_tests/station_trait_tests.dm
#	html/changelogs/archive/2023-12.yml
#	modular_skyrat/modules/company_imports/code/armament_datums/vitezstvi_ammo.dm
#	modular_skyrat/modules/contractor/code/datums/midround/event.dm
#	modular_skyrat/modules/contractor/code/datums/midround/ruleset.dm
#	modular_skyrat/modules/loadouts/loadout_items/donator/personal/donator_personal.dm
#	tgui/packages/tgui/interfaces/Fabrication/SearchBar.tsx
#	tgui/packages/tgui/interfaces/Spellbook.tsx
This commit is contained in:
nevimer
2023-12-24 23:15:34 -05:00
1251 changed files with 10250 additions and 7347 deletions
+10 -3
View File
@@ -26,6 +26,7 @@ GLOBAL_LIST_EMPTY(asset_datums)
/// Whether or not this asset can be cached across rounds of the same commit under the `CACHE_ASSETS` config.
/// This is not a *guarantee* the asset will be cached. Not all asset subtypes respect this field, and the
/// config can, of course, be disabled.
/// Disable this if your asset can change between rounds on the same exact version of the code.
var/cross_round_cachable = FALSE
/datum/asset/New()
@@ -133,6 +134,7 @@ GLOBAL_LIST_EMPTY(asset_datums)
/datum/asset/spritesheet
_abstract = /datum/asset/spritesheet
cross_round_cachable = TRUE
var/name
/// List of arguments to pass into queuedInsert
/// Exists so we can queue icon insertion, mostly for stuff like preferences
@@ -145,6 +147,9 @@ GLOBAL_LIST_EMPTY(asset_datums)
/// If this asset should be fully loaded on new
/// Defaults to false so we can process this stuff nicely
var/load_immediately = FALSE
VAR_PRIVATE
// Kept in state so that the result is the same, even when the files are created, for this run
should_refresh = null
/datum/asset/spritesheet/proc/should_load_immediately()
#ifdef DO_NOT_DEFER_ASSETS
@@ -158,9 +163,6 @@ GLOBAL_LIST_EMPTY(asset_datums)
if (..())
return TRUE
// Static so that the result is the same, even when the files are created, for this run
var/static/should_refresh = null
if (isnull(should_refresh))
// `fexists` seems to always fail on static-time
should_refresh = !fexists("[ASSET_CROSS_ROUND_CACHE_DIRECTORY]/spritesheet.[name].css")
@@ -366,6 +368,9 @@ GLOBAL_LIST_EMPTY(asset_datums)
I = icon(I, icon_state=icon_state, dir=dir, frame=frame, moving=moving)
if (!I || !length(icon_states(I))) // that direction or state doesn't exist
return
var/start_usage = world.tick_usage
//any sprite modifications we want to do (aka, coloring a greyscaled asset)
I = ModifyInserted(I)
var/size_id = "[I.Width()]x[I.Height()]"
@@ -393,6 +398,8 @@ GLOBAL_LIST_EMPTY(asset_datums)
sizes[size_id] = size = list(1, I, null)
sprites[sprite_name] = list(size_id, 0)
SSblackbox.record_feedback("tally", "spritesheet_queued_insert_time", TICK_USAGE_TO_MS(start_usage), name)
/**
* A simple proc handing the Icon for you to modify before it gets turned into an asset.
*
@@ -1,7 +1,5 @@
/datum/asset/spritesheet/emojipedia
name = "emojipedia"
cross_round_cachable = TRUE // The Emoji DMI is static and doesn't change without a commit mis-match.
/datum/asset/spritesheet/emojipedia/create_spritesheets()
InsertAll("", EMOJI_SET)