mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-10 15:45:05 +01:00
dc1df52bba
## About The Pull Request Reduces the max length you can set an AAS message by 83% (1024 characters -> 168 characters) ## Why It's Good For The Game I think most people would agree it's fairly annoying when someone edits the AAS messages to be full paragraphs, filling common up with nonsense Ostensibly this can be handled by admins but I think allowing someone to enter 1000 characters here is a bit excessive in the first place - The longest default message we have is 144 characters Alternatively I can cap message length on a per-message-type basis so the most common messages (arrivals, weather) have a far shorter limit than the uncommon messages (security alerts) ## Changelog 🆑 Melbert del: Caps "Automated Announcement System" messages to 168 characters (was: 1024 characters) /🆑
11 lines
490 B
Plaintext
11 lines
490 B
Plaintext
/datum/unit_test/aas_configs
|
|
|
|
/datum/unit_test/aas_configs/Run()
|
|
var/expected_max_length = MAX_AAS_LENGTH
|
|
|
|
for(var/config_type in valid_subtypesof(/datum/aas_config_entry))
|
|
var/datum/aas_config_entry/entry = allocate(config_type)
|
|
for(var/key, line in entry.announcement_lines_map)
|
|
if(length_char(line) > expected_max_length)
|
|
TEST_FAIL("Announcement line '[key]' in config '[config_type]' exceeds max length of [expected_max_length] characters (actual length: [length(line)])")
|