ServerMod / Smod2

SCP:SL ServerMod2
https://discord.gg/8nvmMTr
MIT License
68 stars 30 forks source link

Modifying the server config through plugins #85

Closed lewisakura closed 5 years ago

lewisakura commented 5 years ago

Was trying to figure out a way to do this to no avail, currently really tempted to just modify the actual config file. Before I do this, is there any way possible to do it through code, and if not, can it be added? I'm writing a gamemode that changes the nuke timer and LCZ decontamination timer but I can't figure out a way to do it without editing the config.

Grover-c13 commented 5 years ago

We dont currently have a public API for this.

but you could this in theory:

Add a reference to Assembly-csharp.dll to your plugin and try this:

((ConfigFile) ConfigManager.Manager.Config).SetValue(key, value)