@@ -9,12 +9,18 @@ internal struct SyncedEntryDelta : INetworkSerializable, IEquatable<SyncedEntryD
99 public SyncedConfigDefinition Definition ;
1010 public FixedString128Bytes ConfigFileRelativePath ;
1111 public FixedString512Bytes SerializedValue ;
12+ public bool SyncEnabled ;
1213
13- public SyncedEntryDelta ( FixedString128Bytes configFileRelativePath , SyncedConfigDefinition definition , FixedString512Bytes serializedValue )
14- {
14+ public SyncedEntryDelta (
15+ FixedString128Bytes configFileRelativePath ,
16+ SyncedConfigDefinition definition ,
17+ FixedString512Bytes serializedValue ,
18+ bool syncEnabled
19+ ) {
1520 ConfigFileRelativePath = configFileRelativePath ;
1621 Definition = definition ;
1722 SerializedValue = serializedValue ;
23+ SyncEnabled = syncEnabled ;
1824 }
1925
2026 public void NetworkSerialize < T > ( BufferSerializer < T > serializer ) where T : IReaderWriter
@@ -26,6 +32,7 @@ public void NetworkSerialize<T>(BufferSerializer<T> serializer) where T : IReade
2632 var reader = serializer . GetFastBufferReader ( ) ;
2733 reader . ReadValueSafe ( out ConfigFileRelativePath ) ;
2834 reader . ReadValueSafe ( out SerializedValue ) ;
35+ reader . ReadValueSafe ( out SyncEnabled ) ;
2936 }
3037 else
3138 {
@@ -34,12 +41,17 @@ public void NetworkSerialize<T>(BufferSerializer<T> serializer) where T : IReade
3441 var writer = serializer . GetFastBufferWriter ( ) ;
3542 writer . WriteValueSafe ( ConfigFileRelativePath ) ;
3643 writer . WriteValueSafe ( SerializedValue ) ;
44+ writer . WriteValue ( SyncEnabled ) ;
3745 }
3846 }
3947
4048 public bool Equals ( SyncedEntryDelta other )
4149 {
42- return Definition . Equals ( other . Definition ) && ConfigFileRelativePath . Equals ( other . ConfigFileRelativePath ) && SerializedValue . Equals ( other . SerializedValue ) ;
50+ if ( ! Definition . Equals ( other . Definition ) ) return false ;
51+ if ( ! ConfigFileRelativePath . Equals ( other . ConfigFileRelativePath ) ) return false ;
52+ if ( ! SerializedValue . Equals ( other . SerializedValue ) ) return false ;
53+ if ( ! SyncEnabled . Equals ( other . SyncEnabled ) ) return false ;
54+ return true ;
4355 }
4456
4557 public override bool Equals ( object ? obj )
@@ -49,12 +61,9 @@ public override bool Equals(object? obj)
4961
5062 public override int GetHashCode ( )
5163 {
52- return HashCode . Combine ( Definition , ConfigFileRelativePath , SerializedValue ) ;
64+ return HashCode . Combine ( Definition , ConfigFileRelativePath , SerializedValue , SyncEnabled ) ;
5365 }
5466
55- public ( string ConfigFileRelativePath , SyncedConfigDefinition Definition ) SyncedEntryIdentifier {
56- get {
57- return ( ConfigFileRelativePath . Value , Definition ) ;
58- }
59- }
67+ public ( string ConfigFileRelativePath , SyncedConfigDefinition Definition ) SyncedEntryIdentifier
68+ => ( ConfigFileRelativePath . Value , Definition ) ;
6069}
0 commit comments