Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,15 @@ exclude.txt
dev/
/.cache/
/.idea/
/.vscode/
/.vscode/

# Java build outputs
*.class
*.jar
temp_jar/
temp_classes/
test_install/
tmp_*

# avoid committing compiled classes in src
src/**/*.class
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## [0.7.0] - 2025-10-13
### Added
- Per-event notification toggles (nebula entry/exit, corona entry/exit) exposed via LunaLib so players can independently enable or disable floating-text notifications for each event.
### Changed
- Reworked Notification UI: grouped Nebula and Corona notification settings and removed legacy color preset radios in favor of LunaLib HSV color pickers.
- Default notification colors changed to light gray (#D3D3D3).

## [0.6.3] - 2025-10-09
### Fixed
- Fixed crash when opening LunaLib settings menu (percent signs in descriptions are now properly escaped as %%)
Expand Down
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,15 @@ For modders and advanced users, manual configuration is available through `setti
- No known mod conflicts
- Current version: 0.6.3

## What's new (0.7.0)
- Per-event notification toggles: you can now enable/disable floating notifications separately for nebula entry/exit and corona entry/exit via the LunaLib settings UI.
- UI rework: color presets removed in favor of HSV color pickers; saved HSV values are now respected correctly.
- Default notification colours changed to light grey (#D3D3D3) to reduce visual noise; Java default falls back to Color.LIGHT_GRAY.
- Notifications are now gated by the master "Scoop" toggle at runtime — turning the master toggle off stops all ramscoop notifications immediately.

## TriOS compatibility (quick notes)
This project supports packaging for TriOS. See `docs/TRIOS_COMPATIBILITY.md` for a short checklist and validation steps you can run before creating a TriOS release.

## Development
This mod includes build scripts for development:
- `build.ps1` – PowerShell build script
Expand Down
6 changes: 3 additions & 3 deletions Ramscoop.version
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
"masterVersionFile": "https://raw.githubusercontent.com/powerfulqa/Passive-Ramscoop/main/Ramscoop.version",
"modVersion": {
"major": 0,
"minor": 6,
"patch": 3
"minor": 7,
"patch": 0
},
"modName": "Ramscoop",
"modThreadId": null,

# Link towards a direct download, fetched from the online version file
"directDownloadURL": "https://github.com/powerfulqa/Passive-Ramscoop/releases/download/v0.6.3/Ramscoop-v0.6.3.zip",
"directDownloadURL": "https://github.com/powerfulqa/Passive-Ramscoop/releases/download/v0.7.0/Ramscoop-v0.7.0.zip",

# Link towards a directly accessible text file, which can be used to display a changelog ingame, is fetched from the online version file.
# The new line will highlight any line that begins with "Version"
Expand Down
27 changes: 25 additions & 2 deletions build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,36 @@
setlocal enabledelayedexpansion

:: Configuration
set SS_DIR=C:\Program Files (x86)\Fractal Softworks\Starsector
:: Try to detect Starsector installation. Prefer Program Files (x86), fall back to G:\Starsector
set "SS_DIR="
set "PF86="
for /f "usebackq tokens=*" %%I in ("%ProgramFiles(x86)%") do set "PF86=%%~I"
if defined PF86 (
set "DEFAULT_SS_DIR=%PF86%\Fractal Softworks\Starsector"
) else (
set "DEFAULT_SS_DIR=C:\Program Files (x86)\Fractal Softworks\Starsector"
)
if exist "%DEFAULT_SS_DIR%" (
set "SS_DIR=%DEFAULT_SS_DIR%"
echo Using Starsector directory: %SS_DIR%
) else if exist "G:\Starsector" (
set "SS_DIR=G:\Starsector"
echo Using Starsector directory: %SS_DIR%
) else (
rem Neither path found; default to DEFAULT_SS_DIR and warn
set "SS_DIR=%DEFAULT_SS_DIR%"
echo WARNING: Could not find Starsector installation in %DEFAULT_SS_DIR% or G:\Starsector
echo Please edit build.bat and set SS_DIR to your Starsector installation path.
)
set MOD_NAME=Passive-Ramscoop
set MOD_ID=m561_ramscoop
set SRC_DIR=%cd%\src
set OUT_DIR=%cd%\jars
set OUT_CLASSES=%cd%\build\classes

:: Create directories if they don't exist
if not exist "%OUT_DIR%" mkdir "%OUT_DIR%"
if not exist "%OUT_CLASSES%" mkdir "%OUT_CLASSES%"

:: Set up classpath with all necessary libraries from Starsector
set CLASSPATH="%SS_DIR%\starsector-core\starfarer.api.jar"
Expand All @@ -26,7 +48,7 @@ set CLASSPATH=%CLASSPATH%;"%SS_DIR%\starsector-core\log4j-1.2.9.jar"

:: Compile Java files
echo Compiling Java files...
javac --release 8 -cp %CLASSPATH% -d "%SRC_DIR%" "%SRC_DIR%\ramscoop\*.java"
javac --release 8 -cp %CLASSPATH% -d "%OUT_CLASSES%" %SRC_DIR%\ramscoop\*.java
if %ERRORLEVEL% NEQ 0 (
echo Compilation failed!
exit /b %ERRORLEVEL%
Expand All @@ -44,6 +66,7 @@ for /f "tokens=*" %%i in ('where java') do (
)

:: Use jar from Java installation or fall back to jar command if in PATH
cd "%OUT_CLASSES%"
if exist "%JAVA_BIN%jar.exe" (
echo Using jar from: %JAVA_BIN%jar.exe
"%JAVA_BIN%jar.exe" cf "%OUT_DIR%\Ramscoop.jar" ramscoop\*.class
Expand Down
5 changes: 5 additions & 0 deletions build.ps1
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
# PowerShell build script for Ramscoop mod

# Configuration
# Default Starsector path; if it doesn't exist, prefer G:\Starsector (user environment)
$SS_DIR = "C:\Program Files (x86)\Fractal Softworks\Starsector"
if (-not (Test-Path $SS_DIR) -and (Test-Path "G:\Starsector")) {
$SS_DIR = "G:\Starsector"
Write-Host "Using Starsector directory: $SS_DIR" -ForegroundColor Cyan
}
$MOD_NAME = "Passive-Ramscoop"
$MOD_ID = "m561_ramscoop"
$SRC_DIR = "$PWD\src"
Expand Down
8 changes: 8 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
Changelog

Version 0.7.0 (2025-10-13)
Added
- Per-event notification toggles for nebula entry/exit and corona entry/exit exposed via LunaLib

Changed
- Notification UI reorganised: Nebula and Corona sections now contain color pickers and per-event toggles
- Default notification colors set to #D3D3D3 (light gray)

Version 0.6.3 (2025-10-09)
Fixed
- Fixed crash when opening LunaLib settings menu (percent signs in descriptions are now properly escaped)
Expand Down
16 changes: 15 additions & 1 deletion data/config/LunaSettings.csv
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ fieldID,fieldName,fieldType,defaultValue,secondaryValue,fieldDescription,minValu
ramscoop_header,Ramscoop Configuration,Header,Ramscoop Configuration,,,,,General
# Runtime controls at top
ramscoop_toggle_header,Runtime,Header,Runtime,,,,,General
ramscoop_toggle_default_on,Scoop Enabled,Boolean,true,,"Master toggle: Enable or disable all Ramscoop resource generation at runtime. Affects both fuel and supplies generation in nebulae and coronas. Changes take effect immediately without reloading the game.",, ,General
ramscoop_toggle_default_on,Scoop Enabled,Boolean,true,,"Master toggle: Enable or disable all Ramscoop resource generation at runtime. Affects both fuel and supplies generation in nebulae and coronas.",, ,General
,,,,,,,,
ramscoop_enable_fuel,Enable Fuel Generation,Boolean,true,,"Enable automatic fuel generation while traveling through nebulae. When enabled, your fleet will gradually collect fuel based on the rates configured in the Nebula tab.",,,General
ramscoop_enable_supplies,Enable Supply Generation,Boolean,true,,"Enable automatic supply generation while traveling through nebulae. When enabled, your fleet will gradually collect supplies based on crew and cargo capacity configured in the Nebula tab.",,,General
Expand Down Expand Up @@ -38,3 +38,17 @@ corona_fuel_limits_header,Corona Fuel Caps,Header,Corona Fuel Caps,,,,,Corona
corona_percent_fuel_limit,Corona Fuel Soft Cap (percent of max),Double,20,,"Soft cap for corona fuel generation as a percentage of maximum fuel capacity. Only used if 'Reuse Nebula Caps' is disabled. Once fuel reaches this threshold, generation stops. Set to 100 to allow filling to full capacity.",0,100,Corona
corona_hard_fuel_limit,Corona Fuel Hard Cap (absolute units),Double,0,,"Absolute maximum fuel units that can be generated in coronas. Only used if 'Reuse Nebula Caps' is disabled. Set to 0 to disable this hard cap and rely only on the percentage cap.",0,100000,Corona
corona_fuel_cap_margin,Corona Fuel Cap Margin (units),Double,0,,"Buffer zone below the fuel cap for coronas. Only used if 'Reuse Nebula Caps' is disabled. Stops generation when you're this many fuel units below the cap to leave room for other fuel sources.",0,1000,Corona
,,,,,,,,
notification_header,Notification Settings,Header,Notification Settings,,,,,Notifications
ramscoop_enable_visual_feedback,Master Toggle for Visual Feedback,Boolean,false,,"Main ON/OFF switch for all the visual indicators when ramscoop is active (e.g., floating text on fleet).",,,Notifications
ramscoop_floating_text_scale,Floating Text Duration (seconds),Double,0.7,,"How long (in seconds) the floating text remains visible after Ramscoop toggles.",0.1,3.0,Notifications
notifications_nebula_header,Nebula Notifications,Header,Nebula Notifications,,,,,Notifications
ramscoop_notify_nebula_entry,Show Nebula Entry Notification,Boolean,true,,"Show a floating-text notification when entering a nebula.",,,Notifications
ramscoop_color_nebula_active_v2,Nebula Entry Color selection,Color,#D3D3D3,,"Select a color from the sliders or enter hex code if known. This changes the text color when entering a nebula.",,,Notifications
ramscoop_notify_nebula_exit,Show Nebula Exit Notification,Boolean,true,,"Show a floating-text notification when exiting a nebula.",,,Notifications
ramscoop_color_nebula_inactive_v2,Nebula Exit Color selection,Color,#D3D3D3,,"Select a color from the sliders or enter hex code if known. This changes the text color when exiting a nebula.",,,Notifications
notifications_corona_header,Corona Notifications,Header,Corona Notifications,,,,,Notifications
ramscoop_notify_corona_entry,Show Corona Entry Notification,Boolean,true,,"Show a floating-text notification when entering a corona.",,,Notifications
ramscoop_color_corona_active_v2,Corona Entry Color selection,Color,#D3D3D3,,"Select a color from the sliders or enter hex code if known. This changes the text color when entering a corona.",,,Notifications
ramscoop_notify_corona_exit,Show Corona Exit Notification,Boolean,true,,"Show a floating-text notification when exiting a corona.",,,Notifications
ramscoop_color_corona_inactive_v2,Corona Exit Color selection,Color,#D3D3D3,,"Select a color from the sliders or enter hex code if known. This changes the text color when exiting a corona.",,,Notifications
37 changes: 37 additions & 0 deletions docs/RELEASE_v0.7.0_SUMMARY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
````markdown
# Release v0.7.0 Summary

## Release Date
2025-10-13

## Changes Overview

### Added
- Per-event notification toggles for Nebula Entry, Nebula Exit, Corona Entry, and Corona Exit exposed via LunaLib.

### Changed
- Reordered Notification UI in `data/config/LunaSettings.csv` to group Nebula and Corona settings together.
- Removed legacy color preset radio controls; LunaLib color pickers (hex + HSV sliders) are now the single source of color configuration.
- Default notification colors set to light gray (#D3D3D3).

## Files Modified
- `data/config/LunaSettings.csv` — reorganised notification section, added per-event toggles, default color updated
- `src/ramscoop/ModPlugin.java` — added LunaLib reads for new toggles, default colors updated, debug logging updated
- `src/ramscoop/Ramscoop.java` — notifications gated by runtime scoop toggle, removed blue-text scheduling
- `Ramscoop.version`, `version.json`, `mod_info.json` — version bumped to 0.7.0
- `CHANGELOG.md`, `changelog.txt` — added v0.7.0 entries

## Testing
- Rebuilt JAR with the project's `build.ps1` script and verified compilation
- Confirmed in-game via user testing that per-event toggles appear and function, notifications respect the master Scoop toggle, and the delayed blue text is removed

## Notes
- This release is a small feature addition and UI rework; it is backwards-compatible with existing saves and settings. LunaLib-stored color values will continue to override new defaults where present.

---

**Build Status**: ✅ Successful
**Testing Status**: ✅ User-verified
**Ready for Release**: ✅ Yes

````
35 changes: 35 additions & 0 deletions docs/TRIOS_COMPATIBILITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
TriOS compatibility checklist for Passive Ramscoop

This short guide lists the things required by TriOS (TriOS mod manager) to accept a mod release and the validation steps to confirm those requirements are met.

Checklist
- [ ] Semantic versioning: ensure `Ramscoop.version` contains numeric `major`, `minor`, and `patch` fields (e.g. `{"major":0,"minor":7,"patch":0}`) and matches other version files.
- [ ] `changelog.txt` must be plain text and include headers of the form: `Version X.X.X` (no markdown headings). TriOS reads the plain-text changelog directly.
- [ ] `mod_info.json` must have a `directDownloadURL` and `changelogURL` that point to the release assets (case-sensitive paths).
- [ ] Include `jars/Ramscoop.jar` in the release assets uploaded to the host used by TriOS (or make sure `directDownloadURL` points to a downloadable jar).
- [ ] `Ramscoop.version` and `version.json` should be kept in sync with `mod_info.json` to prevent TriOS version mismatches.
- [ ] Use a Git tag with `vMAJOR.MINOR.PATCH` (for example `v0.7.0`) when creating the release so TriOS and CI workflows can find the correct version.

Validation steps (quick)
1. Verify `Ramscoop.version` contains numeric fields and matches `mod_info.json`:
- Open `Ramscoop.version` and check `major`, `minor`, `patch` values.
- Open `mod_info.json` and `version.json` and ensure the `version` string matches `major.minor.patch`.

2. Verify `changelog.txt` formatting:
- Ensure it is a plain-text file and contains a line starting with `Version ` followed by the version number and a newline before the content.

3. Verify `directDownloadURL` and `changelogURL`:
- Check `mod_info.json` for the `directDownloadURL` and `changelogURL` fields.
- Ensure the URLs are correct, reachable, and case-sensitive matches of the files you upload.

4. Package test:
- Build with `.uild.ps1` to produce `jars/Ramscoop.jar`.
- Locally host the `jar` (or place it where your release tooling expects) and confirm the `directDownloadURL` points to a working download.

5. Tag & release:
- Create git tag `vMAJOR.MINOR.PATCH` and push tags: `git tag v0.7.0; git push --tags`.

Notes & tips
- TriOS expects plain text and exact path names. Double-check file case, especially on case-sensitive hosts.
- `Ramscoop.version` is specifically used by TriOS: keep it machine-friendly (plain JSON with numeric fields) and bump the `patch` field when publishing bugfixes.
- If you automate releases (CI), ensure your workflow uploads `jars/Ramscoop.jar` and `changelog.txt` and updates `mod_info.json` `directDownloadURL` to point at the uploaded asset.
Binary file removed jars/Ramscoop.jar
Binary file not shown.
4 changes: 3 additions & 1 deletion mod_info.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@
"id":"m561_ramscoop",
"name":"Ramscoop",
"author":"PowerfulQA, Original by Meridias561",
"version":"0.6.3",
"version":"0.7.0",
"description":"Automatically collect fuel and supplies whilst exploring! Your fleet gathers resources from nebulae and star coronas with fully configurable rates and limits.",
"gameVersion":"0.98a-RC8",
"directDownloadURL":"https://github.com/powerfulqa/Passive-Ramscoop/releases/download/v0.7.0/Ramscoop-v0.7.0.zip",
"changelogURL":"https://raw.githubusercontent.com/powerfulqa/Passive-Ramscoop/main/changelog.txt",
"jars":["jars/Ramscoop.jar"],
"modPlugin":"ramscoop.ModPlugin",
"enabled":true,
Expand Down
Binary file modified src/ramscoop/ModPlugin.class
Binary file not shown.
Loading