Skip to main content

ExampleManager

Manages examples and lets you create examples for the Computer.

--

Structures

Example

Fields

  • name [ string ] The name of the example.
  • script [ string ] The script in the example.

Functions

reloadExamples

sm.scrapcomputers.exampleManager.reloadExamples()

Reloads all the examples.


getExamples

sm.scrapcomputers.exampleManager.getExamples()

Gets the loaded examples.

Returns:

  • [ Example[] ] All loaded examples.

getTotalExamples

sm.scrapcomputers.exampleManager.getTotalExamples()

Gets the total number of examples currently loaded.

Returns:

  • [ integer ] The total number of loaded examples.

addExample

sm.scrapcomputers.exampleManager.addExample( name, script )

Adds a example

Arguments:

  • name [ string ] The name of the example
  • script [ string ] The script of the example