lc-sigurd / sigurd

Sigurd, the Lethal Company Library.
GNU Lesser General Public License v3.0
3 stars 1 forks source link

Network-synced BepInEx config #9

Open Lordfirespeed opened 7 months ago

Lordfirespeed commented 7 months ago

API surface

provide a SyncedConfigEntry type + extension methods for mod developers to bind their config entries with, declaring which entries should be synced from host to clients.

Implementation

Use SigurdLib.Networking messages to

  1. send a 'config manifest' to clients on connect
  2. Send 'config changes' throughout play in case an in game config editor is used

The SyncedConfigEntry class should not overwrite the .Value member and should instead have an additional .SyncedValue member. This is because the ConfigFile class reads the .Value member when serializing (saving) the config entry to the filesystem.