Support PickAny templates in MultiBrushes
Allows PickAny templates to be used in MultiBrushes, which can be painted with random selection. This avoids the need to define various separate MultiBrushes for each tile combination. Note that all combinations count as part of a single MultiBrush, which may influence selection weighting. This MultiBrush feature is not presently used in OpenRA's official mods, but is useful for unofficial mods using more general PickAny templates.
This commit is contained in:
committed by
Gustas Kažukauskas
parent
daf36769d6
commit
5c09d5d828
@@ -34,7 +34,7 @@ namespace OpenRA.Mods.Common.Lint
|
||||
// Includes validation of actor types and template IDs.
|
||||
var multiBrush = new MultiBrush(map, info);
|
||||
|
||||
foreach (var (_, tile) in multiBrush.Tiles)
|
||||
foreach (var tile in multiBrush.PossibleTiles())
|
||||
if (!templatedTerrainInfo.TryGetTerrainInfo(tile, out var _))
|
||||
emitError($"Tileset {terrainInfoName} has invalid MultiBrush collection `{collectionName}`: tileset does not have tile {tile.Type},{tile.Index}");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user