Fixes some cases of dynamic reading defined values over config values (#92126)

## About The Pull Request

Fixes #92125

Very simple, when working without an instantiated datum we would read
from the config manually, but some places neglected to do that.

So I added a macro to help in the future.

## Changelog

🆑 Melbert
fix: Fixes some places where dynamic configs were not being read
correctly
/🆑
This commit is contained in:
MrMelbert
2025-07-14 17:46:28 -05:00
committed by Roxy
parent fd655e48b2
commit b5b88a295e
4 changed files with 35 additions and 12 deletions
@@ -129,8 +129,7 @@ GLOBAL_LIST_INIT(non_ruleset_antagonists, list(
antag_time_limits = list()
for(var/datum/dynamic_ruleset/ruleset as anything in subtypesof(/datum/dynamic_ruleset))
var/antag_flag = initial(ruleset.pref_flag)
var/config_min_days = SSdynamic.dynamic_config[initial(ruleset.config_tag)]?[NAMEOF(ruleset, minimum_required_age)]
var/min_days = isnull(config_min_days) ? initial(ruleset.minimum_required_age) : config_min_days
var/min_days = GET_DYNAMIC_CONFIG(ruleset, minimum_required_age)
antag_time_limits[antag_flag] = min_days