diff --git a/OrreryFrameworkDemo/Data/Scripts/OrreryFrameworkDemo/Communication/DefinitionCollector.cs b/OrreryFrameworkDemo/Data/Scripts/OrreryCombatFramework/Communication/DefinitionCollector.cs similarity index 86% rename from OrreryFrameworkDemo/Data/Scripts/OrreryFrameworkDemo/Communication/DefinitionCollector.cs rename to OrreryFrameworkDemo/Data/Scripts/OrreryCombatFramework/Communication/DefinitionCollector.cs index 81f994c3..f3bc52de 100644 --- a/OrreryFrameworkDemo/Data/Scripts/OrreryFrameworkDemo/Communication/DefinitionCollector.cs +++ b/OrreryFrameworkDemo/Data/Scripts/OrreryCombatFramework/Communication/DefinitionCollector.cs @@ -1,10 +1,10 @@ -using OrreryFrameworkDemo.Data.Scripts.OrreryFrameworkDemo.Communication.ProjectileBases; -using OrreryFrameworkDemo.Data.Scripts.OrreryFrameworkDemo.Communication.WeaponBases; +using OrreryFramework.Communication.ProjectileBases; +using OrreryFramework.Communication.WeaponBases; using ProtoBuf; using Sandbox.ModAPI; using System.Collections.Generic; -namespace OrreryFrameworkDemo.Data.Scripts.OrreryFrameworkDemo.Communication +namespace OrreryFramework.Communication { partial class HeartDefinitions { diff --git a/OrreryFrameworkDemo/Data/Scripts/OrreryFrameworkDemo/Communication/DefinitionSender.cs b/OrreryFrameworkDemo/Data/Scripts/OrreryCombatFramework/Communication/DefinitionSender.cs similarity index 96% rename from OrreryFrameworkDemo/Data/Scripts/OrreryFrameworkDemo/Communication/DefinitionSender.cs rename to OrreryFrameworkDemo/Data/Scripts/OrreryCombatFramework/Communication/DefinitionSender.cs index 29deb210..b06f68b6 100644 --- a/OrreryFrameworkDemo/Data/Scripts/OrreryFrameworkDemo/Communication/DefinitionSender.cs +++ b/OrreryFrameworkDemo/Data/Scripts/OrreryCombatFramework/Communication/DefinitionSender.cs @@ -4,7 +4,7 @@ using VRage.Game.Components; using VRage.Utils; -namespace OrreryFrameworkDemo.Data.Scripts.OrreryFrameworkDemo.Communication +namespace OrreryFramework.Communication { [MySessionComponentDescriptor(MyUpdateOrder.BeforeSimulation, Priority = int.MaxValue)] internal class DefinitionSender : MySessionComponentBase diff --git a/OrreryFrameworkDemo/Data/Scripts/OrreryFrameworkDemo/Communication/HeartApi.cs b/OrreryFrameworkDemo/Data/Scripts/OrreryCombatFramework/Communication/HeartApi.cs similarity index 97% rename from OrreryFrameworkDemo/Data/Scripts/OrreryFrameworkDemo/Communication/HeartApi.cs rename to OrreryFrameworkDemo/Data/Scripts/OrreryCombatFramework/Communication/HeartApi.cs index cf901f12..e732b250 100644 --- a/OrreryFrameworkDemo/Data/Scripts/OrreryFrameworkDemo/Communication/HeartApi.cs +++ b/OrreryFrameworkDemo/Data/Scripts/OrreryCombatFramework/Communication/HeartApi.cs @@ -1,6 +1,6 @@ using Heart_Module.Data.Scripts.HeartModule.Projectiles.StandardClasses; -using OrreryFrameworkDemo.Data.Scripts.OrreryFrameworkDemo.Communication.ProjectileBases; -using OrreryFrameworkDemo.Data.Scripts.OrreryFrameworkDemo.Communication.WeaponBases; +using OrreryFramework.Communication.ProjectileBases; +using OrreryFramework.Communication.WeaponBases; using Sandbox.ModAPI; using System; using System.Collections.Generic; @@ -9,7 +9,7 @@ using VRage.Utils; using VRageMath; -namespace OrreryFrameworkDemo.Data.Scripts.OrreryFrameworkDemo.Communication +namespace OrreryFramework.Communication { public class HeartApi { diff --git a/OrreryFrameworkDemo/Data/Scripts/OrreryFrameworkDemo/Communication/ProjectileBases/ProjectileDefinitionBase.cs b/OrreryFrameworkDemo/Data/Scripts/OrreryCombatFramework/Communication/ProjectileBases/ProjectileDefinitionBase.cs similarity index 98% rename from OrreryFrameworkDemo/Data/Scripts/OrreryFrameworkDemo/Communication/ProjectileBases/ProjectileDefinitionBase.cs rename to OrreryFrameworkDemo/Data/Scripts/OrreryCombatFramework/Communication/ProjectileBases/ProjectileDefinitionBase.cs index fda04857..e91bb032 100644 --- a/OrreryFrameworkDemo/Data/Scripts/OrreryFrameworkDemo/Communication/ProjectileBases/ProjectileDefinitionBase.cs +++ b/OrreryFrameworkDemo/Data/Scripts/OrreryCombatFramework/Communication/ProjectileBases/ProjectileDefinitionBase.cs @@ -7,7 +7,7 @@ using VRage.Utils; using VRageMath; -namespace OrreryFrameworkDemo.Data.Scripts.OrreryFrameworkDemo.Communication.ProjectileBases +namespace OrreryFramework.Communication.ProjectileBases { /// /// Standard serializable projectile definition. diff --git a/OrreryFrameworkDemo/Data/Scripts/OrreryFrameworkDemo/Communication/ProjectileBases/n_SerializableProjectile.cs b/OrreryFrameworkDemo/Data/Scripts/OrreryCombatFramework/Communication/ProjectileBases/n_SerializableProjectile.cs similarity index 100% rename from OrreryFrameworkDemo/Data/Scripts/OrreryFrameworkDemo/Communication/ProjectileBases/n_SerializableProjectile.cs rename to OrreryFrameworkDemo/Data/Scripts/OrreryCombatFramework/Communication/ProjectileBases/n_SerializableProjectile.cs diff --git a/OrreryFrameworkDemo/Data/Scripts/OrreryFrameworkDemo/Communication/TargetingEnums.cs b/OrreryFrameworkDemo/Data/Scripts/OrreryCombatFramework/Communication/TargetingEnums.cs similarity index 82% rename from OrreryFrameworkDemo/Data/Scripts/OrreryFrameworkDemo/Communication/TargetingEnums.cs rename to OrreryFrameworkDemo/Data/Scripts/OrreryCombatFramework/Communication/TargetingEnums.cs index 18671f85..dc4dd3fc 100644 --- a/OrreryFrameworkDemo/Data/Scripts/OrreryFrameworkDemo/Communication/TargetingEnums.cs +++ b/OrreryFrameworkDemo/Data/Scripts/OrreryCombatFramework/Communication/TargetingEnums.cs @@ -1,4 +1,4 @@ -namespace OrreryFrameworkDemo.Data.Scripts.OrreryFrameworkDemo.Communication +namespace OrreryFramework.Communication { public enum IFF_Enum { diff --git a/OrreryFrameworkDemo/Data/Scripts/OrreryFrameworkDemo/Communication/WeaponBases/WeaponDefinitionBase.cs b/OrreryFrameworkDemo/Data/Scripts/OrreryCombatFramework/Communication/WeaponBases/WeaponDefinitionBase.cs similarity index 98% rename from OrreryFrameworkDemo/Data/Scripts/OrreryFrameworkDemo/Communication/WeaponBases/WeaponDefinitionBase.cs rename to OrreryFrameworkDemo/Data/Scripts/OrreryCombatFramework/Communication/WeaponBases/WeaponDefinitionBase.cs index ec758fdb..d8916eaa 100644 --- a/OrreryFrameworkDemo/Data/Scripts/OrreryFrameworkDemo/Communication/WeaponBases/WeaponDefinitionBase.cs +++ b/OrreryFrameworkDemo/Data/Scripts/OrreryCombatFramework/Communication/WeaponBases/WeaponDefinitionBase.cs @@ -1,7 +1,7 @@ using ProtoBuf; using System; -namespace OrreryFrameworkDemo.Data.Scripts.OrreryFrameworkDemo.Communication.WeaponBases +namespace OrreryFramework.Communication.WeaponBases { /// /// Standard serializable weapon definition. Add onto definition base using the partial modifier. diff --git a/OrreryFrameworkDemo/Data/Scripts/OrreryFrameworkDemo/Example2BarrelTurretWeapon.cs b/OrreryFrameworkDemo/Data/Scripts/OrreryCombatFramework/Example2BarrelTurretWeapon.cs similarity index 94% rename from OrreryFrameworkDemo/Data/Scripts/OrreryFrameworkDemo/Example2BarrelTurretWeapon.cs rename to OrreryFrameworkDemo/Data/Scripts/OrreryCombatFramework/Example2BarrelTurretWeapon.cs index 45c19965..21dc72f7 100644 --- a/OrreryFrameworkDemo/Data/Scripts/OrreryFrameworkDemo/Example2BarrelTurretWeapon.cs +++ b/OrreryFrameworkDemo/Data/Scripts/OrreryCombatFramework/Example2BarrelTurretWeapon.cs @@ -1,7 +1,7 @@ -using OrreryFrameworkDemo.Data.Scripts.OrreryFrameworkDemo.Communication.WeaponBases; +using OrreryFramework.Communication.WeaponBases; using System; -namespace OrreryFrameworkDemo.Data.Scripts.OrreryFrameworkDemo.Communication +namespace OrreryFramework.Communication { partial class HeartDefinitions { diff --git a/OrreryFrameworkDemo/Data/Scripts/OrreryFrameworkDemo/ExampleAmmos.cs b/OrreryFrameworkDemo/Data/Scripts/OrreryCombatFramework/ExampleAmmos.cs similarity index 99% rename from OrreryFrameworkDemo/Data/Scripts/OrreryFrameworkDemo/ExampleAmmos.cs rename to OrreryFrameworkDemo/Data/Scripts/OrreryCombatFramework/ExampleAmmos.cs index 4e0d4095..a8e1bedd 100644 --- a/OrreryFrameworkDemo/Data/Scripts/OrreryFrameworkDemo/ExampleAmmos.cs +++ b/OrreryFrameworkDemo/Data/Scripts/OrreryCombatFramework/ExampleAmmos.cs @@ -1,6 +1,6 @@ using EmptyKeys.UserInterface.Generated.StoreBlockView_Bindings; using Heart_Module.Data.Scripts.HeartModule.Projectiles.StandardClasses; -using OrreryFrameworkDemo.Data.Scripts.OrreryFrameworkDemo.Communication.ProjectileBases; +using OrreryFramework.Communication.ProjectileBases; using Sandbox.Game; using Sandbox.ModAPI; using System; @@ -10,7 +10,7 @@ using VRage.Utils; using VRageMath; -namespace OrreryFrameworkDemo.Data.Scripts.OrreryFrameworkDemo.Communication +namespace OrreryFramework.Communication { partial class HeartDefinitions { diff --git a/OrreryFrameworkDemo/Data/Scripts/OrreryFrameworkDemo/ExampleFixedBeamWeapon.cs b/OrreryFrameworkDemo/Data/Scripts/OrreryCombatFramework/ExampleFixedBeamWeapon.cs similarity index 93% rename from OrreryFrameworkDemo/Data/Scripts/OrreryFrameworkDemo/ExampleFixedBeamWeapon.cs rename to OrreryFrameworkDemo/Data/Scripts/OrreryCombatFramework/ExampleFixedBeamWeapon.cs index e927d74a..e7d4a975 100644 --- a/OrreryFrameworkDemo/Data/Scripts/OrreryFrameworkDemo/ExampleFixedBeamWeapon.cs +++ b/OrreryFrameworkDemo/Data/Scripts/OrreryCombatFramework/ExampleFixedBeamWeapon.cs @@ -1,7 +1,7 @@ -using OrreryFrameworkDemo.Data.Scripts.OrreryFrameworkDemo.Communication.WeaponBases; +using OrreryFramework.Communication.WeaponBases; using System; -namespace OrreryFrameworkDemo.Data.Scripts.OrreryFrameworkDemo.Communication +namespace OrreryFramework.Communication { partial class HeartDefinitions { diff --git a/OrreryFrameworkDemo/Data/Scripts/OrreryFrameworkDemo/ExampleFixedMissileWeapon.cs b/OrreryFrameworkDemo/Data/Scripts/OrreryCombatFramework/ExampleFixedMissileWeapon.cs similarity index 94% rename from OrreryFrameworkDemo/Data/Scripts/OrreryFrameworkDemo/ExampleFixedMissileWeapon.cs rename to OrreryFrameworkDemo/Data/Scripts/OrreryCombatFramework/ExampleFixedMissileWeapon.cs index dfad0cda..e58acda8 100644 --- a/OrreryFrameworkDemo/Data/Scripts/OrreryFrameworkDemo/ExampleFixedMissileWeapon.cs +++ b/OrreryFrameworkDemo/Data/Scripts/OrreryCombatFramework/ExampleFixedMissileWeapon.cs @@ -1,7 +1,7 @@ -using OrreryFrameworkDemo.Data.Scripts.OrreryFrameworkDemo.Communication.WeaponBases; +using OrreryFramework.Communication.WeaponBases; using System; -namespace OrreryFrameworkDemo.Data.Scripts.OrreryFrameworkDemo.Communication +namespace OrreryFramework.Communication { partial class HeartDefinitions { diff --git a/OrreryFrameworkDemo/Data/Scripts/OrreryFrameworkDemo/ExampleFixedProjWeapon.cs b/OrreryFrameworkDemo/Data/Scripts/OrreryCombatFramework/ExampleFixedProjWeapon.cs similarity index 94% rename from OrreryFrameworkDemo/Data/Scripts/OrreryFrameworkDemo/ExampleFixedProjWeapon.cs rename to OrreryFrameworkDemo/Data/Scripts/OrreryCombatFramework/ExampleFixedProjWeapon.cs index afb2a59e..d5c4cd24 100644 --- a/OrreryFrameworkDemo/Data/Scripts/OrreryFrameworkDemo/ExampleFixedProjWeapon.cs +++ b/OrreryFrameworkDemo/Data/Scripts/OrreryCombatFramework/ExampleFixedProjWeapon.cs @@ -1,7 +1,7 @@ -using OrreryFrameworkDemo.Data.Scripts.OrreryFrameworkDemo.Communication.WeaponBases; +using OrreryFramework.Communication.WeaponBases; using System; -namespace OrreryFrameworkDemo.Data.Scripts.OrreryFrameworkDemo.Communication +namespace OrreryFramework.Communication { partial class HeartDefinitions { diff --git a/OrreryFrameworkDemo/Data/Scripts/OrreryFrameworkDemo/ExampleTurretWeapon.cs b/OrreryFrameworkDemo/Data/Scripts/OrreryCombatFramework/ExampleTurretWeapon.cs similarity index 93% rename from OrreryFrameworkDemo/Data/Scripts/OrreryFrameworkDemo/ExampleTurretWeapon.cs rename to OrreryFrameworkDemo/Data/Scripts/OrreryCombatFramework/ExampleTurretWeapon.cs index 7d3037ce..4a6b03c4 100644 --- a/OrreryFrameworkDemo/Data/Scripts/OrreryFrameworkDemo/ExampleTurretWeapon.cs +++ b/OrreryFrameworkDemo/Data/Scripts/OrreryCombatFramework/ExampleTurretWeapon.cs @@ -1,7 +1,7 @@ -using OrreryFrameworkDemo.Data.Scripts.OrreryFrameworkDemo.Communication.WeaponBases; +using OrreryFramework.Communication.WeaponBases; using System; -namespace OrreryFrameworkDemo.Data.Scripts.OrreryFrameworkDemo.Communication +namespace OrreryFramework.Communication { partial class HeartDefinitions { diff --git a/OrreryFrameworkDemo/Data/Scripts/OrreryFrameworkDemo/HeartDefinitions.cs b/OrreryFrameworkDemo/Data/Scripts/OrreryCombatFramework/HeartDefinitions.cs similarity index 85% rename from OrreryFrameworkDemo/Data/Scripts/OrreryFrameworkDemo/HeartDefinitions.cs rename to OrreryFrameworkDemo/Data/Scripts/OrreryCombatFramework/HeartDefinitions.cs index 7de0ff75..6da61258 100644 --- a/OrreryFrameworkDemo/Data/Scripts/OrreryFrameworkDemo/HeartDefinitions.cs +++ b/OrreryFrameworkDemo/Data/Scripts/OrreryCombatFramework/HeartDefinitions.cs @@ -1,4 +1,4 @@ -namespace OrreryFrameworkDemo.Data.Scripts.OrreryFrameworkDemo.Communication +namespace OrreryFramework.Communication { partial class HeartDefinitions { diff --git a/remove-semods-symlinks.bat b/remove-semods-symlinks.bat index 53d9b87a..b2b98a85 100644 --- a/remove-semods-symlinks.bat +++ b/remove-semods-symlinks.bat @@ -1,39 +1,71 @@ @echo off setlocal enabledelayedexpansion -:: Check if the script is running with administrative privileges -NET SESSION >NUL 2>&1 -if %ERRORLEVEL% NEQ 0 ( - echo Please run this script as administrator! +REM Check if the script is running as administrator +>nul 2>&1 "%SystemRoot%\system32\cacls.exe" "%SystemRoot%\system32\config\system" +if '%errorlevel%' NEQ '0' ( + echo. + echo ==================================================== + echo This script must be run as an administrator to remove symlinks! + echo Right-click the script and select "Run as administrator". + echo ==================================================== + echo. pause - exit /b 1 + exit /b ) -set "targetDir=%APPDATA%\SpaceEngineers\Mods" -set "desktopDir=%USERPROFILE%\Desktop\SpaceEngineersModsBackup" +REM Define the root Space Engineers mod directory +set modRootDir="%APPDATA%\SpaceEngineers\Mods" -:: Creating desktop directory if it doesn't exist -if not exist "%desktopDir%" ( - mkdir "%desktopDir%" +REM Check if the mod directory exists +if not exist !modRootDir! ( + echo Mod directory does not exist: !modRootDir! + echo Please ensure that the Space Engineers game has created mod directories. + pause + exit /b ) -:: Copying non-symbolic link folders to the desktop -for /d %%i in ("%targetDir%\*") do ( - set "folderName=%%~nxi" - fsutil reparsepoint query "%%i" > nul 2>&1 - if errorlevel 1 ( - robocopy "%%i" "%desktopDir%\!folderName!" /E /NFL /NDL /NJH /NJS /nc /ns /np - ) +REM Change to the mod directory +cd /d "!modRootDir!" + +REM List only symbolic links in the mod directory +echo. +echo Searching for symbolic links in: !modRootDir! +set foundSymlink=false +for /f "tokens=*" %%l in ('dir /AL /B') do ( + set foundSymlink=true + echo Found symlink: %%l +) + +REM Check if any symbolic links were found +if "!foundSymlink!"=="false" ( + echo No symbolic links found in: !modRootDir! + pause + exit /b +) + +REM Prompt the user for confirmation once to delete all symbolic links +set /p confirmDelete="Do you want to delete all symlinks in this directory? [Y/N]: " +if /i "!confirmDelete!" NEQ "Y" ( + echo Operation canceled. No symlinks were removed. + pause + exit /b ) -:: Removing symbolic links from the mod folder -for /d %%i in ("%targetDir%\*") do ( - set "folderName=%%~nxi" - fsutil reparsepoint query "%%i" > nul 2>&1 - if not errorlevel 1 ( - rmdir /s /q "%%i" - echo Removed symlink in "%%i" +REM Remove all symlinks in the mod directory +echo. +echo Deleting all symbolic links in: !modRootDir! +for /f "tokens=*" %%l in ('dir /AL /B') do ( + echo Removing symlink: %%l + rmdir "%%l" + if !errorlevel! == 0 ( + echo Successfully removed symlink: %%l + ) else ( + echo Failed to remove symlink: %%l. Check permissions or path issues. ) ) +REM Completion message +echo. +echo All symbolic links have been removed from: !modRootDir! pause