Module FSM
Factorio Softmod Manager
Usage:
Manager = require("FactorioSoftmodManager")
Used to load all other modules that are indexed in index.lua
Info:
| setVerbose |
Main logic for allowing verbose at different stages though out the script |
| sandbox |
Creates a sand box envorment and runs a callback in that sand box; provents global pollution |
| loadModules |
Loads the modules that are present in the index list |
| error |
A more detailed replacement for the lua error function to allow for handlers to be added; repleaces default error so error can be used instead of Manager.error |
| names |
Sub set to Manger.event and acts as a coverter between event_name and event_id |
-
_verbose (rtn)
-
Default output for the verbose
Parameters:
- rtn
string
the value that will be returned though verbose output
Usage:
Manager.verbose('Hello, World!')
-
verbose (rtn, action)
-
Used to call the output of the verbose when the current state allows it
Parameters:
- rtn
string
the value that will be returned though verbose output
- action
string
is used to decide which verbose this is error || event etc
Usage:
Manager.verbose('Hello, World!')
-
setVerbose
-
Main logic for allowing verbose at different stages though out the script
- table
newTbl
the table that will be searched for settings to be updated
Usage:
Manager.setVerbose{output=log}
Manager.setVerbose[setting]
tostring(Manager.setVerbose)
-
sandbox
-
Creates a sand box envorment and runs a callback in that sand box; provents global pollution
- function
callback
the function that will be ran in the sandbox
- any
other params that the function will use
(optional)
Usage:
-
loadModules
-
Loads the modules that are present in the index list
Usage:
-
error
-
A more detailed replacement for the lua error function to allow for handlers to be added; repleaces default error so error can be used instead of Manager.error
- string
name
|| fucntion the name that is given to the callback || the callback that will be used
- string
name
|| fucntion the name that is given to the callback || the callback that will be used
- function
callback
if name is given as a string this will be the callback used
Usage:
-
names
-
Sub set to Manger.event and acts as a coverter between event_name and event_id
See also:
Usage:
Manager.event[event_name]