Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/simulation/components/Identity.js
Show First 20 Lines • Show All 83 Lines • ▼ Show 20 Lines | "<optional>" + | |||||||||||
"<element name='Icon'>" + | "<element name='Icon'>" + | |||||||||||
"<text/>" + | "<text/>" + | |||||||||||
"</element>" + | "</element>" + | |||||||||||
"</optional>" + | "</optional>" + | |||||||||||
"<optional>" + | "<optional>" + | |||||||||||
"<element name='RequiredTechnology' a:help='Optional name of a technology which must be researched before the entity can be produced.'>" + | "<element name='RequiredTechnology' a:help='Optional name of a technology which must be researched before the entity can be produced.'>" + | |||||||||||
"<text/>" + | "<text/>" + | |||||||||||
"</element>" + | "</element>" + | |||||||||||
"</optional>" + | "</optional>"; | |||||||||||
"<element name='Undeletable' a:help='Prevent players from deleting this entity.'>" + | ||||||||||||
"<data type='boolean'/>" + | ||||||||||||
"</element>"; | ||||||||||||
Identity.prototype.Init = function() | Identity.prototype.Init = function() | |||||||||||
{ | { | |||||||||||
this.classesList = GetIdentityClasses(this.template); | this.classesList = GetIdentityClasses(this.template); | |||||||||||
this.visibleClassesList = GetVisibleIdentityClasses(this.template); | this.visibleClassesList = GetVisibleIdentityClasses(this.template); | |||||||||||
if (this.template.Phenotype) | if (this.template.Phenotype) | |||||||||||
this.phenotype = pickRandom(this.GetPossiblePhenotypes()); | this.phenotype = pickRandom(this.GetPossiblePhenotypes()); | |||||||||||
else | else | |||||||||||
this.phenotype = "default"; | this.phenotype = "default"; | |||||||||||
}; | }; | |||||||||||
bbUnsubmitted Done Inline Actions
bb: | ||||||||||||
Identity.prototype.GetCiv = function() | Identity.prototype.GetCiv = function() | |||||||||||
{ | { | |||||||||||
return this.template.Civ; | return this.template.Civ; | |||||||||||
}; | }; | |||||||||||
Identity.prototype.GetLang = function() | Identity.prototype.GetLang = function() | |||||||||||
{ | { | |||||||||||
return this.template.Lang || "greek"; // ugly default | return this.template.Lang || "greek"; // ugly default | |||||||||||
▲ Show 20 Lines • Show All 54 Lines • ▼ Show 20 Lines | Identity.prototype.GetSelectionGroupName = function() | |||||||||||
return this.template.SelectionGroupName || ""; | return this.template.SelectionGroupName || ""; | |||||||||||
}; | }; | |||||||||||
Identity.prototype.GetGenericName = function() | Identity.prototype.GetGenericName = function() | |||||||||||
{ | { | |||||||||||
return this.template.GenericName; | return this.template.GenericName; | |||||||||||
}; | }; | |||||||||||
Identity.prototype.IsUndeletable = function() | ||||||||||||
{ | ||||||||||||
return this.template.Undeletable == "true"; | ||||||||||||
}; | ||||||||||||
Engine.RegisterComponentType(IID_Identity, "Identity", Identity); | Engine.RegisterComponentType(IID_Identity, "Identity", Identity); | |||||||||||
Done Inline Actionsbool → controllable? Stan: bool → controllable? | ||||||||||||
Not Done Inline ActionsWe could do something like garrisonable does, namely keeping track of who set us to uncontrollable? Freagarach: We could do something like garrisonable does, namely keeping track of who set us to… | ||||||||||||
Done Inline ActionsThis can not be used when selecting entities owned by another player and one has the ControlAllUnits on. Freagarach: This can not be used when selecting entities owned by another player and one has the… | ||||||||||||
Done Inline ActionsHmm, indeed, that's GUI-dependent. Probably needs a special check on the GUI-side too (or as an alternative) wraitii: Hmm, indeed, that's GUI-dependent.
Probably needs a special check on the GUI-side too (or as… |
Wildfire Games · Phabricator