-
Notifications
You must be signed in to change notification settings - Fork 8
API
The SynapseController is the main Object which contains almost the entire Synapse Api.
It Contains 3 static Objects:
Namespace: Synapse
This Object contains the API to interact with many Features of Scp:SL.
You can get it with SynapseController.Server
or with Server.Get
(the second is the same so it is just a shortcut)
The fields it contains
- Logger
- Map
- Files
- Events
- RoleManager
- ItemManager
- Configs
- PermissionHandler
- Host => The Player Object of the Server
- Port => The Port the Server is running on
- Name => The ServerName
- FF => FriendlyFire
- Players => Gives you a List of all Players on the Server
- ServerConsole => Gives you the Server Console Object (Vanilla Objects not recommended to use)
- GameConsole => Gives you the Game Console Object (Vanilla Objects not recommended to use)
The Methods it contains
- Reload() => Reloads all Synapse Features
-
GetObjectsOf<TObject>
() => Gives you all Unity Objects of that type -
GetObjectOf<TObject>
() => Gives you the first Object of that type the Server can find - GetPlayers(Func<Player,bool>) => Gives you a list of Players with special requirements(Example: GetPlayers(x => x.NickName == "Dimenzio") => Gives you all Players which name is Dimenzio)
- GetPlayer(string) => Gives you the Player with that userid/playerid/nickname
- GetPlayer(int playerid) => Gives you the Player with that playerid
Namespace: Synapse.Api
This Object contains Methods to send Messages in the Server Console
You can get it with SynapseController.Server.Logger
or with Logger.Get
(the second is the same so it is just a shortcut)
- Info(string) => Sends an Information in the Console
- Warn(string) => Sends an Warn in the Console
- Error(string) => Sends an Error in the Console
- Send(string,ConsoleColor) => Sends a Message with a defined color in the Console (Plugin name will not be added).
Namespace: Synapse.Api
You can get it with SynapseController.Server.Map
or Map.Get
(the second is the same so it is just a shortcut)
This Object contains the fields:
- Nuke
- Round
- Decontamination
- Scp914
- Teslas => A List of all Tesla objects on the Server
- Elevators => A List of all Elevator objects on the Server
- Doors => A List of all Door objects on the Server
- Rooms => A List of all Room objects on the Server
- Generators => A List of all Generator objects on the Server
- WorkStations => A List of all WorkStation objects on the Server
- Ragdolls => A List of all Ragdoll objects on the Server
- Items => A List of all SynapseItem objects on the Server.
- IntercomText => The text which will be displayed in the intercom
- Seed => The current Map Seed
This Methods contains it:
- CreateDummy() => Creates a Dummy object
- CreateWorkStation() => Creates a Workstation object
- SendBroadcast() => Sends to all Players a Broadcast
- AnnounceScpDeath() => Announces the Death of an scp
- Cassie() => Sends an Cassie Message
- GlitchedCassie() => Sends an glitchy Cassie message
Namespace: Synapse.Api
You can get it with SynapseController.Server.Map.Nuke
or Map.Get.Nuke
(the second is the same so it is just a shortcut)
This fields contains it:
- WarheadController => Vanilla Object for the AlphaWarheadController
- InsidePanel
- OutsidePanel
- CountdownTime => The Current Countdown of the Warhead
- NukeKills => Amount of Players killed by the Nuke
- Active => If the Nuke is currently active
- Detonated => If the Nuke is already detonated
- CanDetonate => If the Nuke can still detonate
The methods it contains:
- StartDetonation() => Stars the Detonation
- CancelDetonation() => Cancel the Detonation
- Detonate() => Detonated the Warhead
- InstantPrepare() => Prepares the Nuke to detonate instant
- Shake() => Shakes the screen of all Players
Namespace: Synapse.Api(.Nuke)
You can get it with SynapseController.Server.Map.Nuke.InsidePanel
or Map.Get.Nuke.InsidePanel
(the second is the same so it is just a shortcut)
This Object should represent the AlphaWarhead Panel inside the Facility.
The fields it contains:
- Panel => The Vanilla object for the NukesitePanel
- Enabled => The state of the activation of the panel
- LeverStatus => The current status of the lever
- Locked => If set to true the lever status cant be set
- Lever => the transform of the Lever
Namespace: Synapse.Api(.Nuke)
You can get it with SynapseController.Server.Map.Nuke.OutsidePanel
or Map.Get.Nuke.OutsidePanel
(the second is the same so it is just a shortcut)
This Object should represent the AlphaWarhead Panel outside the Facility.
The fields it contains:
- Panel => The Vanilla object for the OutsidePanel
- KeyCardEntered => If a Keycard is already entered and the Nuke can be activated
Namespace: Synapse.Api
You can get it with SynapseController.Server.Map.Round
or Map.Get.Round
(the second is the same so it is just a shortcut)
The Fields it contains:
- CurrentRound => The current Round played since the server started
- LobbyLock => get/set the lobbylock
- RoundLock => get/set the roundlock
- RoundLength => The timespan the round is already active
- RoundIsActive => If the Round is active
- RoundEnded => If the Round ended
The Method it contains:
- StartRound() => Starts the Round
- EndRound() => Ends the Round
- RestartRound() => Restarts the Round
- DimScreens() => Make the Screens from all Players black
- ShowRoundSummary() => Shows the RoundSummary
- MtfRespawn() => Respawns a Mtf/Chaos
Namespace: Synapse.Api
You can get it with SynapseController.Server.Map.Decontamination
or Map.Get.Decontamination
(the second is the same so it is just a shortcut)
The Fields it contains:
- Controller => The Vanilla object which controls the decontamination
- DisableDecontamination => If the Decontamination should be disabled
- IsDecontaminationInProgress => If the Decontamination is in Progress
The Methods it contains:
- InstantStart() => Starts the Decontamination
Namespace: Synapse.Api.Plugin
You can get it with SynapseController.PluginLoader
.
It has many methods and field which can only accesed by Snypase.
Fields:
- Plugins => Gives you a List of PluginInformation about Plugins that are installed
Namespace; Synapse.Command
You can get it with SynapseController.CommandHandlers
.
Fields:
- RemoteAdminHandler => CommandHandler object for the remote admin console.
- ClientCommandHandler => CommandHandler object for the client console.
- ServerConsoleHandler => CommandHandler object for the server console.