mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-31 12:01:47 +00:00
* Barsign UI/UX Improvements - Emissive effects, balloon alerts, and refactored code (#73106) The barsign code is over a decade old so this is a big refactor with some notable improvements: - Emissive effects (neon lights now glow in the dark) - Balloon alerts instead of `to_chat` messages - Mapping helpers based on direction and all_access - Barsigns are considered machinery now and use power * Barsign UI/UX Improvements - Emissive effects, balloon alerts, and refactored code * fixes modular maps --------- Co-authored-by: Tim <timothymtorres@gmail.com> Co-authored-by: Paxilmaniac <paxilmaniac@gmail.com>
38 lines
1.1 KiB
Plaintext
38 lines
1.1 KiB
Plaintext
/**
|
|
* Test if icon states for each datum actually exist in the DMI.
|
|
*/
|
|
/datum/unit_test/barsigns_icon
|
|
|
|
/datum/unit_test/barsigns_icon/Run()
|
|
var/obj/machinery/barsign_type = /obj/machinery/barsign
|
|
var/icon/barsign_icon = initial(barsign_type.icon)
|
|
var/list/barsign_icon_states = icon_states(barsign_icon)
|
|
|
|
// Check every datum real bar sign
|
|
for(var/sign_type in (subtypesof(/datum/barsign) - /datum/barsign/hiddensigns))
|
|
var/datum/barsign/sign = new sign_type()
|
|
|
|
if(!(sign.icon in barsign_icon_states))
|
|
TEST_FAIL("Icon state for [sign_type] does not exist in [barsign_icon].")
|
|
|
|
/**
|
|
* Check that bar signs have a name and desc, and that the name is unique.
|
|
*/
|
|
/datum/unit_test/barsigns_name
|
|
|
|
/datum/unit_test/barsigns_name/Run()
|
|
var/list/existing_names = list()
|
|
|
|
for(var/sign_type in subtypesof(/datum/barsign) - /datum/barsign/hiddensigns)
|
|
var/datum/barsign/sign = new sign_type()
|
|
|
|
if(!sign.name)
|
|
TEST_FAIL("[sign_type] does not have a name.")
|
|
if(!sign.desc)
|
|
TEST_FAIL("[sign_type] does not have a desc.")
|
|
|
|
if(sign.name in existing_names)
|
|
TEST_FAIL("[sign_type] does not have a unique name.")
|
|
|
|
existing_names += sign.name
|