Fix jsDocs object => Object
This was SVN commit r23991.
This commit is contained in:
1 parent
2627714c07
commit
3ff65b451f
14 files changed
+35
-35
No files matched your search
@@ -111,7 +111,7 @@ function HandleTokens(originalValue, modification)
|
||||
* Derives the technology requirements from a given technology template.
|
||||
* Takes into account the `supersedes` attribute.
|
||||
*
|
||||
* @param {object} template - The template object. Loading of the template must have already occured.
|
||||
* @param {Object} template - The template object. Loading of the template must have already occured.
|
||||
*
|
||||
* @return Derived technology requirements. See `InterpretTechRequirements` for object's syntax.
|
||||
*/
|
||||
@@ -345,7 +345,7 @@ function InterpretTechRequirements(civ, operator, value)
|
||||
/**
|
||||
* Determine order of phases.
|
||||
*
|
||||
* @param {object} phases - The current available store of phases.
|
||||
* @param {Object} phases - The current available store of phases.
|
||||
* @return {array} List of phases
|
||||
*/
|
||||
function UnravelPhases(phases)
|
||||
|
||||
@@ -98,7 +98,7 @@ function MatchesClassList(classes, match)
|
||||
/**
|
||||
* Gets the value originating at the value_path as-is, with no modifiers applied.
|
||||
*
|
||||
* @param {object} template - A valid template as returned from a template loader.
|
||||
* @param {Object} template - A valid template as returned from a template loader.
|
||||
* @param {string} value_path - Route to value within the xml template structure.
|
||||
* @return {number}
|
||||
*/
|
||||
@@ -113,11 +113,11 @@ function GetBaseTemplateDataValue(template, value_path)
|
||||
/**
|
||||
* Gets the value originating at the value_path with the modifiers dictated by the mod_key applied.
|
||||
*
|
||||
* @param {object} template - A valid template as returned from a template loader.
|
||||
* @param {Object} template - A valid template as returned from a template loader.
|
||||
* @param {string} value_path - Route to value within the xml template structure.
|
||||
* @param {string} mod_key - Tech modification key, if different from value_path.
|
||||
* @param {number} player - Optional player id.
|
||||
* @param {object} modifiers - Value modifiers from auto-researched techs, unit upgrades,
|
||||
* @param {Object} modifiers - Value modifiers from auto-researched techs, unit upgrades,
|
||||
* etc. Optional as only used if no player id provided.
|
||||
* @return {number} Modifier altered value.
|
||||
*/
|
||||
@@ -141,11 +141,11 @@ function GetModifiedTemplateDataValue(template, value_path, mod_key, player, mod
|
||||
* NOTICE: The data returned here should have the same structure as
|
||||
* the object returned by GetEntityState and GetExtendedEntityState!
|
||||
*
|
||||
* @param {object} template - A valid template as returned by the template loader.
|
||||
* @param {Object} template - A valid template as returned by the template loader.
|
||||
* @param {number} player - An optional player id to get the technology modifications
|
||||
* of properties.
|
||||
* @param {object} auraTemplates - In the form of { key: { "auraName": "", "auraDescription": "" } }.
|
||||
* @param {object} modifiers - Modifications from auto-researched techs, unit upgrades
|
||||
* @param {Object} auraTemplates - In the form of { key: { "auraName": "", "auraDescription": "" } }.
|
||||
* @param {Object} modifiers - Modifications from auto-researched techs, unit upgrades
|
||||
* etc. Optional as only used if there's no player
|
||||
* id provided.
|
||||
*/
|
||||
@@ -483,7 +483,7 @@ function GetTemplateDataHelper(template, player, auraTemplates, modifiers = {})
|
||||
|
||||
/**
|
||||
* Get basic information about a technology template.
|
||||
* @param {object} template - A valid template as obtained by loading the tech JSON file.
|
||||
* @param {Object} template - A valid template as obtained by loading the tech JSON file.
|
||||
* @param {string} civ - Civilization for which the tech requirements should be calculated.
|
||||
*/
|
||||
function GetTechnologyBasicDataHelper(template, civ)
|
||||
@@ -503,7 +503,7 @@ function GetTechnologyBasicDataHelper(template, civ)
|
||||
|
||||
/**
|
||||
* Get information about a technology template.
|
||||
* @param {object} template - A valid template as obtained by loading the tech JSON file.
|
||||
* @param {Object} template - A valid template as obtained by loading the tech JSON file.
|
||||
* @param {string} civ - Civilization for which the specific name and tech requirements should be returned.
|
||||
*/
|
||||
function GetTechnologyDataHelper(template, civ, resources)
|
||||
|
||||
@@ -38,7 +38,7 @@ var g_BuddySymbol = '•';
|
||||
* Returns a formatted string describing the player assignments.
|
||||
* Needs g_CivData to translate!
|
||||
*
|
||||
* @param {object} playerDataArray - As known from gamesetup and simstate.
|
||||
* @param {Object} playerDataArray - As known from gamesetup and simstate.
|
||||
* @param {(string[]|false)} playerStates - One of "won", "defeated", "active" for each player.
|
||||
* @returns {string}
|
||||
*/
|
||||
|
||||
@@ -31,7 +31,7 @@ class ReferencePage
|
||||
/**
|
||||
* Concatanates the return values of the array of passed functions.
|
||||
*
|
||||
* @param {object} template
|
||||
* @param {Object} template
|
||||
* @param {array} textFunctions
|
||||
* @param {string} joiner
|
||||
* @return {string} The built text.
|
||||
|
||||
@@ -12,8 +12,8 @@ class TemplateLister
|
||||
/**
|
||||
* Compile lists of templates buildable/trainable/researchable of a given civ.
|
||||
*
|
||||
* @param {object} civCode
|
||||
* @param {object} civData - Data defining every civ in the game.
|
||||
* @param {Object} civCode
|
||||
* @param {Object} civData - Data defining every civ in the game.
|
||||
*/
|
||||
compileTemplateLists(civCode, civData)
|
||||
{
|
||||
@@ -80,7 +80,7 @@ class TemplateLister
|
||||
* Note: this civ must have gone through the compilation process above!
|
||||
*
|
||||
* @param {string} civCode
|
||||
* @return {object} containing lists of template names, grouped by type.
|
||||
* @return {Object} containing lists of template names, grouped by type.
|
||||
*/
|
||||
getTemplateLists(civCode)
|
||||
{
|
||||
|
||||
@@ -24,7 +24,7 @@ class TemplateLoader
|
||||
* Loads from local cache if available, else from file system.
|
||||
*
|
||||
* @param {string} templateName
|
||||
* @return {object} Object containing raw template data.
|
||||
* @return {Object} Object containing raw template data.
|
||||
*/
|
||||
loadAuraTemplate(templateName)
|
||||
{
|
||||
@@ -46,7 +46,7 @@ class TemplateLoader
|
||||
*
|
||||
* @param {string} templateName
|
||||
* @param {string} civCode
|
||||
* @return {object} Object containing raw template data.
|
||||
* @return {Object} Object containing raw template data.
|
||||
*/
|
||||
loadEntityTemplate(templateName, civCode)
|
||||
{
|
||||
@@ -76,7 +76,7 @@ class TemplateLoader
|
||||
* Loads from local cache if available, else from file system.
|
||||
*
|
||||
* @param {string} templateName
|
||||
* @return {object} Object containing raw template data.
|
||||
* @return {Object} Object containing raw template data.
|
||||
*/
|
||||
loadTechnologyTemplate(templateName)
|
||||
{
|
||||
@@ -94,7 +94,7 @@ class TemplateLoader
|
||||
/**
|
||||
* @param {string} templateName
|
||||
* @param {string} civCode
|
||||
* @return {object} Contains a list and the requirements of the techs in the pair
|
||||
* @return {Object} Contains a list and the requirements of the techs in the pair
|
||||
*/
|
||||
loadTechnologyPairTemplate(templateName, civCode)
|
||||
{
|
||||
|
||||
@@ -140,7 +140,7 @@ class TemplateParser
|
||||
*
|
||||
* @param {string} technologyName
|
||||
* @param {string} civCode
|
||||
* @return {object} Sanitized data about the requested technology.
|
||||
* @return {Object} Sanitized data about the requested technology.
|
||||
*/
|
||||
getTechnology(technologyName, civCode)
|
||||
{
|
||||
@@ -180,7 +180,7 @@ class TemplateParser
|
||||
/**
|
||||
* @param {string} phaseCode
|
||||
* @param {string} civCode
|
||||
* @return {object} Sanitized object containing phase data
|
||||
* @return {Object} Sanitized object containing phase data
|
||||
*/
|
||||
getPhase(phaseCode, civCode)
|
||||
{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* Initialize the page
|
||||
* Initialize the page.
|
||||
*
|
||||
* @param {object} data - Parameters passed from the code that calls this page into existence.
|
||||
* @param {Object} data - Parameters passed from the code that calls this page into existence.
|
||||
*/
|
||||
function init(data = {})
|
||||
{
|
||||
|
||||
@@ -8,7 +8,7 @@ g_TooltipTextFormats.nameGeneric.font = "sans-bold-16";
|
||||
/**
|
||||
* Page initialisation. May also eventually pre-draw/arrange objects.
|
||||
*
|
||||
* @param {object} data - Contains the civCode and the name of the template to display.
|
||||
* @param {Object} data - Contains the civCode and the name of the template to display.
|
||||
* @param {string} data.templateName
|
||||
* @param {string} [data.civ]
|
||||
*/
|
||||
|
||||
@@ -464,7 +464,7 @@ function controlsPlayer(playerID)
|
||||
* Called when one or more players have won or were defeated.
|
||||
*
|
||||
* @param {array} - IDs of the players who have won or were defeated.
|
||||
* @param {object} - a plural string stating the victory reason.
|
||||
* @param {Object} - a plural string stating the victory reason.
|
||||
* @param {boolean} - whether these players have won or lost.
|
||||
*/
|
||||
function playersFinished(players, victoryString, won)
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
/**
|
||||
* Get the height range of a heightmap
|
||||
* @param {array} [heightmap=g_Map.height] - The reliefmap the minimum and maximum height should be determined for
|
||||
* @return {object} Height range with 2 floats in properties "min" and "max"
|
||||
* @return {Object} Height range with 2 floats in properties "min" and "max"
|
||||
*/
|
||||
function getMinAndMaxHeight(heightmap = g_Map.height)
|
||||
{
|
||||
@@ -76,7 +76,7 @@ function translateHeightmap(offset, defaultHeight = undefined, heightmap = g_Map
|
||||
|
||||
/**
|
||||
* Get start location with the largest minimum distance between players
|
||||
* @param {object} [heightRange] - The height range start locations are allowed
|
||||
* @param {Object} [heightRange] - The height range start locations are allowed
|
||||
* @param {integer} [maxTries=1000] - How often random player distributions are rolled to be compared
|
||||
* @param {Number} [minDistToBorder=20] - How far start locations have to be away from the map border
|
||||
* @param {integer} [numberOfPlayers=g_MapSettings.PlayerData.length] - How many start locations should be placed
|
||||
@@ -227,7 +227,7 @@ function setBaseTerrainDiamondSquare(minHeight = MIN_HEIGHT, maxHeight = MAX_HEI
|
||||
* Meant to place e.g. resource spots within a height range
|
||||
* @param {array} [heightRange] - The height range in which to place the entities (An associative array with keys "min" and "max" each containing a float)
|
||||
* @param {array} [avoidPoints=[]] - An array of objects of the form { "x": int, "y": int, "dist": int }, points that will be avoided in the given dist e.g. start locations
|
||||
* @param {object} [avoidClass=undefined] - TileClass to be avoided
|
||||
* @param {Object} [avoidClass=undefined] - TileClass to be avoided
|
||||
* @param {integer} [minDistance=30] - How many tile widths the entities to place have to be away from each other, start locations and the map border
|
||||
* @param {array} [heightmap=g_Map.height] - The reliefmap the entities should be distributed on
|
||||
* @param {integer} [maxTries=2 * g_Map.size] - How often random player distributions are rolled to be compared (256 to 1024)
|
||||
|
||||
@@ -64,7 +64,7 @@ function loadWallset(wallsetPath, civ)
|
||||
* @param {string} type - Descriptive string, example: "tiny". Not really needed (WallTool.wallTypes["type string"] is used). Mainly for custom wall elements.
|
||||
* @param {array} [wall] - Array of wall element strings. May be defined at a later point.
|
||||
* Example: ["medium", "cornerIn", "gate", "cornerIn", "medium", "cornerIn", "gate", "cornerIn"]
|
||||
* @param {object} [centerToFirstElement] - Vector from the visual center of the fortress to the first wall element.
|
||||
* @param {Object} [centerToFirstElement] - Vector from the visual center of the fortress to the first wall element.
|
||||
* @param {number} [centerToFirstElement.x]
|
||||
* @param {number} [centerToFirstElement.y]
|
||||
*/
|
||||
@@ -136,7 +136,7 @@ function createDefaultFortressTypes()
|
||||
*
|
||||
* @param {string} element - What sort of element to fetch.
|
||||
* @param {string} [style] - The style from which this element should come from.
|
||||
* @returns {object} The wall element requested. Or a tower element.
|
||||
* @returns {Object} The wall element requested. Or a tower element.
|
||||
*/
|
||||
function getWallElement(element, style)
|
||||
{
|
||||
@@ -345,7 +345,7 @@ function getWallAlignment(position, wall = [], style = "athen_stone", orientatio
|
||||
* Used to get centerToFirstElement of fortresses by default
|
||||
*
|
||||
* @param {number} alignment
|
||||
* @returns {object} Vector from the center of the set of aligned wallpieces to the first wall element.
|
||||
* @returns {Object} Vector from the center of the set of aligned wallpieces to the first wall element.
|
||||
*/
|
||||
function getCenterToFirstElement(alignment)
|
||||
{
|
||||
@@ -429,7 +429,7 @@ function placeWall(position, wall = [], style, playerId = 0, orientation = 0, co
|
||||
* "entry" or "gate") to get the orientation correct.
|
||||
*
|
||||
* @param {Vector2D} centerPosition
|
||||
* @param {object} [fortress] - If not provided, defaults to the predefined "medium" fortress type.
|
||||
* @param {Object} [fortress] - If not provided, defaults to the predefined "medium" fortress type.
|
||||
* @param {string} [style] - Wall style string.
|
||||
* @param {number} [playerId] - Identifier of the player for whom the wall will be placed.
|
||||
* @param {number} [orientation] - Angle the first wall element (should be a gate or entrance) is placed. Default is 0
|
||||
|
||||
@@ -45,8 +45,8 @@ StatusEffectsReceiver.prototype.ApplyStatus = function(effectData, attacker, att
|
||||
* Adds a status effect to the entity.
|
||||
*
|
||||
* @param {string} statusName - The name of the status effect.
|
||||
* @param {object} data - The various effects and timings.
|
||||
* @param {object} attackerData - The attacker and attackerOwner.
|
||||
* @param {Object} data - The various effects and timings.
|
||||
* @param {Object} attackerData - The attacker and attackerOwner.
|
||||
*/
|
||||
StatusEffectsReceiver.prototype.AddStatus = function(statusName, data, attackerData)
|
||||
{
|
||||
|
||||
@@ -105,7 +105,7 @@ TechnologyManager.prototype.CanResearch = function(tech)
|
||||
|
||||
/**
|
||||
* Private function for checking a set of requirements is met
|
||||
* @param {object} reqs - Technology requirements as derived from the technology template by globalscripts
|
||||
* @param {Object} reqs - Technology requirements as derived from the technology template by globalscripts
|
||||
* @param {boolean} civonly - True if only the civ requirement is to be checked
|
||||
*
|
||||
* @return true if the requirements pass, false otherwise
|
||||
|
||||
Reference in new issue
Block a user