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

@@ -325,7 +325,7 @@ namespace OpenRA
{
this.modData = modData;
MapSize = size;
Grid = modData.Manifest.Get<MapGrid>();
Grid = modData.GetOrCreate<MapGrid>();
Title = "Name your map here";
Author = "Your name here";
@@ -370,7 +370,7 @@ namespace OpenRA
PlayerDefinitions = yaml.NodeWithKeyOrDefault("Players")?.Value.Nodes ?? [];
ActorDefinitions = yaml.NodeWithKeyOrDefault("Actors")?.Value.Nodes ?? [];
Grid = modData.Manifest.Get<MapGrid>();
Grid = modData.GetOrCreate<MapGrid>();
Tiles = new CellLayer<TerrainTile>(Grid.Type, MapSize);
Resources = new CellLayer<ResourceTile>(Grid.Type, MapSize);