Rename Disc -> Source in asset installer.
This commit is contained in:
@@ -21,7 +21,7 @@ namespace OpenRA
|
||||
{
|
||||
public readonly string Title;
|
||||
public readonly string[] TestFiles = { };
|
||||
public readonly string[] Discs = { };
|
||||
public readonly string[] Sources = { };
|
||||
public readonly bool Required;
|
||||
public readonly string Download;
|
||||
|
||||
@@ -37,14 +37,14 @@ namespace OpenRA
|
||||
}
|
||||
}
|
||||
|
||||
public class ModDisc
|
||||
public class ModSource
|
||||
{
|
||||
public readonly string Title;
|
||||
public readonly Dictionary<string, string> IDFiles;
|
||||
|
||||
[FieldLoader.Ignore] public readonly List<MiniYamlNode> Install;
|
||||
|
||||
public ModDisc(MiniYaml yaml)
|
||||
public ModSource(MiniYaml yaml)
|
||||
{
|
||||
Title = yaml.Value;
|
||||
var installNode = yaml.Nodes.FirstOrDefault(n => n.Key == "Install");
|
||||
@@ -101,18 +101,18 @@ namespace OpenRA
|
||||
return downloads;
|
||||
}
|
||||
|
||||
[FieldLoader.LoadUsing("LoadDiscs")]
|
||||
public readonly Dictionary<string, ModDisc> Discs;
|
||||
[FieldLoader.LoadUsing("LoadSources")]
|
||||
public readonly Dictionary<string, ModSource> Sources;
|
||||
|
||||
static object LoadDiscs(MiniYaml yaml)
|
||||
static object LoadSources(MiniYaml yaml)
|
||||
{
|
||||
var discs = new Dictionary<string, ModDisc>();
|
||||
var discNode = yaml.Nodes.FirstOrDefault(n => n.Key == "Discs");
|
||||
if (discNode != null)
|
||||
foreach (var node in discNode.Value.Nodes)
|
||||
discs.Add(node.Key, new ModDisc(node.Value));
|
||||
var sources = new Dictionary<string, ModSource>();
|
||||
var sourceNode = yaml.Nodes.FirstOrDefault(n => n.Key == "Sources");
|
||||
if (sourceNode != null)
|
||||
foreach (var node in sourceNode.Value.Nodes)
|
||||
sources.Add(node.Key, new ModSource(node.Value));
|
||||
|
||||
return discs;
|
||||
return sources;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user