Replaced hardcoded source actions by user defined ISourceAction.

This commit is contained in:
IceReaper
2022-11-06 19:23:49 +01:00
committed by Matthias Mailänder
parent fcc8f53b59
commit 7188f88ba1
33 changed files with 546 additions and 385 deletions

View File

@@ -41,6 +41,7 @@ namespace OpenRA
public class ModSource
{
public readonly ObjectCreator ObjectCreator;
public readonly SourceType Type = SourceType.Disc;
// Used to find installation locations for SourceType.Install
@@ -56,8 +57,9 @@ namespace OpenRA
[FieldLoader.Ignore]
public readonly List<MiniYamlNode> Install;
public ModSource(MiniYaml yaml)
public ModSource(MiniYaml yaml, ObjectCreator objectCreator)
{
ObjectCreator = objectCreator;
Title = yaml.Value;
var idFiles = yaml.Nodes.FirstOrDefault(n => n.Key == "IDFiles");