diff --git a/Assets/Scripts/SS3D/Permissions/PermissionSettings.cs b/Assets/Scripts/SS3D/Permissions/PermissionSettings.cs
index 20d885520c..cb1ea3536b 100644
--- a/Assets/Scripts/SS3D/Permissions/PermissionSettings.cs
+++ b/Assets/Scripts/SS3D/Permissions/PermissionSettings.cs
@@ -3,12 +3,18 @@
namespace SS3D.Permissions
{
+ ///
+ /// This settings has general options for the permission system, so if we add a database/SQL/API support we can set stuff here.
+ ///
[ProjectSettings("SS3D/Server")]
public class PermissionSettings : ScriptableSettings
{
[SerializeField]
private bool _addServerOwnerPermissionToServerHost;
+ ///
+ /// We can define if the host will get the owner permission when he joins the game.
+ ///
public static bool AddServerOwnerPermissionToServerHost => GetOrFind()._addServerOwnerPermissionToServerHost;
}
}
\ No newline at end of file
diff --git a/Assets/Scripts/SS3D/Permissions/PermissionSystem.cs b/Assets/Scripts/SS3D/Permissions/PermissionSystem.cs
index c456b12b60..7e45296949 100644
--- a/Assets/Scripts/SS3D/Permissions/PermissionSystem.cs
+++ b/Assets/Scripts/SS3D/Permissions/PermissionSystem.cs
@@ -102,6 +102,9 @@ public void ChangeUserPermission(string ckey, ServerRoleTypes role)
SaveUserPermissions();
}
+ ///
+ /// Saves the permissions text file with the updated permissions list.
+ ///
public void SaveUserPermissions()
{
string fileContent = string.Empty;
@@ -180,6 +183,12 @@ private void SyncHandleUserPermissionsChanged(SyncDictionaryOperation op, string
SyncUserPermissions();
}
+ ///
+ /// Returns if the user is at least at a level of access.
+ ///
+ /// The user to check permission for
+ /// The lowest required permission to perform the action.
+ ///
public bool IsAtLeast(string ckey, ServerRoleTypes permissionLevelCheck)
{
TryGetUserRole(ckey, out ServerRoleTypes userPermission);
diff --git a/Assets/Scripts/SS3D/Systems/IngameConsoleSystem/Commands/ItemCommands/SpawnItemCommand.cs b/Assets/Scripts/SS3D/Systems/IngameConsoleSystem/Commands/ItemCommands/SpawnItemCommand.cs
index 46f9428dea..19f814e279 100644
--- a/Assets/Scripts/SS3D/Systems/IngameConsoleSystem/Commands/ItemCommands/SpawnItemCommand.cs
+++ b/Assets/Scripts/SS3D/Systems/IngameConsoleSystem/Commands/ItemCommands/SpawnItemCommand.cs
@@ -1,22 +1,14 @@
-using SS3D.Core;
-using SS3D.Systems.Entities;
-using SS3D.Systems.Permissions;
-using SS3D.Systems.PlayerControl;
-using SS3D.Systems;
+using FishNet.Connection;
+using SS3D.Core;
using SS3D.Data;
-using SS3D.Data.AssetDatabases;
using SS3D.Data.Enums;
+using SS3D.Permissions;
+using SS3D.Systems.Entities;
using SS3D.Systems.Inventory.Items;
using SS3D.Utils;
-using SS3D.Core.Settings;
using UnityEngine;
-using UnityEngine.UIElements;
-using FishNet.Managing.Server;
-using FishNet;
-using FishNet.Connection;
-using UnityEngine.InputSystem;
-namespace SS3D.Systems.IngameConsoleSystem.Commands
+namespace SS3D.Systems.IngameConsoleSystem.Commands.ItemCommands
{
public class SpawnItemCommand : Command
{
diff --git a/Assets/Scripts/SS3D/Systems/IngameConsoleSystem/Commands/RagdollCommand.cs b/Assets/Scripts/SS3D/Systems/IngameConsoleSystem/Commands/RagdollCommand.cs
index bb06b1b964..ad7d73c8b9 100644
--- a/Assets/Scripts/SS3D/Systems/IngameConsoleSystem/Commands/RagdollCommand.cs
+++ b/Assets/Scripts/SS3D/Systems/IngameConsoleSystem/Commands/RagdollCommand.cs
@@ -1,12 +1,11 @@
using FishNet.Connection;
using FishNet.Object;
using SS3D.Core;
+using SS3D.Permissions;
using SS3D.Systems.Entities;
using SS3D.Systems.Entities.Humanoid;
-using SS3D.Systems.Permissions;
using SS3D.Systems.PlayerControl;
using System.Globalization;
-using UnityEngine;
namespace SS3D.Systems.IngameConsoleSystem.Commands
{
diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset
index bae922e776..cc31bdf4ab 100644
--- a/ProjectSettings/ProjectSettings.asset
+++ b/ProjectSettings/ProjectSettings.asset
@@ -143,6 +143,7 @@ PlayerSettings:
- {fileID: 11400000, guid: 3c59f55e6898e694083e7a1ede49fe18, type: 2}
- {fileID: 11400000, guid: 2024dd0c65f45424f98ac0c8a6979181, type: 2}
- {fileID: 11400000, guid: 97967903e9bd51b499aaa39639cc9bb2, type: 2}
+ - {fileID: 11400000, guid: c15209f668bbfab479eb5184981c2bf7, type: 2}
metroInputSource: 0
wsaTransparentSwapchain: 0
m_HolographicPauseOnTrackingLoss: 1