@@ -45,6 +45,9 @@ namespace OpenRA
|
|||||||
|
|
||||||
public Widget LoadWidget(WidgetArgs args, Widget parent, MiniYamlNode node)
|
public Widget LoadWidget(WidgetArgs args, Widget parent, MiniYamlNode node)
|
||||||
{
|
{
|
||||||
|
if (!args.ContainsKey("modRules"))
|
||||||
|
args = new WidgetArgs(args) { { "modRules", modData.DefaultRules } };
|
||||||
|
|
||||||
var widget = NewWidget(node.Key, args);
|
var widget = NewWidget(node.Key, args);
|
||||||
|
|
||||||
if (parent != null)
|
if (parent != null)
|
||||||
@@ -57,8 +60,6 @@ namespace OpenRA
|
|||||||
if (child.Key != "Children")
|
if (child.Key != "Children")
|
||||||
FieldLoader.LoadField(widget, child.Key, child.Value.Value);
|
FieldLoader.LoadField(widget, child.Key, child.Value.Value);
|
||||||
|
|
||||||
if (!args.ContainsKey("modRules"))
|
|
||||||
args = new WidgetArgs(args) { { "modRules", modData.DefaultRules } };
|
|
||||||
widget.Initialize(args);
|
widget.Initialize(args);
|
||||||
|
|
||||||
foreach (var child in node.Value.Nodes)
|
foreach (var child in node.Value.Nodes)
|
||||||
|
|||||||
Reference in New Issue
Block a user