sm.scrapcomputers
All data inside the sm.scrapcomputers
namespace!
You don't have to load this at all, The sm
table is globably shared across mods, this means once its loaded. you can access it in any mod, even if you didnt load it.
It's suggested to still load the config file in the AutoTool scripts so it can load as soon as possible as Scrap Mechanic loads the mods from newest to oldest.
Variables
sm.scrapcomputers.backend
A table relating to special backend activities that need to happen between components
sm.scrapcomputers.backend = {}
sm.scrapcomputers.dataList
Contains all functions, data (or whatever). Eg: Displays is a list of all displays in ScrapComputers.
sm.scrapcomputers.dataList = {
["Displays"] = {},
["Harddrives"] = {},
["Holograms"] = {},
["Terminals"] = {},
["Radars"] = {},
["InputRegisters"] = {},
["OutputRegisters"] = {},
["NetworkPorts"] = {},
["Antennas"] = {},
["Cameras"] = {},
["Speakers"] = {},
["Keyboards"] = {},
["Motors"] = {},
["Lasers"] = {},
["GPSs"] = {},
["SeatControllers"] = {},
["NetworkInterfaces"] = {}
}
sm.scrapcomputers.layoutFiles
Paths to layout files
sm.scrapcomputers.layoutFiles = {
Computer = "$CONTENT_3660881a-a6b8-40e5-a348-27b368a742e9/Gui/Layout/Computer.layout",
Terminal = "$CONTENT_3660881a-a6b8-40e5-a348-27b368a742e9/Gui/Layout/Terminal.layout",
Register = "$CONTENT_3660881a-a6b8-40e5-a348-27b368a742e9/Gui/Layout/Register.layout",
Configurator = "$CONTENT_3660881a-a6b8-40e5-a348-27b368a742e9/Gui/Layout/Configurator.layout",
Harddrive = "$CONTENT_3660881a-a6b8-40e5-a348-27b368a742e9/Gui/Layout/Harddrive.layout",
Keyboard = "$CONTENT_3660881a-a6b8-40e5-a348-27b368a742e9/Gui/Layout/Keyboard.layout",
Banned = "$CONTENT_3660881a-a6b8-40e5-a348-27b368a742e9/Gui/Layout/Banned.layout",
}
sm.scrapcomputers.jsonFiles
Paths to json files
sm.scrapcomputers.jsonFiles = {
ExamplesList = "$CONTENT_3660881a-a6b8-40e5-a348-27b368a742e9/JSON/examples.json",
HarddriveExamples = "$CONTENT_3660881a-a6b8-40e5-a348-27b368a742e9/JSON/hdd_examples.json",
AudioList = "$CONTENT_3660881a-a6b8-40e5-a348-27b368a742e9/JSON/audio.json",
BuiltInFonts = "$CONTENT_3660881a-a6b8-40e5-a348-27b368a742e9/JSON/fonts.json"
}
sm.scrapcomputers.privateDataPrefix
Prefix used to hide variables and tables inside component's computer api. If you put any variable or function in a compoonent that starts with this, it will not show in the computer api, BUT you can stil access it via getComponents ASLONG if getPrivateData is true
sm.scrapcomputers.privateDataPrefix = "SC_PRIVATE_"
Functions
toString
sm.scrapcomputers.toString(value)
Converts a value to a string, Better than lua's tostring
Arguments:
- value [ any ] the value to convert
Returns:
- [ string ] The converted value as a string