From 3b96ef39ebc1bf9b9a54b0ffc1d8c90e380c1aa2 Mon Sep 17 00:00:00 2001 From: InvalidArgument3 Date: Sun, 16 Jun 2024 19:44:34 -0500 Subject: [PATCH] Update AsteroidSettings.cs --- .../Scripts/DynamicAsteroids/AsteroidSettings.cs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/Dynamic Asteroids/Data/Scripts/DynamicAsteroids/AsteroidSettings.cs b/Dynamic Asteroids/Data/Scripts/DynamicAsteroids/AsteroidSettings.cs index e3243572..5f4ab973 100644 --- a/Dynamic Asteroids/Data/Scripts/DynamicAsteroids/AsteroidSettings.cs +++ b/Dynamic Asteroids/Data/Scripts/DynamicAsteroids/AsteroidSettings.cs @@ -1,10 +1,10 @@ using System; -using System.Collections.Generic; using System.IO; using DynamicAsteroids.AsteroidEntities; using Invalid.DynamicRoids; using Sandbox.ModAPI; using VRageMath; +using System.Collections.Generic; namespace DynamicAsteroids { @@ -397,6 +397,17 @@ public static void LoadSettings() if (currentArea != null) ValidSpawnLocations.Add(currentArea); } } + else + { + // Create default configuration if it doesn't exist + ValidSpawnLocations.Add(new SpawnableArea + { + Name = "DefaultArea", + CenterPosition = new Vector3D(0.0, 0.0, 0.0), + Radius = 10000 + }); + SaveSettings(); + } } catch (Exception ex) {