1- using System . IO ;
1+ using System . IO ;
22
33namespace MLAPI . NetworkedVar
44{
5-
65 /// <summary>
76 /// Interface for networked value containers
87 /// </summary>
@@ -61,74 +60,4 @@ public interface INetworkedVar
6160 /// <param name="behaviour">The behaviour the container behaves to</param>
6261 void SetNetworkedBehaviour ( NetworkedBehaviour behaviour ) ;
6362 }
64-
65- /// <summary>
66- /// The settings class used by the build in NetworkVar implementations
67- /// </summary>
68- public class NetworkedVarSettings
69- {
70- /// <summary>
71- /// Defines the read permissions for this var
72- /// </summary>
73- public NetworkedVarPermission WritePermission = NetworkedVarPermission . ServerOnly ;
74- /// <summary>
75- /// Defines the write permissions for this var
76- /// </summary>
77- public NetworkedVarPermission ReadPermission = NetworkedVarPermission . Everyone ;
78- /// <summary>
79- /// The delegate used to evaluate write permission when the "Custom" mode is used
80- /// </summary>
81- public NetworkedVarPermissionsDelegate WritePermissionCallback = null ;
82- /// <summary>
83- /// The delegate used to evaluate read permission when the "Custom" mode is used
84- /// </summary>
85- public NetworkedVarPermissionsDelegate ReadPermissionCallback = null ;
86- /// <summary>
87- /// The maximum times per second this var will be synced.
88- /// Less than or equal to 0 will cause the variable to sync as soon as possible after being changed.
89- /// </summary>
90- public float SendTickrate = 0 ;
91- /// <summary>
92- /// The name of the channel to use for this variable.
93- /// Variables with different channels will be split into different packets
94- /// </summary>
95- public string SendChannel = "MLAPI_INTERNAL" ;
96-
97- /// <summary>
98- /// Constructs a new NetworkedVarSettings instance
99- /// </summary>
100- public NetworkedVarSettings ( )
101- {
102-
103- }
104- }
105-
106- /// <summary>
107- /// Delegate type for permission checking
108- /// </summary>
109- /// <param name="clientId">The clientId whose permissions to check</param>
110- public delegate bool NetworkedVarPermissionsDelegate ( ulong clientId ) ;
111-
112- /// <summary>
113- /// Permission type
114- /// </summary>
115- public enum NetworkedVarPermission
116- {
117- /// <summary>
118- /// Everyone
119- /// </summary>
120- Everyone ,
121- /// <summary>
122- /// Server-only operation
123- /// </summary>
124- ServerOnly ,
125- /// <summary>
126- /// Owner-ownly
127- /// </summary>
128- OwnerOnly ,
129- /// <summary>
130- /// Custom delegate
131- /// </summary>
132- Custom
133- }
134- }
63+ }
0 commit comments