Module builder

Provides the class that actually handles building and updating the modular constructions

Functions

modConBuilder (builderID, removerFileName, constructionFileName) Constructor returning modConBuilderInstance

Class modConBuilderInstance

modConBuilderInstance:defineModule (key, data) Add/update a module definition
modConBuilderInstance:getModulePreview (key, params) Get the preview data for the specified module as a table that can be returned from the upgradeFn
modConBuilderInstance:getEntityBySeed (seed) Get the entity id for the given seed
modConBuilderInstance:getDataBySeed (seed) Get construction data referenced by the given seed
modConBuilderInstance:buildCon (seed, range[, extend=false]) Try to merge modules in the defined circle to a single construction or add them to an existing construction
modConBuilderInstance:upgradeCon (seed, range) Get the modular construction defined by seed and split it into its modules


Functions

modConBuilder (builderID, removerFileName, constructionFileName)
Constructor returning modConBuilderInstance

Parameters:

  • builderID string unique name for this builder
  • removerFileName string filename of the module which removes parts of the construction
  • constructionFileName string filename of the construction which defines the building circle and where the modules are integrated to

Returns:

    modConBuilderInstance

Class modConBuilderInstance

Base class for modular constructions
modConBuilderInstance:defineModule (key, data)
Add/update a module definition

Parameters:

modConBuilderInstance:getModulePreview (key, params)
Get the preview data for the specified module as a table that can be returned from the upgradeFn

Parameters:

Returns:

    table
modConBuilderInstance:getEntityBySeed (seed)
Get the entity id for the given seed

Parameters:

  • seed number

Returns:

    table
modConBuilderInstance:getDataBySeed (seed)
Get construction data referenced by the given seed

Parameters:

  • seed number

Returns:

    table
modConBuilderInstance:buildCon (seed, range[, extend=false])
Try to merge modules in the defined circle to a single construction or add them to an existing construction

Parameters:

  • seed number
  • range number
  • extend boolean (default false)
modConBuilderInstance:upgradeCon (seed, range)
Get the modular construction defined by seed and split it into its modules

Parameters:

  • seed number
  • range number
generated by LDoc 1.4.6 Last updated 2018-11-09 12:08:57