- Weird LuaCs Settings Menu bug present: package is loaded on startup but is then unloaded if the settingsmenu is opened and the package is not in the enabled list.
This commit is contained in:
@@ -65,7 +65,7 @@ public class SettingEntry<T> : SettingBase, ISettingBase<T>, INetworkSyncVar whe
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
OnValueChanged?.Invoke(this);
|
||||
#if CLIENT
|
||||
if (GameMain.IsMultiplayer && SyncType is NetSync.ClientOneWay or NetSync.TwoWay)
|
||||
{
|
||||
@@ -96,6 +96,11 @@ public class SettingEntry<T> : SettingBase, ISettingBase<T>, INetworkSyncVar whe
|
||||
return true;
|
||||
}
|
||||
|
||||
protected override void OnDispose()
|
||||
{
|
||||
ValueChangePredicate = null;
|
||||
}
|
||||
|
||||
public override Type GetValueType() => typeof(T);
|
||||
|
||||
public override string GetStringValue() => Value.ToString();
|
||||
@@ -135,6 +140,8 @@ public class SettingEntry<T> : SettingBase, ISettingBase<T>, INetworkSyncVar whe
|
||||
return !isFailed && TrySetValue(typeConvertedValue);
|
||||
}
|
||||
|
||||
public override event Action<ISettingBase> OnValueChanged;
|
||||
|
||||
public override OneOf<string, XElement> GetSerializableValue() => Value.ToString();
|
||||
|
||||
// -- Networking
|
||||
|
||||
Reference in New Issue
Block a user