Fix issues with the component documentation.

Reported by: @Langbart
Fixes: #6792

Differential Revision: https://code.wildfiregames.com/D4985
This was SVN commit r27638.
This commit is contained in:
Stan committed 2023-05-10 15:55:51 +00:00
1 parent 173e016172
commit c278da73d9
12 files changed
+21 -21

No files matched your search

@@ -4,7 +4,7 @@ var g_AttackTypes = ["Melee", "Ranged", "Capture"];
Attack.prototype.preferredClassesSchema =
"<optional>" +
"<element name='PreferredClasses' a:help='Space delimited list of classes preferred for attacking. If an entity has any of theses classes, it is preferred. The classes are in decending order of preference'>" +
"<element name='PreferredClasses' a:help='Space delimited list of classes preferred for attacking. If an entity has any of theses classes, it is preferred. The classes are in descending order of preference'>" +
"<attribute name='datatype'>" +
"<value>tokens</value>" +
"</attribute>" +
@@ -1,7 +1,7 @@
function BattleDetection() {}
BattleDetection.prototype.Schema =
"<a:help>Detects the occurence of battles.</a:help>" +
"<a:help>Detects the occurrence of battles.</a:help>" +
"<a:example/>" +
"<element name='TimerInterval' a:help='Duration of one timer period. Interval over which damage should be recorded in milliseconds'>" +
"<data type='positiveInteger'/>" +
@@ -32,7 +32,7 @@ BuildRestrictions.prototype.Schema =
"</oneOrMore>" +
"</list>" +
"</element>" +
"<element name='Category' a:help='Specifies the category of this building, for satisfying special constraints. Choices include: Apadana, CivilCentre, Council, Embassy, Fortress, Gladiator, Hall, Hero, Juggernaut, Library, Lighthouse, Monument, Pillar, PyramidLarge, PyramidSmall, Stoa, TempleOfAmun, Theater, Tower, UniqueBuilding, WarDog, Wonder'>" +
"<element name='Category' a:help='Specifies the category of this building, for satisfying special constraints. Choices include: Academy, ArmyCamp, CivilCentre, Colony, Council, Dock, Embassy, Fortress, Gladiator, GreatTower, ImperialCourt, ImperialMinistry, Library, Lighthouse, Monument, Palace, Pillar, PyramidLarge, RotaryMill, Stoa, Structure, TempleOfAmun, TempleOfVesta, Theater, Tower, Wall, Wonder, Yakhchal'>" +
"<text/>" +
"</element>" +
"<optional>" +
@@ -4,7 +4,7 @@ EntityLimits.prototype.Schema =
"<a:help>Specifies per category limits on number of entities (buildings or units) that can be created for each player</a:help>" +
"<a:example>" +
"<Limits>" +
"<Apadana>1</Apadana>" +
"<Palace>1</Palace>" +
"<Fortress>10</Fortress>" +
"<Hero>1</Hero>" +
"<Monument>5</Monument>" +
@@ -22,7 +22,7 @@ EntityLimits.prototype.Schema =
"</CivilCentre>" +
"</LimitRemovers>" +
"</a:example>" +
"<element name='Limits'>" +
"<element name='Limits' a:help='List of building/unit(s) requirements on which to apply a specific limit.'>" +
"<zeroOrMore>" +
"<element a:help='Specifies a category of building/unit on which to apply this limit. See BuildRestrictions/TrainingRestrictions for possible categories'>" +
"<anyName />" +
@@ -30,7 +30,7 @@ EntityLimits.prototype.Schema =
"</element>" +
"</zeroOrMore>" +
"</element>" +
"<element name='LimitChangers'>" +
"<element name='LimitChangers' a:help='List of building/unit(s) requirements that can change a specific limit.'>" +
"<zeroOrMore>" +
"<element a:help='Specifies a category of building/unit on which to apply this limit. See BuildRestrictions/TrainingRestrictions for possible categories'>" +
"<anyName />" +
@@ -43,7 +43,7 @@ EntityLimits.prototype.Schema =
"</element>" +
"</zeroOrMore>" +
"</element>" +
"<element name='LimitRemovers'>" +
"<element name='LimitRemovers' a:help='List of building/unit(s) requirements to lift a specific limit.'>" +
"<zeroOrMore>" +
"<element a:help='Specifies a category of building/unit on which to remove this limit. The limit will be removed if all the followings requirements are satisfied'>" +
"<anyName />" +
@@ -27,7 +27,7 @@ Formation.prototype.Schema =
"<text/>" +
"</element>" +
"<optional>" +
"<element name='SortingOrder' a:help='The order of sorting. This defaults to an order where the formation is filled from the first row to the last, and each row from the center to the sides. Other possible sort orders are “fillFromTheSides”, where the most important units are on the sides of each row, and “fillToTheCenter”, where the most vulnerable units are in the center of the formation.'>" +
"<element name='SortingOrder' a:help='The order of sorting. This defaults to an order where the formation is filled from the first row to the last, and each row from the center to the sides. Other possible sort orders are &#x201C;fillFromTheSides&#x201D;, where the most important units are on the sides of each row, and &#x201C;fillToTheCenter&#x201D;, where the most vulnerable units are in the center of the formation.'>" +
"<text/>" +
"</element>" +
"</optional>" +
@@ -38,7 +38,7 @@ Formation.prototype.Schema =
"<ref name='nonNegativeDecimal'/>" +
"</element>" +
"<optional>" +
"<element name='MinColumns' a:help='When possible, this number of colums will be created. Overriding the wanted width-to-depth ratio.'>" +
"<element name='MinColumns' a:help='When possible, this number of columns will be created. Overriding the wanted width-to-depth ratio.'>" +
"<data type='nonNegativeInteger'/>" +
"</element>" +
"</optional>" +
@@ -64,7 +64,7 @@ Formation.prototype.Schema =
"<ref name='nonNegativeDecimal'/>" +
"</element>" +
"<element name='AnimationVariants' a:help='Give a list of animation variants to use for the particular formation members, based on their positions.'>" +
"<text a:help='example text: “1..1,1..-1:animationVariant1;2..2,1..-1;animationVariant2”, this will set animationVariant1 for the first row, and animation2 for the second row. The first part of the numbers (1..1 and 2..2) means the row range. Every row between (and including) those values will switch animationvariants. The second part of the numbers (1..-1) denote the columns inside those rows that will be affected. Note that in both cases, you can use -1 for the last row/column, -2 for the second to last, etc.'/>" +
"<text a:help='example text: &#x201C;1..1,1..-1:animationVariant1;2..2,1..-1;animationVariant2&#x201D;, this will set animationVariant1 for the first row, and animation2 for the second row. The first part of the numbers (1..1 and 2..2) means the row range. Every row between (and including) those values will switch animationvariants. The second part of the numbers (1..-1) denote the columns inside those rows that will be affected. Note that in both cases, you can use -1 for the last row/column, -2 for the second to last, etc.'/>" +
"</element>";
// Distance at which we'll switch between column/box formations.
@@ -8,7 +8,7 @@ Identity.prototype.Schema =
"<SpecificName>Hoplī́tēs Athēnaïkós</SpecificName>" +
"<Icon>units/athen_infantry_spearman.png</Icon>" +
"</a:example>" +
"<element name='Civ' a:help='Civilization that this unit is primarily associated with, typically a 4-letter code. Choices include: gaia (world objects), skirm (skirmish map placeholders), athen (Athenians), brit (Britons), cart (Carthaginians), gaul (Gauls), iber (Iberians), kush (Kushites), mace (Macedonians), maur (Mauryas), pers (Persians), ptol (Ptolemies), rome (Romans), sele (Seleucids), spart (Spartans).'>" +
"<element name='Civ' a:help='Civilization that this unit is primarily associated with, typically a 4-letter code. Choices include: gaia (world objects), skirm (skirmish map placeholders), athen (Athenians), brit (Britons), cart (Carthaginians), gaul (Gauls), han (Han Chinese), iber (Iberians), kush (Kushites), mace (Macedonians), maur (Mauryas), pers (Persians), ptol (Ptolemies), rome (Romans), sele (Seleucids), spart (Spartans).'>" +
"<text/>" +
"</element>" +
"<optional>" +
@@ -57,7 +57,7 @@ Identity.prototype.Schema =
"</element>" +
"</optional>" +
"<optional>" +
"<element name='Classes' a:help='Optional list of space-separated classes applying to this entity. Choices include: AfricanElephant, AmunGuard, Animal, ApedemakGuard, Ashoka, Barter, CitizenSoldier, CivCentre, CivSpecific, ConquestCritical, Domestic, DropsiteFood, DropsiteMetal, DropsiteStone, DropsiteWood, FastMoving, FemaleCitizen, Foundation, GarrisonFortress, Human, IndianElephant, Juggernaut, KushTrireme, MercenaryCamp, Organic, Player, PtolemyIV, SeaCreature, Spy, Structure, Unit, WallLong, WallMedium, WallShort, WallTower.'>" +
"<element name='Classes' a:help='Optional list of space-separated classes applying to this entity. Choices include: AfricanElephant, AmunGuard, Animal, ApedemakGuard, Ashoka, Barter, Bireme, CitizenSoldier, CivCentre, CivSpecific, ConquestCritical, Domestic, DropsiteFood, DropsiteMetal, DropsiteStone, DropsiteWood, FastMoving, FemaleCitizen, Formation, Foundation, GarrisonFortress, Human, IndianElephant, Juggernaut, KushTrireme, MercenaryCamp, Organic, Player, PtolemyIV, Quinquereme, RotaryMill, SeaCreature, Spy, Structure, Trireme, Unit, WallLong, WallMedium, WallShort, WallTower.'>" +
"<attribute name='datatype'>" +
"<value>tokens</value>" +
"</attribute>" +
@@ -65,7 +65,7 @@ Identity.prototype.Schema =
"</element>" +
"</optional>" +
"<optional>" +
"<element name='VisibleClasses' a:help='Optional list of space-separated classes applying to this entity. These classes will also be visible in various GUI elements. If the classes need spaces, underscores will be replaced with spaces. Choices include: Amphitheater, Archer, ArmyCamp, Arsenal, ArtilleryTower, Axeman, Barracks, Bireme, BoltShooter, BoltTower, Bribable, Builder, Camel, Cavalry, Champion, Chariot, Citizen, City, Civic, CivilCentre, Colony, Corral, Council, Crossbowman, Defensive, Dock, Dog, Economic, Elephant, ElephantStable, Embassy, Farmstead, Field, Fireship, FishingBoat, Forge, Fortress, Gate, Gladiator, Gymnasium, Hall, Healer, Hero, House, Immortal, Infantry, Javelineer, Library, Lighthouse, Maceman, Melee, Market, Mercenary, Military, Monument, Naval, Outpost, Palace, Palisade, Pikeman, Pillar, Pyramid, Quinquereme, Ram, Range, Ranged, Relic, Resource, RotaryMill, SentryTower, Ship, Shipyard, Siege, SiegeTower, SiegeWall, Slave, Slinger, Soldier, Spearman, Stable, Stoa, StoneThrower, StoneTower, Storehouse, Support, Swordsman, Syssiton, Temple, TempleOfAmun, TempleOfApedemak, TempleOfMars, TempleOfVesta, Theater, Tower, Town, Trade, Trader, Trireme, TriumphalArch, Village, Wall, Warship, Wonder, Worker.'>" +
"<element name='VisibleClasses' a:help='Optional list of space-separated classes applying to this entity. These classes will also be visible in various GUI elements. Choices include: Academy, Amphitheater, Archer, ArmyCamp, Arsenal, ArtilleryTower, Axeman, Barracks, BoltShooter, BoltTower, Bribable, Builder, Camel, Cavalry, Champion, Chariot, Citizen, City, Civic, CivilCentre, Colony, Corral, Council, Crossbowman, Defensive, Dock, Dog, Economic, Elephant, ElephantStable, Embassy, Farmstead, Field, Fireship, FishingBoat, Forge, Fortress, Gate, Gladiator, GreatTower, Gymnasium, Hall, Healer, Heavy, Hero, House, IceHouse, Immortal, ImperialCourt, ImperialMinistry, Infantry, Javelineer, LaoziGate, Library, Light, Lighthouse, Maceman, Medium, Melee, Market, Mercenary, Military, Minister, Monument, Naval, Outpost, Palace, Palisade, Pikeman, Pillar, Pyramid, Ram, Range, Ranged, Relic, Resource, SentryTower, Ship, Shipyard, Shrine, Siege, SiegeTower, SiegeWall, Slave, Slinger, Soldier, Spearman, Stable, Stoa, StoneThrower, StoneTower, Storehouse, Support, Swordsman, Syssiton, Temple, TempleOfAmun, TempleOfApedemak, TempleOfMars, TempleOfVesta, Tent, Theater, Tower, Town, Trade, Trader, TriumphalArch, Trumpeter, Village, Wall, Warship, Wonder, Worker.'>" +
"<attribute name='datatype'>" +
"<value>tokens</value>" +
"</attribute>" +
@@ -5,7 +5,7 @@ ResourceTrickle.prototype.Schema =
"<element name='Rates' a:help='Trickle Rates'>" +
Resources.BuildSchema("nonNegativeDecimal") +
"</element>" +
"<element name='Interval' a:help='Number of miliseconds must pass for the player to gain the next trickle.'>" +
"<element name='Interval' a:help='Number of milliseconds must pass for the player to gain the next trickle.'>" +
"<ref name='nonNegativeDecimal'/>" +
"</element>";
@@ -4,7 +4,7 @@
function Trader() {}
Trader.prototype.Schema =
"<a:help>Lets the unit generate resouces while moving between markets (or docks in case of water trading).</a:help>" +
"<a:help>Lets the unit generate resources while moving between markets (or docks in case of water trading).</a:help>" +
"<a:example>" +
"<GainMultiplier>0.75</GainMultiplier>" +
"<GarrisonGainMultiplier>0.2</GarrisonGainMultiplier>" +
@@ -7,7 +7,7 @@ TrainingRestrictions.prototype.Schema =
"<Category>Hero</Category>" +
"</TrainingRestrictions>" +
"</a:example>" +
"<element name='Category' a:help='Specifies the category of this unit, for satisfying special constraints. Choices include: Hero, Juggernaut, WarDog'>" +
"<element name='Category' a:help='Specifies the category of this unit, for satisfying special constraints. Choices include: Animal, Centurion, Gladiator, Hero, Minister, Juggernaut, WarDog'>" +
"<text/>" +
"</element>" +
"<optional>" +
@@ -43,7 +43,7 @@ Treasure.prototype.Resources = function()
};
/**
* @return {number} - The time in miliseconds it takes to collect this treasure.
* @return {number} - The time in milliseconds it takes to collect this treasure.
*/
Treasure.prototype.CollectionTime = function()
{
@@ -27,7 +27,7 @@ const StatusEffectsSchema =
"</optional>" +
"<optional>" +
"<interleave>" +
"<element name='Interval' a:help='Interval between the occurances of the effect.'><ref name='nonNegativeDecimal'/></element>" +
"<element name='Interval' a:help='Interval between the occurrences of the effect.'><ref name='nonNegativeDecimal'/></element>" +
"<oneOrMore>" +
"<choice>" +
DirectEffectsSchema +
@@ -38,7 +38,7 @@ const StatusEffectsSchema =
"<optional>" +
ModificationsSchema +
"</optional>" +
"<element name='Stackability' a:help='Defines how this status effect stacks, i.e. how subsequent status effects of the same kind are handled. Choices are: “Ignore”, which means a new one is ignored, “Extend”, which means the duration of a new one is added to the already active status effect, “Replace”, which means the currently active status effect is removed and the new one is put in place and “Stack”, which means that the status effect can be added multiple times.'>" +
"<element name='Stackability' a:help='Defines how this status effect stacks, i.e. how subsequent status effects of the same kind are handled. Choices are: &#x201C;Ignore&#x201D;, which means a new one is ignored, &#x201C;Extend&#x201D;, which means the duration of a new one is added to the already active status effect, &#x201C;Replace&#x201D;, which means the currently active status effect is removed and the new one is put in place and &#x201C;Stack&#x201D;, which means that the status effect can be added multiple times.'>" +
"<choice>" +
"<value>Ignore</value>" +
"<value>Extend</value>" +
@@ -91,8 +91,8 @@ function LoadPlayerSettings(settings, newPlayers)
{
let resourceCounts = cmpPlayer.GetResourceCounts();
let newResourceCounts = {};
for (let resouces in resourceCounts)
newResourceCounts[resouces] = settings.StartingResources;
for (let resources in resourceCounts)
newResourceCounts[resources] = settings.StartingResources;
cmpPlayer.SetResourceCounts(newResourceCounts);
}
else if (playerDefaults[i].Resources !== undefined)