Some mods may be broken due to the recent Alloyed Collective update.
ConfigurationReplicator
Updated 2 years agoXan.ROR2VoidPlayerCharacterCommon.AdvancedConfigs.Networked.ConfigurationReplicator
This class is responsible for dispatching networked updates to configuration values. Most of its members are internal, and it does not need to be explicitly used by the API user in most cases as it is automatic.
Public Methods
static ConfigurationReplicator CreateReplicator(string modId, Type configurationType)
Constructs a new instance of ConfigurationReplicator for the provided mod ID, using the provided type as the class storing instances of ReplicatedConfigEntry.
This raises an exception in the following cases:
ArgumentNullException- IfmodIdorconfigurationTypeis null.ArgumentException- IfmodIdis null, empty, or whitespace, or ifconfigurationTypeis not aclass, or ifconfigurationTypeis not (effectively) sealed (sealed classorstatic class), or ifconfigurationTypeis generic.InvalidOperationException- If, during collection of the replicated fields, a member decorated with[ReplicatedConfiguration]is not an instance ofReplicatedConfigEntryBaseorIReplicatedConfigContainer.
bool TrySendChanges(SettingChangedEventArgs e)
Attempts to send the changes made to the provided configuration entry (denoted by e) across the network. This does nothing if the network server is not active (meaning this player is in multiplayer and is not the host). It will attempt to send only the config value in e, but may send all configs if the registry of what options need to replicate is malformed, in which case a warning will be raised and the implementer should ensure everything in their code is correct.