Terminal Base
Some terminals may expose more functions, this is the required functions for all terminals. A terminal modulescript should return a function that takes the wrapper and returns a table:
{
terminal = terminal, -- The terminal instance
metadata = metadata, -- The terminal metadata, table with: name:string, description:string, author:string, version:string compatibility:string
libraries = {}, -- A list of ModuleScripts containing libraries used by the terminal that will be placed in ReplicatedStorage > Libraries
}
Functions
Lock
terminal:Lock()
Locks the terminall
Unlock
terminal:Unlock()
Unlocks the terminal
Reset
terminal:Reset()
Resets the terminal to its initial state.
AddProgress
terminal:AddProgress(team: "attackers" | "defenders", progress: number)
Adds progress to a team.
UpdateConfig
terminal:UpdateConfig(config: table, player: Player?)
Updates the terminal configuration with the provided partial config table. If a player is provided, the action will be logged as performed by that player.
Tick
terminal:Tick(tickRate: number)
Advances the terminal state by the provided tick rate in ticks per second.
updatePersistantConfig
terminal:updatePersistantConfig()
Updates the persistant config instance located at ReplicatedStorage.OmegasTerminalConfig_Persistant with the terminal_config attribute.
Properties
timeLeft
terminal.timeLeft : number
The time left in seconds before the terminal ends, updated by the core each tick.
config
terminal.config : table
The current terminal configuration table.
terminalId
terminal.terminalId : string
An identifier for the terminal type.
persistantConfigObject
terminal.persistantConfigObject : Instance
The persistant config instance located at ReplicatedStorage.OmegasTerminalConfig_Persistant.
components
terminal.components : table
A table containing all components used by the terminal, initially loaded from the DefaultComponents modulescript.
Events
startEvent
terminal.events.startEvent : BindableEvent
Fired when the terminal starts.
stopEvent
terminal.events.stopEvent : BindableEvent
Fired when the terminal stops.
partialUpdate
terminal.events.partialUpdate : BindableEvent
Fired when the terminal internal state is modified, firing this event will cause the core to send a replication packet