Screenshot tests (#67679)

Adds screenshot visual testing workflow and scripts.
This commit is contained in:
Mothblocks
2022-06-11 00:02:30 +02:00
committed by GitHub
parent d80bdb1220
commit 7cab049dd1
104 changed files with 616 additions and 8 deletions
@@ -110,6 +110,9 @@
early = TRUE
cross_round_cachable = TRUE
/// Mapping of spritesheet keys -> icons
var/list/antag_icons = list()
/datum/asset/spritesheet/antagonists/create_spritesheets()
// Antagonists that don't have a dynamic ruleset, but do have a preference
var/static/list/non_ruleset_antagonists = list(
@@ -128,7 +131,6 @@
antagonists[initial(ruleset.antag_flag)] = antagonist_type
var/list/generated_icons = list()
var/list/to_insert = list()
for (var/antag_flag in antagonists)
var/datum/antagonist/antagonist_type = antagonists[antag_flag]
@@ -137,7 +139,7 @@
var/spritesheet_key = serialize_antag_name(antag_flag)
if (!isnull(generated_icons[antagonist_type]))
to_insert[spritesheet_key] = generated_icons[antagonist_type]
antag_icons[spritesheet_key] = generated_icons[antagonist_type]
continue
var/datum/antagonist/antagonist = new antagonist_type
@@ -152,10 +154,10 @@
// If an icon is not prepared to be scaled to that size, it looks really ugly, and this
// makes it harder to figure out what size it *actually* is.
generated_icons[antagonist_type] = preview_icon
to_insert[spritesheet_key] = preview_icon
antag_icons[spritesheet_key] = preview_icon
for (var/spritesheet_key in to_insert)
Insert(spritesheet_key, to_insert[spritesheet_key])
for (var/spritesheet_key in antag_icons)
Insert(spritesheet_key, antag_icons[spritesheet_key])
/// Serializes an antag name to be used for preferences UI
/proc/serialize_antag_name(antag_name)