Skip to content
Snippets Groups Projects
Commit 1e5a3088 authored by DCoded's avatar DCoded
Browse files

Added optional nodes to _makeRules()

parent 6659eb2e
No related branches found
No related tags found
No related merge requests found
......@@ -51,6 +51,8 @@ declare namespace FC {
/** The value to set `property` to when the rule is inactive. */
value: number|boolean;
};
/** Any additional nodes to attach. */
nodes?: Array<string|HTMLElement|DocumentFragment>
}
interface Pit {
......
......@@ -187,10 +187,10 @@ App.Facilities.Facility = class {
this.refresh();
}, [], '', `Costs ${cashFormat(upgrade.cost)}${upgrade.note ? ` and ${upgrade.note}` : ``}.`), ['indent']);
}
}
if (upgrade.nodes) {
App.Events.addNode(div, upgrade.nodes);
}
if (upgrade.nodes) {
App.Events.addNode(div, upgrade.nodes);
}
});
......@@ -222,6 +222,10 @@ App.Facilities.Facility = class {
App.UI.DOM.appendNewElement("div", div, options.render(), ['indent', 'margin-bottom']);
}
if (rule.nodes) {
App.Events.addNode(div, rule.nodes);
}
});
return div;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment