Move GlobalModData state to ModData.

This commit is contained in:
Paul Chote
2025-12-09 15:43:03 +00:00
committed by Gustas Kažukauskas
parent 13313b4270
commit a04cfaec78
44 changed files with 135 additions and 192 deletions

View File

@@ -205,7 +205,7 @@ namespace OpenRA
orderGenerator = (IOrderGenerator)modData.ObjectCreator.CreateBasic(defaultOrderGeneratorType);
var gameSpeeds = modData.Manifest.Get<GameSpeeds>();
var gameSpeeds = modData.GetOrCreate<GameSpeeds>();
var gameSpeedName = orderManager.LobbyInfo.GlobalSettings.OptionOrDefault("gamespeed", gameSpeeds.DefaultSpeed);
GameSpeed = gameSpeeds.Speeds[gameSpeedName];
Timestep = ReplayTimestep = GameSpeed.Timestep;