mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 20:48:56 +01:00
Better Unit Tests - Runs All Of Them On A Single Map (exc. map unit tests) and C&D Split-Up (#96368)
## About The Pull Request
### Don't run every single test
I've had this on my mind for several months and it being brought up
recently reminded me so here we are.
Unit tests only run on `runtimestation_minimal.dmm` now with the
exception of map tests. The following unit tests are declared as map
tests but I didn't see any map dependent logic so 🤷
- `/datum/unit_test/maptest_baseturfs_unmodified_scrape`
- `/datum/unit_test/maptest_baseturfs_placed_on_top`
- `/datum/unit_test/maptest_baseturfs_placed_on_bottom`
- `/datum/unit_test/maptest_get_turf_pixel`
- `/datum/unit_test/maptest_load_map_security`
- `/datum/unit_test/maptest_modular_map_loader`
- `/datum/unit_test/maptest_turf_icons`
`/datum/unit_test/subsystem_init` isn't really a mapping unit test but I
figured somehow, someway, maps might fuck with subsystem initializations
so I just decided to include it.
### Splits up the create & destroy test
Idk, pretty simple. Create & destroy is now split up across all
integration tests and ran in parallel.
## Why It's Good For The Game
oranges promised me "500 nzd" yo
## Changelog
No player facing changes
This commit is contained in:
@@ -233,10 +233,7 @@
|
||||
|
||||
///Creates a CTF game with the provided team ID then returns a reference to the new controller. If a controller already exists provides a reference to it.
|
||||
/proc/create_ctf_game(game_id)
|
||||
if(GLOB.ctf_games[game_id])
|
||||
return GLOB.ctf_games[game_id]
|
||||
var/datum/ctf_controller/CTF = new(game_id)
|
||||
return CTF
|
||||
return GLOB.ctf_games[game_id] || new /datum/ctf_controller(game_id)
|
||||
|
||||
#undef CTF_DEFAULT_RESPAWN
|
||||
#undef CTF_INSTAGIB_RESPAWN
|
||||
|
||||
@@ -20,9 +20,7 @@
|
||||
|
||||
/obj/machinery/ctf/Initialize(mapload)
|
||||
. = ..()
|
||||
ctf_game = GLOB.ctf_games[game_id]
|
||||
if(isnull(ctf_game))
|
||||
ctf_game = create_ctf_game(game_id)
|
||||
ctf_game = create_ctf_game(game_id)
|
||||
|
||||
///A spawn point for CTF, ghosts can interact with this to vote for CTF or spawn in if a game is running.
|
||||
/obj/machinery/ctf/spawner
|
||||
@@ -447,10 +445,10 @@
|
||||
/obj/effect/ctf/dead_barricade/Initialize(mapload)
|
||||
. = ..()
|
||||
ctf_game = GLOB.ctf_games[game_id]
|
||||
ctf_game.barricades += src
|
||||
ctf_game?.barricades += src
|
||||
|
||||
/obj/effect/ctf/dead_barricade/Destroy()
|
||||
ctf_game.barricades -= src
|
||||
ctf_game?.barricades -= src
|
||||
return ..()
|
||||
|
||||
/obj/effect/ctf/dead_barricade/proc/respawn()
|
||||
@@ -473,10 +471,8 @@
|
||||
///Proc that handles toggling and unloading CTF.
|
||||
/proc/toggle_id_ctf(user, activated_id, automated = FALSE, unload = FALSE, area/ctf_area = /area/centcom/ctf)
|
||||
var/static/loading = CTF_LOADING_UNLOADED
|
||||
var/datum/ctf_controller/ctf_controller = GLOB.ctf_games[activated_id]
|
||||
if(isnull(ctf_controller))
|
||||
ctf_controller = create_ctf_game(activated_id)
|
||||
if(unload == TRUE)
|
||||
var/datum/ctf_controller/ctf_controller = create_ctf_game(activated_id)
|
||||
if(unload)
|
||||
log_admin("[key_name_admin(user)] is attempting to unload CTF.")
|
||||
message_admins("[key_name_admin(user)] is attempting to unload CTF.")
|
||||
if(loading == CTF_LOADING_UNLOADED)
|
||||
|
||||
Reference in New Issue
Block a user