private void ValidateTemplate(MapObjectTemplate template) { var templates = maps.GetTemplatesMatching(template); if (templates.Length == 0) { Log.Warning("Map object template {template} is unknown.", FormatObject(template)); } }
public MapObjectTemplate[] GetValues(MapObjectTemplate template) { var key = template.AnimationFile; foreach (var collection in valueChain) { if (collection.Contains(key)) { return(collection[key].ToArray()); } } return(new MapObjectTemplate[0]); }
private static string FormatObject(MapObjectTemplate template) { // AVCtowx0.def 000001110000011110001111111111111111111111111111 001000000000000000000000000000000000000000000000 011111111 011111111 98 2 1 0 return($"{template.AnimationFile} " + $"{FormatObjectMask(template.BlockPosition)} " + $"{FormatObjectMask(template.VisitPosition)} " + $"{FormatObjectFlag((int) template.SupportedTerrainTypes)} " + $"{FormatObjectFlag((int) template.EditorMenuLocation)} " + $"{(int) template.Id} " + $"{template.SubId} " + $"{(int) template.Type} " + $"{Convert.ToInt32(template.IsBackground)}"); }
public MapObjectTemplate[] GetTemplatesMatching(MapObjectTemplate template) { return(templates.GetValues(template)); }