Screenshot Tests Airlocks (#91203)

## About The Pull Request

Tests that both normal and glass airlocks, and some of their overlays
work.
This commit is contained in:
MrMelbert
2025-05-20 04:07:13 -05:00
committed by GitHub
parent 1031c1211b
commit f245d8ab79
4 changed files with 47 additions and 0 deletions

View File

@@ -2533,6 +2533,7 @@
SEND_SIGNAL(src, COMSIG_AIRLOCK_OPEN, forced)
set_density(FALSE)
operating = FALSE
update_appearance()
return TRUE
/obj/machinery/door/airlock/instant/close(forced = DEFAULT_DOOR_CHECKS, force_crush = FALSE)
@@ -2540,8 +2541,13 @@
SEND_SIGNAL(src, COMSIG_AIRLOCK_CLOSE, forced)
set_density(TRUE)
operating = FALSE
update_appearance()
return TRUE
/obj/machinery/door/airlock/instant/glass
opacity = FALSE
glass = TRUE
#undef AIRLOCK_SECURITY_NONE
#undef AIRLOCK_SECURITY_IRON
#undef AIRLOCK_SECURITY_PLASTEEL_I_S

View File

@@ -257,6 +257,7 @@
#include "required_map_items.dm"
#include "resist.dm"
#include "say.dm"
#include "screenshot_airlocks.dm"
#include "screenshot_antag_icons.dm"
#include "screenshot_basic.dm"
#include "screenshot_digi.dm"

View File

@@ -0,0 +1,40 @@
/// Ensures common airlock overlays work
/datum/unit_test/screenshot_airlocks
/datum/unit_test/screenshot_airlocks/Run()
var/obj/machinery/door/airlock/instant/door = allocate(__IMPLIED_TYPE__)
var/obj/machinery/door/airlock/instant/glass/glass_door = allocate(__IMPLIED_TYPE__)
var/icon/final_icon = icon('icons/effects/effects.dmi', "nothing")
final_icon.Insert(getFlatIcon(door, no_anim = TRUE), dir = NORTH, frame = 1)
final_icon.Insert(getFlatIcon(glass_door, no_anim = TRUE), dir = SOUTH, frame = 1)
door.open()
glass_door.open()
final_icon = icon(final_icon)
final_icon.Insert(getFlatIcon(door, no_anim = TRUE), dir = NORTH, frame = 2)
final_icon.Insert(getFlatIcon(glass_door, no_anim = TRUE), dir = SOUTH, frame = 2)
door.close()
glass_door.close()
door.bolt()
glass_door.bolt()
final_icon = icon(final_icon)
final_icon.Insert(getFlatIcon(door, no_anim = TRUE), dir = NORTH, frame = 3)
final_icon.Insert(getFlatIcon(glass_door, no_anim = TRUE), dir = SOUTH, frame = 3)
door.unbolt()
glass_door.unbolt()
door.welded = TRUE
door.update_appearance()
glass_door.welded = TRUE
glass_door.update_appearance()
final_icon = icon(final_icon)
final_icon.Insert(getFlatIcon(door, no_anim = TRUE), dir = NORTH, frame = 4)
final_icon.Insert(getFlatIcon(glass_door, no_anim = TRUE), dir = SOUTH, frame = 4)
test_screenshot("icons", final_icon)

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB