-
-
Notifications
You must be signed in to change notification settings - Fork 15
Merge Request: Colony System Improvements, Resource Labeling, Bug Fixes & Code Cleanup #105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The idea is that there are always resources in the deposits.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| * <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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
update all the references for this method
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
| 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
from where are you importing SizeSyncerBuilder, ButtonBuilder and MenuGenerator?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Select launch site" is probably more appropriate.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This part is disabled. It is no longer used due to all the complications.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
MoreParts/Parts/ExcavatorModule.cs
Outdated
| return; | ||
| } | ||
| double countToExtract = _extractionCount * WorldTime.main.timewarpSpeed; | ||
| bool thereAreMore = deposit.takeRsources(countToExtract); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This still uses takeRsources
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change is not necessary
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
| public Planet CurrentPlanet { set; get; } | ||
|
|
||
| public ReourceDeposit CurrentDeposit { private set; get; } | ||
| public ResourceDeposit CurrentDeposit { private set; get; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SetText does not exist
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |




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.