Screenshot tests (#67679) (#14269)

Adds screenshot visual testing workflow and scripts.

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
This commit is contained in:
GoldenAlpharex
2022-06-17 00:33:25 +01:00
committed by GitHub
co-authored by Mothblocks
parent 96b3bf8481
commit fdb3651095
101 changed files with 618 additions and 7 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(
@@ -129,7 +132,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]
@@ -138,7 +140,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
@@ -153,10 +155,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)