Describes an instance of a module definition (see configRef).
Property name | Type | Info |
moduleId | integer | The module's definition id number. (Read-only) |
inBuffer | ProductBuffer | The module's input buffer. Stored products to be processed. (See ProductBuffer reference) |
outBuffer | ProductBuffer | The module's output buffer. Stores outgoing products to be shipped. |
processList | ProductBuffer | Products that are currently being processed. |
maxInBuffer | integer | Maximum inbuffer size, from config. (Read-only) |
maxOutBuffer | integer | Maximum outbuffer size, from config. (Read-only) |
inCon | Module | The module this module recieves input from. (Or null) |
outCon | Module | The module this module sends output to. (Or null) |
waitTime | number | The time it takes for the module to complete a production cycle. (Read-only) |
name | string | The name of the module. |
mode1,mode2,mode3,mode4 | integer | General variables to define different settings for modules. |
qa | number | The module's QA setting. |
cleaning | number | The module's cleaning setting. |
damage | number | The module's damage level. |
None yet.
Event name | Info | Return value |
onInput(Product) | Called when the module recieves a new product that should be sent to the inbuffer. | A product to be sent to storage, or null/nothing. |
onOutput(Product) | Called when a product is finished processing and should be sent to the outbuffer. | A product to be sent to storage, or null/nothing. |
onCheckBuffer | Called when the processList is empty, to see if there are products in the inbuffer that can be processed. | None |
onClick | Called when the module is clicked in "change mode". | A gui object where additional gui objects can be placed. |
See dummyModule.js