Merge Request: Colony System Improvements, Resource Labeling, Bug Fixes & Code Cleanup#105
Merge Request: Colony System Improvements, Resource Labeling, Bug Fixes & Code Cleanup#105TariqTheCoder wants to merge 10 commits into105-Code:masterfrom
Conversation
…h 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.
…or create a colony when appropriate distance away from the colony
…t of deposits to 4-8 and tweaked other values for cleaner generation
|
I'll review and test the changes this week |
dani0105
left a comment
There was a problem hiding this comment.
I see you didn't compile the project, because there are errors that will prevent a valid build. Fix all the comments and show me screenshots of the changes.
| for (short index = 0; index < 9; index++) | ||
| { | ||
| int amount = rnd.Next(1000,3000); | ||
| int amount = rnd.Next(0,4000); |
There was a problem hiding this comment.
The idea is that there are always resources in the deposits.
| * <returns> True if there are more resources</returns> | ||
| */ | ||
| public bool takeRsources(double quantity) | ||
| public bool takeResources(double quantity) |
There was a problem hiding this comment.
update all the references for this method
| private static void ShowMenu(string text, string option) | ||
| { | ||
| 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); | ||
| } |
There was a problem hiding this comment.
from where are you importing SizeSyncerBuilder, ButtonBuilder and MenuGenerator?
| 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"); |
There was a problem hiding this comment.
"Select launch site" is probably more appropriate.
There was a problem hiding this comment.
This part is disabled. It is no longer used due to all the complications.
MoreParts/Parts/ExcavatorModule.cs
Outdated
| return; | ||
| } | ||
| double countToExtract = _extractionCount * WorldTime.main.timewarpSpeed; | ||
| bool thereAreMore = deposit.takeRsources(countToExtract); |
| public Planet CurrentPlanet { set; get; } | ||
|
|
||
| public ReourceDeposit CurrentDeposit { private set; get; } | ||
| public ResourceDeposit CurrentDeposit { private set; get; } |
There was a problem hiding this comment.
you are only changing the name here, but not the class itself.
MoreParts/Managers/ColonyManager.cs
Outdated
| if (nearest != null) | ||
| { | ||
| // Change button to VIEW MODE | ||
| _createColonyButton.SetText("View Colony Information"); |
When I say screenshots of the changes, I mean the changes running in the game. I should have been clearer about that |
|
Hi @dani0105 I am having trouble compiling the mod and running it in game. How can I do this? |
|
Place all DLLs from the "Managed" folder into the "Dependencies" folder. Compile the mod using Visual Studio Community. Once compiled, the mod's DLL will be located at |
How do I open a unity project and put it inside? Do I need the spaceflight sim game code? can't i just use the Mods folder in sfs game folder? thx |
|
PR builds now but have a bug with colony building. Will fix! |




Summary
This merge request introduces several gameplay improvements, UI enhancements, bug fixes, text corrections, and code clean-ups across the Colony Management, Resources, Parts modules, and UI.
It also removes cleans grammar/log messages for consistency.
Key Features & Changes
1. Colony Interaction Improvements
Dynamic "Create/View Colony" Button
Button now automatically switches between:
"Create Colony" when the player is not in any colony
"View Colony Information" when near an existing colony
Button callback switches appropriately (CreateColony vs OpenColony).
Corrected Colony Creation Message
Replaced “Too close to another colony” with “Already inside another colony” to be more accurate.
2. Resource System Enhancements
Fixed Typo in Class Name
ReourceDeposit → ResourceDeposit
3. Parts Module Fixes & Improved Messaging
ExcavatorModule
-> Fixed grammar in messages
-> Improved error clarity (e.g., “Material container needed for storage”)
BalloonModule
-> More accurate vacuum message - (“Cannot deploy in a vacuum”)
ScannerModule
-> Better atmosphere-use message
-> Corrected altitude variable typo
-> Improved log output when deposits are found
HingeModule
-> Cleaned redundant comments
-> Improved loop-detection clarity
4. Code Quality & Cleanup
Conclusion
Colony creation and viewing button behaviour
Map now displays deposit size
Balloon and excavator behave correctly with new messages
Scanner altitude and atmosphere logic verified
Log messages and lists work better
Note:
This MR is safe to merge and focuses on clarity, bug-fixing, and usability.
No gameplay rebalance is included—only improvements.