Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/simulation/components/SkirmishReplacer.js
function SkirmishReplacer() {} | function SkirmishReplacer() {} | ||||
SkirmishReplacer.prototype.Schema = | SkirmishReplacer.prototype.Schema = | ||||
"<optional>" + | "<optional>" + | ||||
"<element name='general' a:help='The general element replaces {civ} with the civ code.'>" + | "<element name='general' a:help='The general element replaces {civ} with the civ code.'>" + | ||||
"<interleave>" + | "<interleave>" + | ||||
"<text/>" + | "<text/>" + | ||||
"</interleave>" + | "</interleave>" + | ||||
"</element>" + | "</element>" + | ||||
"</optional>"; | "</optional>"; | ||||
SkirmishReplacer.prototype.Init = function() | SkirmishReplacer.prototype.Init = function() | ||||
{ | { | ||||
}; | }; | ||||
SkirmishReplacer.prototype.Update = function(newTemplate) | |||||
{ | |||||
this.template = newTemplate; | |||||
}; | |||||
SkirmishReplacer.prototype.Serialize = null; // We have no dynamic state to save | SkirmishReplacer.prototype.Serialize = null; // We have no dynamic state to save | ||||
function getReplacementEntities(civ) | function getReplacementEntities(civ) | ||||
{ | { | ||||
return Engine.ReadJSONFile("simulation/data/civs/" + civ + ".json").SkirmishReplacements; | return Engine.ReadJSONFile("simulation/data/civs/" + civ + ".json").SkirmishReplacements; | ||||
} | } | ||||
SkirmishReplacer.prototype.OnOwnershipChanged = function(msg) | SkirmishReplacer.prototype.OnOwnershipChanged = function(msg) | ||||
▲ Show 20 Lines • Show All 77 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator