mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-01-12 18:32:33 +00:00
* SDQL2 update * fix that verb * cl * fix that * toworld * this is pointless * update info * siiiiick.. * vv edit update * fix that * fix editing vars * fix VV * Port the /TG/ globals controller. * part 1 * part 2 * oops * part 3 * Hollow Purple * sadas * bsbsdb * muda na agaki ta * ids 1-15 * 16-31 * 41-75 * bring me back to how things used to be before i lost it all * the strength of mayhem * final touches * cl * protect some vars * update sdql2 to use glob * stuff? * forgot that is not defined there * whoops * observ * but it never gets better * a --------- Co-authored-by: Matt Atlas <liermattia@gmail.com>
37 lines
1.3 KiB
Plaintext
37 lines
1.3 KiB
Plaintext
/datum/unit_test/gamemode
|
|
name = "GAMEMODE template"
|
|
groups = list("generic")
|
|
|
|
/datum/unit_test/gamemode/required_enemies_check
|
|
name = "GAMEMODE: All modes shall have required_players and required_enemies greater than the required number of players for their antagonist types."
|
|
|
|
/datum/unit_test/gamemode/required_enemies_check/start_test()
|
|
var/list/failed = list()
|
|
|
|
for(var/mode in subtypesof(/datum/game_mode))
|
|
var/datum/game_mode/GM = new mode
|
|
|
|
var/min_antag_count = 0
|
|
for(var/antag_type in GM.antag_tags)
|
|
var/datum/antagonist/A = GLOB.all_antag_types[antag_type]
|
|
|
|
if(GM.require_all_templates)
|
|
min_antag_count += A.initial_spawn_req
|
|
else
|
|
min_antag_count = max(min_antag_count, A.initial_spawn_req)
|
|
|
|
if(min_antag_count != GM.required_enemies)
|
|
failed += "[GM] ([GM.type]) requires [GM.required_enemies] enemies but its antagonist roles require [min_antag_count] players!"
|
|
if(min_antag_count > GM.required_players)
|
|
failed += "[GM] ([GM.type]) requires [GM.required_players] players but its antagonist roles require [min_antag_count] players!"
|
|
|
|
|
|
if(failed.len)
|
|
TEST_FAIL("Some gamemodes did not have high enough required_enemies or required_players.")
|
|
for(var/failed_message in failed)
|
|
TEST_FAIL(failed_message)
|
|
else
|
|
TEST_PASS("All gamemodes had suitable required_enemies and required_players.")
|
|
|
|
return 1
|