Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/simulation/components/Identity.js
Show First 20 Lines • Show All 80 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='CanGarrison'>" + | |||||
"<data type='boolean'/>" + | |||||
"</element>" + | |||||
"</optional>"; | "</optional>"; | ||||
Identity.prototype.Init = function() | Identity.prototype.Init = function() | ||||
{ | { | ||||
// caching | // caching | ||||
this.classesList = GetIdentityClasses(this.template); | this.classesList = GetIdentityClasses(this.template); | ||||
this.visibleClassesList = GetVisibleIdentityClasses(this.template); | this.visibleClassesList = GetVisibleIdentityClasses(this.template); | ||||
▲ Show 20 Lines • Show All 61 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.GetCanGarrison = function() | |||||
leper: I guess adding a Garrisonable component would be nicer and not put us in the slightly awkward… | |||||
Not Done Inline ActionsAdding a component that doesn't do anything? elexis: Adding a component that doesn't do anything?
How likely is it that we or a modder will add an… | |||||
Not Done Inline ActionscmpWonder. It can be owned (cmpOwnership), and it can be selected (cmpSelectable). Most of the other properties aren't used for a single thing only, or are grouped with others for what is mostly GUI purposes here. leper: cmpWonder.
It can be owned (cmpOwnership), and it can be selected (cmpSelectable).
Most of… | |||||
{ | |||||
return this.template.CanGarrison != "false"; | |||||
}; | |||||
Engine.RegisterComponentType(IID_Identity, "Identity", Identity); | Engine.RegisterComponentType(IID_Identity, "Identity", Identity); |
Wildfire Games · Phabricator
I guess adding a Garrisonable component would be nicer and not put us in the slightly awkward position of needing an Identity component just for garrisoning.