From 01ebb7d21cda507e2dfc4ee1583c61dd3f9b4441 Mon Sep 17 00:00:00 2001 From: Tariq Tayebi Date: Sun, 16 Nov 2025 16:13:57 +1100 Subject: [PATCH 01/10] Make all colonies viewable in Build menu, with menus for colonies with insufficient resources or buildings. Fixed spelling and grammatical errors. Changes size and padding of Colonies button, and changed the text to 'Launch From Colony'. Removed redundant Information text subheading in the colony overview and instead added name. --- MoreParts/Patches/BuildManagerPatcher.cs | 2 +- MoreParts/UI/BuildingColonyGUI.cs | 29 ++++++++++++++++++------ 2 files changed, 23 insertions(+), 8 deletions(-) diff --git a/MoreParts/Patches/BuildManagerPatcher.cs b/MoreParts/Patches/BuildManagerPatcher.cs index 36d9d42..2714b92 100644 --- a/MoreParts/Patches/BuildManagerPatcher.cs +++ b/MoreParts/Patches/BuildManagerPatcher.cs @@ -25,7 +25,7 @@ public static void Postfix() _ui = holder.AddComponent(); Builder.AttachToCanvas(holder, Builder.SceneToAttach.CurrentScene); - SFS.UI.ModGUI.Button button = Builder.CreateButton(ui.transform, 120, 40, -90,-95, () => ScreenManager.main.OpenScreen(() => _ui), "Colonies"); + SFS.UI.ModGUI.Button button = Builder.CreateButton(ui.transform, 120, 40, -90,-95, () => ScreenManager.main.OpenScreen(() => _ui), "Launch From Colony"); button.rectTransform.anchorMin = Vector2.one; button.rectTransform.anchorMax = Vector2.one; } diff --git a/MoreParts/UI/BuildingColonyGUI.cs b/MoreParts/UI/BuildingColonyGUI.cs index e83ceb0..8d35829 100644 --- a/MoreParts/UI/BuildingColonyGUI.cs +++ b/MoreParts/UI/BuildingColonyGUI.cs @@ -19,7 +19,7 @@ public override void OnClose() public override void OnOpen() { - this._holder = Builder.CreateWindow(this.transform, 2, 500, 700, 0, 350, titleText: "Colonies"); + this._holder = Builder.CreateWindow(this.transform, 2, 500, 700, 0, 500, titleText: "Launch From Colony"); this._holder.CreateLayoutGroup(Type.Vertical).spacing = 20f; this._holder.CreateLayoutGroup(Type.Vertical).DisableChildControl(); this._holder.CreateLayoutGroup(Type.Vertical).childAlignment = TextAnchor.UpperCenter; @@ -36,18 +36,33 @@ public override void ProcessInput() private void generateUI() { + Builder.CreateButton(this._holder.ChildrenHolder, 480, 60, 50, 0, () => this.TryLaunchFromColony(null), "[Default] Space Center"); + foreach (ColonyData colony in MorePartsPack.Main.ColoniesInfo) { - if (!colony.IsBuildingActive(MorePartsTypes.LAUNCH_PAD_BUILDING) || !colony.IsBuildingActive(MorePartsTypes.VAB_BUILDING)) - { - continue; - } - Builder.CreateButton(this._holder.ChildrenHolder, 480, 60, 0, 0, () => this.SetSpawnPoint(colony), colony.name); + Builder.CreateButton(this._holder.ChildrenHolder, 480, 60, 0, 0, () => this.TryLaunchFromColony(colony), colony.name); + } + } + private void TryLaunchFromColony(ColonyData colony) + { + if (colony == null || + (colony.IsBuildingActive(MorePartsTypes.LAUNCH_PAD_BUILDING) && colony.IsBuildingActive(MorePartsTypes.VAB_BUILDING))) + { + SetSpawnPoint(colony); } - Builder.CreateButton(this._holder.ChildrenHolder, 480, 60, 40, 0, () => this.SetSpawnPoint(null), "Space Center"); + else + { + ShowMessage("No launchpad or VAB in this colony."); + } } + private void ShowMessage(string message) + { + MsgDrawer.main.Log(message); + } + + private void SetSpawnPoint(ColonyData spawnPoint) { MorePartsPack.Main.SpawnPoint = spawnPoint; From df98eb5269dd76ce01ab2835ee1d0cebd173546d Mon Sep 17 00:00:00 2001 From: Tariq Tayebi Date: Sun, 16 Nov 2025 16:16:24 +1100 Subject: [PATCH 02/10] Changed error message to pop-up box --- MoreParts/UI/BuildingColonyGUI.cs | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/MoreParts/UI/BuildingColonyGUI.cs b/MoreParts/UI/BuildingColonyGUI.cs index 8d35829..ac6f77f 100644 --- a/MoreParts/UI/BuildingColonyGUI.cs +++ b/MoreParts/UI/BuildingColonyGUI.cs @@ -3,6 +3,8 @@ using SFS.UI.ModGUI; using MorePartsMod; using UnityEngine; +using SFS.Builds; + namespace MorePartsMod.UI { @@ -53,16 +55,18 @@ private void TryLaunchFromColony(ColonyData colony) else { - ShowMessage("No launchpad or VAB in this colony."); + ShowMenu(colony + "Does not contain a VAB or launchpad", "Ok"); } } - - private void ShowMessage(string message) + private static void ShowMenu(string text, string option) { - MsgDrawer.main.Log(message); + SizeSyncerBuilder.Carrier sizeSync; + ButtonBuilder[] array = new ButtonBuilder[1]; + new SizeSyncerBuilder(out sizeSync).HorizontalMode(SizeMode.MaxChildSize); + array[0] = ButtonBuilder.CreateButton(sizeSync, () => option, null, CloseMode.Stack); + MenuGenerator.ShowChoices(() => text, array); } - private void SetSpawnPoint(ColonyData spawnPoint) { MorePartsPack.Main.SpawnPoint = spawnPoint; From 94a99c8b7efa5162575698862c55ae38964459a3 Mon Sep 17 00:00:00 2001 From: Tariq Tayebi Date: Sun, 16 Nov 2025 16:22:57 +1100 Subject: [PATCH 03/10] Fixed multiple spelling mistakes and grammatical errors. Code clean up. --- MoreParts/Parts/ScannerModule.cs | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/MoreParts/Parts/ScannerModule.cs b/MoreParts/Parts/ScannerModule.cs index f81ee94..c7fc14a 100644 --- a/MoreParts/Parts/ScannerModule.cs +++ b/MoreParts/Parts/ScannerModule.cs @@ -34,31 +34,35 @@ private void Start() private void Update() { - if (GameManager.main == null || !this.Active.Value || this.Location == null || this.Location.planet == null || this.Rocket.location == null) + if (GameManager.main == null || + !this.Active.Value || + this.Location == null || + this.Location.planet == null || + this.Rocket.location == null) { return; } if (this.Location.planet.IsInsideAtmosphere(this.Location.position)) { - this.Toggle("You can't use in the atmosphere", false); + this.Toggle("GeoEye cannot be used while in the atmosphere", false); return; } - double max_altitud = this.Location.planet.data.basics.timewarpHeight + 50000; + double max_altitude = this.Location.planet.data.basics.timewarpHeight + 50000; if (Base.worldBase.settings.difficulty.difficulty == SFS.WorldBase.Difficulty.DifficultyType.Realistic) { - max_altitud += 100000; + max_altitude += 100000; } - if (this.Location.Height > max_altitud) + if (this.Location.Height > max_altitude) { - this.Toggle("Max use altitude " + max_altitud / 1000 + "km", false); + this.Toggle("Max use altitude " + max_altitude / 1000 + "km", false); return; } if (ResourcesManger.Main.AnalyzePlanet(this.Rocket.location)) { - MsgDrawer.main.Log("Found Resource Deposit"); + MsgDrawer.main.Log("Found a resource deposit"); } } @@ -94,11 +98,11 @@ public void OnPartUsed(UsePartData data) { if (this.Active.Value) { - this.Toggle("GeoEye turn OFF", false); + this.Toggle("GeoEye turned off", false); } else { - this.Toggle("GeoEye turn ON", true); + this.Toggle("GeoEye turned off", true); } this.CheckOutOfFuel(); data.successfullyUsedPart = true; From a037795ebcc6a6ce9f08e839bc861e371a75a813 Mon Sep 17 00:00:00 2001 From: Tariq Tayebi Date: Sun, 16 Nov 2025 16:48:08 +1100 Subject: [PATCH 04/10] Clean up code and use more correct language in messages and logs --- .gitignore | 3 +++ MoreParts/Managers/ColonyManager.cs | 13 +++++-------- MoreParts/MorePartsMod.csproj | 7 +++---- MoreParts/Parts/BallonModule.cs | 7 +++---- MoreParts/Parts/ExcavatorModule.cs | 8 ++++---- MoreParts/Parts/HingeModule.cs | 9 +++------ MoreParts/Parts/TelecommunicationDishModule.cs | 6 +++--- MoreParts/UI/ColonyGUI.cs | 3 +-- 8 files changed, 25 insertions(+), 31 deletions(-) diff --git a/.gitignore b/.gitignore index c1a75fb..0c671ed 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,9 @@ ## ## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore +# *.csproj +# *.gitignore + # User-specific files *.rsuser *.suo diff --git a/MoreParts/Managers/ColonyManager.cs b/MoreParts/Managers/ColonyManager.cs index efb4fb7..53ce3d6 100644 --- a/MoreParts/Managers/ColonyManager.cs +++ b/MoreParts/Managers/ColonyManager.cs @@ -17,13 +17,10 @@ namespace MorePartsMod.Managers { class ColonyManager : MonoBehaviour { - // public public static ColonyManager Main; public Player_Local Player; - public List Colonies { get; private set; } - //private private SFS.UI.ModGUI.Button _createColonyButton; private ColonyGUI _ui; private bool _extractFlow; @@ -83,7 +80,7 @@ public bool CheckAndReduceMaterials(float constructionRequired, float electronic { if (resourceGroup.ResourceAmount < electronicRequired) { - MsgDrawer.main.Log("Insufficient Electronic Components"); + MsgDrawer.main.Log("Insufficient electronic components"); return false; } electronic = resourceGroup; @@ -93,7 +90,7 @@ public bool CheckAndReduceMaterials(float constructionRequired, float electronic { if (resourceGroup.ResourceAmount < constructionRequired) { - MsgDrawer.main.Log("Insufficient Construction MAterial"); + MsgDrawer.main.Log("Insufficient construction material"); return false; } construction = resourceGroup; @@ -154,7 +151,7 @@ private ColonyComponent GetNearestColony() private void ExtractResources() { - MsgDrawer.main.Log("Extracting resource from the colony to the rocket"); + MsgDrawer.main.Log("Extracting resources"); ColonyComponent colony = GetNearestColony(); @@ -178,7 +175,7 @@ private void ExtractResources() private void InsertResources() { - MsgDrawer.main.Log("Inserting resource from the rocket to the colony"); + MsgDrawer.main.Log("Storing resources in colony's refinery"); ColonyComponent colony = GetNearestColony(); @@ -311,7 +308,7 @@ private void CreateColony() if (!this.CheckColonyDistance(planet.codeName, playerLocation.position.Value)) { - MsgDrawer.main.Log("Too close to another colony"); + MsgDrawer.main.Log("Already inside another colony"); return; } diff --git a/MoreParts/MorePartsMod.csproj b/MoreParts/MorePartsMod.csproj index 11b22c1..be11588 100644 --- a/MoreParts/MorePartsMod.csproj +++ b/MoreParts/MorePartsMod.csproj @@ -1,7 +1,7 @@  - + Debug AnyCPU @@ -154,10 +154,9 @@ - + - + --> \ No newline at end of file diff --git a/MoreParts/Parts/BallonModule.cs b/MoreParts/Parts/BallonModule.cs index d45090d..f4b5b7d 100644 --- a/MoreParts/Parts/BallonModule.cs +++ b/MoreParts/Parts/BallonModule.cs @@ -1,5 +1,4 @@ - -using SFS.Parts; +using SFS.Parts; using SFS.Parts.Modules; using SFS.UI; using SFS.Variables; @@ -83,7 +82,7 @@ public void Deploy(UsePartData data) { if (!this.Location.planet.HasAtmospherePhysics || this.Location.Height > this.Location.planet.AtmosphereHeightPhysics * 0.9) { - MsgDrawer.main.Log("Not atmosphere"); + MsgDrawer.main.Log("Cannot deploy in a vaccum"); flag = false; } else @@ -97,7 +96,7 @@ public void Deploy(UsePartData data) } else if (this.TargetState.Value == 1f && this.State.Value == 1f) { - MsgDrawer.main.Log("Cut"); + MsgDrawer.main.Log("Balloon cut"); this.TargetState.Value = 2f; this.State.Value = 2f; flag = true; diff --git a/MoreParts/Parts/ExcavatorModule.cs b/MoreParts/Parts/ExcavatorModule.cs index 3877b37..0d255a6 100644 --- a/MoreParts/Parts/ExcavatorModule.cs +++ b/MoreParts/Parts/ExcavatorModule.cs @@ -74,7 +74,7 @@ private void Update() this._material_container = this.GetMaterialContainer(); if (this._material_container == null) { - MsgDrawer.main.Log("You need a Material Container"); + MsgDrawer.main.Log("Material container needed for storage"); this.TargetState.Value = 0; return; } @@ -85,7 +85,7 @@ private void Update() if (deposit == null || !deposit.Active) { - MsgDrawer.main.Log("There is not Resource Deposit"); + MsgDrawer.main.Log("Resource deposit not found"); this.TargetState.Value = 0; return; } @@ -93,14 +93,14 @@ private void Update() bool thereAreMore = deposit.takeRsources(countToExtract); if (!thereAreMore) { - MsgDrawer.main.Log("Resource Deposit Exhausted!"); + MsgDrawer.main.Log("Resource deposit exhausted"); } this._material_container.AddResource(countToExtract); this.ExcavatorObject.eulerAngles = new Vector3(0f, 0f, this.ExcavatorObject.eulerAngles.z + 4); if (this._material_container.resourcePercent.Value == 1f) { - MsgDrawer.main.Log("Container Full"); + MsgDrawer.main.Log("Material container full"); this.TargetState.Value = 0; } } diff --git a/MoreParts/Parts/HingeModule.cs b/MoreParts/Parts/HingeModule.cs index 6874adc..8a849b8 100644 --- a/MoreParts/Parts/HingeModule.cs +++ b/MoreParts/Parts/HingeModule.cs @@ -178,26 +178,23 @@ private bool getTopPartGroup(Part[] toSearch) { if (this._topGroup.ExistInGroup(part)) { - // already exist in the group - - continue; + continue; // Already exists in the group } List nextJoints = this.Rocket.jointsGroup.GetConnectedJoints(part); if (!this._topGroup.ExistInBaseGroup(part)) { - // it's not part of the base part if (nextJoints.Any(item => item.GetOtherPart(part) == this.Part)) { // it's connected to hinge part - return false; // there is a loop + return false; } } else { isBaseGroup = true; } - // add in the group to prevent loops + // Add to group to prevent loop this._topGroup.AddPartToGroup(part); thereIsLoop = this.getTopPartGroup(this.getPartFromPartJoint(nextJoints, part, isBaseGroup)); if (!thereIsLoop) diff --git a/MoreParts/Parts/TelecommunicationDishModule.cs b/MoreParts/Parts/TelecommunicationDishModule.cs index 219b81d..00ff6f3 100644 --- a/MoreParts/Parts/TelecommunicationDishModule.cs +++ b/MoreParts/Parts/TelecommunicationDishModule.cs @@ -155,7 +155,7 @@ private void DoDisconnection() if (this._notifyDisconnection) { AntennaComponent.main.ShowTelecommunicationLines = false; - MsgDrawer.main.Log("No Connection"); + MsgDrawer.main.Log("No connection to Space Centre"); this._notifyDisconnection = false; this._notifyConnection = true; this._time = _ping; @@ -184,7 +184,7 @@ public void _toggle() if (this.IsOn.Value) { AntennaComponent.main.RemoveNode(this); - MsgDrawer.main.Log("Telecommunication Dish Off"); + MsgDrawer.main.Log("Telecommunication dish off"); this.Node = null; this._notifyDisconnection = true; this.DoDisconnection(); @@ -195,7 +195,7 @@ public void _toggle() else { this.Node = AntennaComponent.main.AddNode(this); - MsgDrawer.main.Log("Telecommunication Dish On"); + MsgDrawer.main.Log("Telecommunication dish on"); this._notifyDisconnection = true; this._notifyConnection = true; this.FlowRate.Value = 0.1f; diff --git a/MoreParts/UI/ColonyGUI.cs b/MoreParts/UI/ColonyGUI.cs index d918fa6..d2c3e10 100644 --- a/MoreParts/UI/ColonyGUI.cs +++ b/MoreParts/UI/ColonyGUI.cs @@ -64,7 +64,6 @@ private void onChangeColonyName(string value) private void generateUI() { - Builder.CreateLabel(this._holder.ChildrenHolder, 480, 35, 0, 0, "Information"); Builder.CreateTextInput(this._holder.ChildrenHolder, 480, 50, 0, 0, this._colony.Data.name, this.onChangeColonyName); foreach (string key in this._colony.Data.resources.Keys) { @@ -105,7 +104,7 @@ private void generateResource(string resourcesType, int toGenerate = 100) { if (!this._colony.Data.resources.ContainsKey(MorePartsTypes.MATERIAL)) { - MsgDrawer.main.Log("There are not material in the colony"); + MsgDrawer.main.Log("There are no materials in this colony"); return; } From 14959f0505fb88a5f0606a562eb8e014ef4de2fd Mon Sep 17 00:00:00 2001 From: Tariq Tayebi Date: Sun, 16 Nov 2025 17:02:01 +1100 Subject: [PATCH 05/10] Create a button that allows you to view information when in a colony or create a colony when appropriate distance away from the colony --- MoreParts/Managers/ColonyManager.cs | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/MoreParts/Managers/ColonyManager.cs b/MoreParts/Managers/ColonyManager.cs index 53ce3d6..be3460e 100644 --- a/MoreParts/Managers/ColonyManager.cs +++ b/MoreParts/Managers/ColonyManager.cs @@ -298,7 +298,22 @@ private void CheckPlayerVelocity() } - this._createColonyButton.gameObject.SetActive(true); + ColonyComponent nearest = GetNearestColony(); + if (nearest != null) + { + // Change button to VIEW MODE + _createColonyButton.SetText("View Colony Information"); + _createColonyButton.OnClick = OpenColony; // Same as U key-binding + } + else + { + // Change button to CREATE MODE + _createColonyButton.SetText("Create Colony"); + _createColonyButton.OnClick = CreateColony; + } + + _createColonyButton.gameObject.SetActive(true); + } private void CreateColony() From 0c4c30d4f446a1ce29df3ef888c11bb1103e2489 Mon Sep 17 00:00:00 2001 From: Tariq Tayebi Date: Sun, 16 Nov 2025 17:21:48 +1100 Subject: [PATCH 06/10] Feature: Label resource deposits based on size. Reduce range of amount of deposits to 4-8 and tweaked other values for cleaner generation --- MoreParts/Managers/ResourcesManager.cs | 4 ++-- MoreParts/World/PlanetResourceData.cs | 19 ++++++++++++++++--- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/MoreParts/Managers/ResourcesManager.cs b/MoreParts/Managers/ResourcesManager.cs index 617a89e..7c22677 100644 --- a/MoreParts/Managers/ResourcesManager.cs +++ b/MoreParts/Managers/ResourcesManager.cs @@ -22,7 +22,7 @@ class ResourcesManger : MonoBehaviour public Planet CurrentPlanet { set; get; } - public ReourceDeposit CurrentDeposit { private set; get; } + public ResourceDeposit CurrentDeposit { private set; get; } private void Awake() @@ -155,7 +155,7 @@ public void DrawInMap() { if (deposit.Active && deposit.Discovered) { - MapUtils.DrawLandmarkInPlanet(this.CurrentPlanet, deposit.AngleDegree, deposit.Location, "Resource Deposit", Color.red); + MapUtils.DrawLandmarkInPlanet(this.CurrentPlanet, deposit.AngleDegree, deposit.Location, deposit.GetDepositSizeName(), Color.red); } } diff --git a/MoreParts/World/PlanetResourceData.cs b/MoreParts/World/PlanetResourceData.cs index d4288d2..e187021 100644 --- a/MoreParts/World/PlanetResourceData.cs +++ b/MoreParts/World/PlanetResourceData.cs @@ -28,11 +28,11 @@ public Planet GetPlanet() public void Initialize() { System.Random rnd = new System.Random(); - int currentAngle = rnd.Next(0,10); + int currentAngle = rnd.Next(4,8); // More appropriate range // create x deposits for (short index = 0; index < 9; index++) { - int amount = rnd.Next(1000,3000); + int amount = rnd.Next(1000,`3000); float radians = currentAngle * Mathf.Deg2Rad; double magnitude = this._planet.GetTerrainHeightAtAngle(radians); float x = Mathf.Cos(radians); @@ -48,6 +48,7 @@ public void Initialize() public class ReourceDeposit { + public double Amount; public bool Active; public Double2 Location; @@ -67,11 +68,23 @@ public ReourceDeposit(float amount, Double2 location, int size, float angleDegre public ReourceDeposit() {} + public string GetDepositSizeName() + { + if (Size < 1001) + return "Small Resource Deposit"; + + if (Size < 2001) + return "Medium Resource Deposit"; + + return "Large Resource Deposit"; + } + + /** * reduce resources in this deposit * True if there are more resources */ - public bool takeRsources(double quantity) + public bool takeResources(double quantity) { this.Amount -= quantity; if(this.Amount < 0) From 8390f4a6cb2f200a2521cca29c69c700c853f6e7 Mon Sep 17 00:00:00 2001 From: Tariq Tayebi Date: Sun, 16 Nov 2025 17:34:48 +1100 Subject: [PATCH 07/10] Finish Planet Resource fixes --- .gitignore | 3 --- MoreParts/World/PlanetResourceData.cs | 6 +++--- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 0c671ed..c1a75fb 100644 --- a/.gitignore +++ b/.gitignore @@ -8,9 +8,6 @@ ## ## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore -# *.csproj -# *.gitignore - # User-specific files *.rsuser *.suo diff --git a/MoreParts/World/PlanetResourceData.cs b/MoreParts/World/PlanetResourceData.cs index e187021..a084db0 100644 --- a/MoreParts/World/PlanetResourceData.cs +++ b/MoreParts/World/PlanetResourceData.cs @@ -32,7 +32,7 @@ public void Initialize() // create x deposits for (short index = 0; index < 9; index++) { - int amount = rnd.Next(1000,`3000); + int amount = rnd.Next(0,4000); float radians = currentAngle * Mathf.Deg2Rad; double magnitude = this._planet.GetTerrainHeightAtAngle(radians); float x = Mathf.Cos(radians); @@ -70,10 +70,10 @@ public ReourceDeposit() {} public string GetDepositSizeName() { - if (Size < 1001) + if (Size < 1500) return "Small Resource Deposit"; - if (Size < 2001) + if (Size < 2500) return "Medium Resource Deposit"; return "Large Resource Deposit"; From 1843977f19cd5564b380b1a21426107473f8aa59 Mon Sep 17 00:00:00 2001 From: Tariq Tayebi Date: Sun, 16 Nov 2025 17:41:22 +1100 Subject: [PATCH 08/10] Undoing changes to csproj --- MoreParts/MorePartsMod.csproj | 305 +++++++++++++++++----------------- 1 file changed, 153 insertions(+), 152 deletions(-) diff --git a/MoreParts/MorePartsMod.csproj b/MoreParts/MorePartsMod.csproj index be11588..3602070 100644 --- a/MoreParts/MorePartsMod.csproj +++ b/MoreParts/MorePartsMod.csproj @@ -1,162 +1,163 @@  - - - - Debug - AnyCPU - {BA241F55-D6BB-4E78-956A-28F3204FEC8D} - Library - Properties - MorePartsMod - MorePartsMod - v4.8 - 512 - true - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - ..\Dependencies\0Harmony.dll - False - - - ..\Dependencies\Assembly-CSharp.dll - False - - - False - ..\Dependencies\Newtonsoft.Json.dll - False - - - ..\Dependencies\UniTask.dll - False - - - ..\Dependencies\UnityEngine.dll - False - - - ..\Dependencies\UnityEngine.AnimationModule.dll - False - - - ..\Dependencies\UnityEngine.AssetBundleModule.dll - False - - - ..\Dependencies\UnityEngine.CoreModule.dll - False - - - ..\Dependencies\UnityEngine.IMGUIModule.dll - False - - - ..\Dependencies\UnityEngine.InputLegacyModule.dll - False - - - ..\Dependencies\UnityEngine.InputModule.dll - False - - - ..\Dependencies\UnityEngine.Physics2DModule.dll - False - - - ..\Dependencies\UnityEngine.PhysicsModule.dll - False - - - ..\Dependencies\UnityEngine.TextCoreFontEngineModule.dll - False - - - ..\Dependencies\UnityEngine.TextCoreTextEngineModule.dll - False - - - ..\Dependencies\UnityEngine.TextRenderingModule.dll - False - - - ..\Dependencies\UnityEngine.UI.dll - False - - - - - + + + + Debug + AnyCPU + {BA241F55-D6BB-4E78-956A-28F3204FEC8D} + Library + Properties + MorePartsMod + MorePartsMod + v4.8 + 512 + true + + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + ..\Dependencies\0Harmony.dll + False + + + ..\Dependencies\Assembly-CSharp.dll + False + + + False + ..\Dependencies\Newtonsoft.Json.dll + False + + + ..\Dependencies\UniTask.dll + False + + + ..\Dependencies\UnityEngine.dll + False + + + ..\Dependencies\UnityEngine.AnimationModule.dll + False + + + ..\Dependencies\UnityEngine.AssetBundleModule.dll + False + + + ..\Dependencies\UnityEngine.CoreModule.dll + False + + + ..\Dependencies\UnityEngine.IMGUIModule.dll + False + + + ..\Dependencies\UnityEngine.InputLegacyModule.dll + False + + + ..\Dependencies\UnityEngine.InputModule.dll + False + + + ..\Dependencies\UnityEngine.Physics2DModule.dll + False + + + ..\Dependencies\UnityEngine.PhysicsModule.dll + False + + + ..\Dependencies\UnityEngine.TextCoreFontEngineModule.dll + False + + + ..\Dependencies\UnityEngine.TextCoreTextEngineModule.dll + False + + + ..\Dependencies\UnityEngine.TextRenderingModule.dll + False + + + ..\Dependencies\UnityEngine.UI.dll + False + + + + + - - - - - - + + + + + + - - + + - - - - - - - - + + + + + + + + - - - - + + + + - - + + - - - - - - - - - - - - - - + + + + + - - - - - + + + + + + + + + + + + + + + + + + + \ No newline at end of file From 77be0af2e38ff02e3a426b5d296e86747fb3e0c8 Mon Sep 17 00:00:00 2001 From: Tariq Tayebi Date: Mon, 29 Dec 2025 23:20:35 +1100 Subject: [PATCH 09/10] Update range for amount of resources in a resource pocket to 1000 to 3000 --- MoreParts/World/PlanetResourceData.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/MoreParts/World/PlanetResourceData.cs b/MoreParts/World/PlanetResourceData.cs index a084db0..408b902 100644 --- a/MoreParts/World/PlanetResourceData.cs +++ b/MoreParts/World/PlanetResourceData.cs @@ -10,12 +10,12 @@ public class PlanetResourceData [NonSerialized] private Planet _planet; - public List ResourceDeposits; + public List ResourceDeposits; public PlanetResourceData(Planet planet) { this._planet = planet; - this.ResourceDeposits = new List(); + this.ResourceDeposits = new List(); } public PlanetResourceData() { } @@ -32,7 +32,7 @@ public void Initialize() // create x deposits for (short index = 0; index < 9; index++) { - int amount = rnd.Next(0,4000); + int amount = rnd.Next(1000,3000); float radians = currentAngle * Mathf.Deg2Rad; double magnitude = this._planet.GetTerrainHeightAtAngle(radians); float x = Mathf.Cos(radians); From 3b93b44a4883cc9a51e916339a6dded63aa28a68 Mon Sep 17 00:00:00 2001 From: Tariq Tayebi Date: Fri, 2 Jan 2026 11:40:50 +1100 Subject: [PATCH 10/10] Final changes --- MoreParts/Managers/ColonyManager.cs | 8 +++----- MoreParts/Managers/ResourcesManager.cs | 2 +- MoreParts/Parts/ExcavatorModule.cs | 2 +- MoreParts/Patches/BuildManagerPatcher.cs | 4 ++-- MoreParts/UI/BuildingColonyGUI.cs | 2 ++ MoreParts/World/PlanetResourceData.cs | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/MoreParts/Managers/ColonyManager.cs b/MoreParts/Managers/ColonyManager.cs index be3460e..b4f594e 100644 --- a/MoreParts/Managers/ColonyManager.cs +++ b/MoreParts/Managers/ColonyManager.cs @@ -297,23 +297,21 @@ private void CheckPlayerVelocity() return; } - ColonyComponent nearest = GetNearestColony(); if (nearest != null) { // Change button to VIEW MODE - _createColonyButton.SetText("View Colony Information"); - _createColonyButton.OnClick = OpenColony; // Same as U key-binding + _createColonyButton.Text = "View Colony Information"; + _createColonyButton.OnClick = OpenColony; } else { // Change button to CREATE MODE - _createColonyButton.SetText("Create Colony"); + _createColonyButton.Text = "Create Colony"; _createColonyButton.OnClick = CreateColony; } _createColonyButton.gameObject.SetActive(true); - } private void CreateColony() diff --git a/MoreParts/Managers/ResourcesManager.cs b/MoreParts/Managers/ResourcesManager.cs index 7c22677..26f7639 100644 --- a/MoreParts/Managers/ResourcesManager.cs +++ b/MoreParts/Managers/ResourcesManager.cs @@ -22,7 +22,7 @@ class ResourcesManger : MonoBehaviour public Planet CurrentPlanet { set; get; } - public ResourceDeposit CurrentDeposit { private set; get; } + public ReourceDeposit CurrentDeposit { private set; get; } private void Awake() diff --git a/MoreParts/Parts/ExcavatorModule.cs b/MoreParts/Parts/ExcavatorModule.cs index 0d255a6..83e735b 100644 --- a/MoreParts/Parts/ExcavatorModule.cs +++ b/MoreParts/Parts/ExcavatorModule.cs @@ -90,7 +90,7 @@ private void Update() return; } double countToExtract = _extractionCount * WorldTime.main.timewarpSpeed; - bool thereAreMore = deposit.takeRsources(countToExtract); + bool thereAreMore = deposit.takeResources(countToExtract); if (!thereAreMore) { MsgDrawer.main.Log("Resource deposit exhausted"); diff --git a/MoreParts/Patches/BuildManagerPatcher.cs b/MoreParts/Patches/BuildManagerPatcher.cs index 2714b92..8ba7654 100644 --- a/MoreParts/Patches/BuildManagerPatcher.cs +++ b/MoreParts/Patches/BuildManagerPatcher.cs @@ -25,7 +25,7 @@ public static void Postfix() _ui = holder.AddComponent(); Builder.AttachToCanvas(holder, Builder.SceneToAttach.CurrentScene); - SFS.UI.ModGUI.Button button = Builder.CreateButton(ui.transform, 120, 40, -90,-95, () => ScreenManager.main.OpenScreen(() => _ui), "Launch From Colony"); + SFS.UI.ModGUI.Button button = Builder.CreateButton(ui.transform, 120, 40, -90,-95, () => ScreenManager.main.OpenScreen(() => _ui), "Select Launch Site"); button.rectTransform.anchorMin = Vector2.one; button.rectTransform.anchorMax = Vector2.one; } @@ -81,7 +81,7 @@ private static void ShowMenu(string text, string option) MenuGenerator.ShowChoices(() => text, array); } - private static bool IsSpeacialResource(string resourceName) + private static bool IsSpecialResource(string resourceName) { if (resourceName == MorePartsTypes.ROCKET_MATERIAL) { diff --git a/MoreParts/UI/BuildingColonyGUI.cs b/MoreParts/UI/BuildingColonyGUI.cs index ac6f77f..ccfc393 100644 --- a/MoreParts/UI/BuildingColonyGUI.cs +++ b/MoreParts/UI/BuildingColonyGUI.cs @@ -2,7 +2,9 @@ using SFS.Input; using SFS.UI.ModGUI; using MorePartsMod; +using MorePartsMod.UI; using UnityEngine; +using SFS.UI; using SFS.Builds; diff --git a/MoreParts/World/PlanetResourceData.cs b/MoreParts/World/PlanetResourceData.cs index 408b902..f2a09fc 100644 --- a/MoreParts/World/PlanetResourceData.cs +++ b/MoreParts/World/PlanetResourceData.cs @@ -26,7 +26,7 @@ public Planet GetPlanet() } public void Initialize() - { + {W System.Random rnd = new System.Random(); int currentAngle = rnd.Next(4,8); // More appropriate range // create x deposits