Class: Foundation

Foundation()

new Foundation()

Source:

Members

Schema

Source:

buildMultiplier

Source:

buildMultiplier

Source:

buildTimeModifier

Source:

builders

Source:

committed

Source:

committed

Source:

costs

Source:

finalTemplateName

Source:

initialised

Source:

maxProgress

Source:

maxProgress

Source:

previewEntity

Source:

previewEntity

Source:

previewEntity

Source:

previewEntity

Source:

totalBuilderRate

Source:

totalBuilderRate

Source:

totalBuilderRate

Source:

totalBuilderRate

Source:

Methods

AddBuilder(builderEnt)

Parameters:
Name Type Description
builderEnt number The entity to add.
Source:

AddBuilderHelper(builderEnt) → {boolean}

Parameters:
Name Type Description
builderEnt number The entity to add.
Source:
Returns:
- Whether the addition was successful.
Type
boolean

AddBuilders(builders)

Parameters:
Name Type Description
builders Array.<number> An array containing the entity IDs of builders to assign.
Source:

Build()

Perform some number of seconds of construction work. Returns true if the construction is completed.
Source:

CalculateBuildMultiplier()

The build multiplier is a penalty that is applied to each builder. For example, ten women build at a combined rate of 10^0.7 = 5.01 instead of 10.
Source:

Commit() → {boolean}

Source:
Returns:
- Whether the foundation has been committed sucessfully.
Type
boolean

CreateConstructionPreview()

Create preview entity and copy various parameters from the foundation.
Source:

Deserialize()

Source:

GetBuildPercentage()

Source:

GetBuildProgress()

Returns the current build progress in a [0,1] range.
Source:

GetBuildRate()

Source:

GetBuildTime()

Source:

GetBuilders() → {Array.<number>}

Source:
Returns:
- An array containing the entity IDs of assigned builders.
Type
Array.<number>

GetNumBuilders()

Source:

HandleBuildersChanged()

This has to be called whenever the number of builders change.
Source:

Init()

Source:

InitialiseConstruction()

Source:

IsFinished()

Source:

Mirage()

Source:

OnDeserialized()

Source:

OnEntityRenamed()

Source:

OnHealthChanged()

Moving the revelation logic from Build to here makes the building sink if it is attacked.
Source:

OnOwnershipChanged()

Source:

RemoveBuilder(builderEnt)

Parameters:
Name Type Description
builderEnt number The entity to remove.
Source:

Serialize()

Source:

SetBuildMultiplier()

Source: