From 5edd72f50cf1276cf87681600fc03ed947dc9dd1 Mon Sep 17 00:00:00 2001 From: MistakeNot4892 Date: Mon, 16 Oct 2023 15:08:15 +1100 Subject: [PATCH] Fixes runtimes with secret mode selection. --- code/controllers/subsystems/ticker.dm | 8 ++++---- code/datums/cinematic.dm | 2 +- code/datums/vote/gamemode.dm | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/code/controllers/subsystems/ticker.dm b/code/controllers/subsystems/ticker.dm index 97b56b7995f..2ec9734ea5f 100644 --- a/code/controllers/subsystems/ticker.dm +++ b/code/controllers/subsystems/ticker.dm @@ -227,16 +227,16 @@ Helpers if((mode_to_try=="random") || (mode_to_try=="secret")) var/list/runnable_modes = base_runnable_modes - bad_modes if(secret_force_mode != "secret") // Config option to force secret to be a specific mode. - mode_datum = decls_repository.get_decl_by_id(secret_force_mode) + mode_datum = decls_repository.get_decl_by_id(secret_force_mode, validate_decl_type = FALSE) else if(!length(runnable_modes)) // Indicates major issues; will be handled on return. bad_modes += mode_to_try return else - mode_datum = decls_repository.get_decl_by_id(pickweight(runnable_modes)) + mode_datum = decls_repository.get_decl_by_id(pickweight(runnable_modes), validate_decl_type = FALSE) if(length(runnable_modes) > 1) // More to pick if we fail; we won't tell anyone we failed unless we fail all possibilities, though. . = CHOOSE_GAMEMODE_SILENT_REDO else - mode_datum = decls_repository.get_decl_by_id(mode_to_try) + mode_datum = decls_repository.get_decl_by_id(mode_to_try, validate_decl_type = FALSE) if(!istype(mode_datum)) bad_modes += mode_to_try return @@ -261,7 +261,7 @@ Helpers to_world("The current game mode is Secret!") var/list/mode_names = list() for (var/mode_tag in base_runnable_modes) - var/decl/game_mode/M = decls_repository.get_decl_by_id(mode_tag) + var/decl/game_mode/M = decls_repository.get_decl_by_id(mode_tag, validate_decl_type = FALSE) if(M) mode_names += M.name if (config.secret_hide_possibilities) diff --git a/code/datums/cinematic.dm b/code/datums/cinematic.dm index 3fdffe74f37..8c135bfed32 100644 --- a/code/datums/cinematic.dm +++ b/code/datums/cinematic.dm @@ -16,7 +16,7 @@ var/global/datum/cinematic/cinematic = new if(!override) override = SSticker.mode if(!override) - override = decls_repository.get_decl_by_id("extended") + override = GET_DECL(/decl/game_mode/extended) if(!override) return diff --git a/code/datums/vote/gamemode.dm b/code/datums/vote/gamemode.dm index 9bfd9b1ecfe..bb05d20a73d 100644 --- a/code/datums/vote/gamemode.dm +++ b/code/datums/vote/gamemode.dm @@ -22,7 +22,7 @@ ..() choices += config.votable_modes for (var/F in choices) - var/decl/game_mode/M = decls_repository.get_decl_by_id(F) + var/decl/game_mode/M = decls_repository.get_decl_by_id(F, validate_decl_type = FALSE) if(!M) continue display_choices[F] = capitalize(M.name)