Change FieldLoader.LoadUsing to use nameof

This commit is contained in:
teinarss
2021-02-28 17:31:18 +01:00
committed by abcdefg30
parent 6b794ba3e5
commit 53b781960c
12 changed files with 15 additions and 15 deletions

View File

@@ -91,7 +91,7 @@ namespace OpenRA
public readonly string HeaderMessage;
public readonly string ContentInstallerMod = "modcontent";
[FieldLoader.LoadUsing("LoadPackages")]
[FieldLoader.LoadUsing(nameof(LoadPackages))]
public readonly Dictionary<string, ModPackage> Packages = new Dictionary<string, ModPackage>();
static object LoadPackages(MiniYaml yaml)
@@ -105,7 +105,7 @@ namespace OpenRA
return packages;
}
[FieldLoader.LoadUsing("LoadDownloads")]
[FieldLoader.LoadUsing(nameof(LoadDownloads))]
public readonly string[] Downloads = { };
static object LoadDownloads(MiniYaml yaml)
@@ -114,7 +114,7 @@ namespace OpenRA
return downloadNode != null ? downloadNode.Value.Nodes.Select(n => n.Key).ToArray() : new string[0];
}
[FieldLoader.LoadUsing("LoadSources")]
[FieldLoader.LoadUsing(nameof(LoadSources))]
public readonly string[] Sources = { };
static object LoadSources(MiniYaml yaml)