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
141 changes: 0 additions & 141 deletions .github/scripts/build_release_notes.sh

This file was deleted.

62 changes: 29 additions & 33 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,14 @@ name: build

on:
push:
branches:
- '**'
tags:
- '**'
pull_request:
branches:
- '**'
workflow_dispatch: # Allow manual triggering from GitHub UI

permissions:
contents: write
Expand Down Expand Up @@ -36,9 +43,6 @@ jobs:
- name: Make gradlew executable
run: chmod +x gradlew

- name: Make scripts executable
run: chmod +x .github/scripts/*.sh

- name: Build
run: |
./gradlew --version
Expand All @@ -48,7 +52,7 @@ jobs:
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: cell-terminal-jar
name: jars
path: build/libs/*.jar

- name: Publish GitHub Release (tags only)
Expand All @@ -57,44 +61,36 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
TAG="${GITHUB_REF##*/}"
TAG_COMMIT=$(git rev-list -n 1 "$TAG")

# Get version and release type from Gradle
VERSION=$(./gradlew -q printVersion)
FULL_VERSION=$(./gradlew -q printFullVersion)
RELEASE_TYPE=$(./gradlew -q printReleaseType)

# Get changelog from Gradle
NOTES_FILE="/tmp/release_notes.md"
.github/scripts/build_release_notes.sh "$TAG" "${GITHUB_REPOSITORY%/*}" "${GITHUB_REPOSITORY#*/}" "$TAG_COMMIT" "${GITHUB_SERVER_URL:-https://github.com}" > "$NOTES_FILE"
./gradlew -q printChangelog > "$NOTES_FILE"

echo "Version: $VERSION, Release Type: $RELEASE_TYPE" >&2
echo "Generated release notes:" >&2
sed 's/^/ /' "$NOTES_FILE" >&2

# TODO: get "C.E.L.L.S" from gradle
gh release create "$TAG" build/libs/*.jar \
--title "Cell Terminal $TAG" \
--title "$FULL_VERSION" \
--notes-file "$NOTES_FILE" \
$(if [[ "$TAG" =~ [ab]|rc|pre ]]; then echo "--prerelease"; fi)
$(if [[ "$RELEASE_TYPE" != "release" ]]; then echo "--prerelease"; fi)

- name: Publish to CurseForge (tags only; infer release type)
- name: Publish to CurseForge (tags only)
if: ${{ env.CURSEFORGE_TOKEN != '' && startsWith(github.ref, 'refs/tags/') }}
working-directory: .
env:
CURSEFORGE_TOKEN: ${{ env.CURSEFORGE_TOKEN }}
GIT_TAG: ${{ github.ref_name }}
run: |
set -euo pipefail
TAG="${GIT_TAG:-${GITHUB_REF##*/}}"
VERSION_DISPLAY=$(echo "$TAG" | sed -E 's/^v//')
LOWER=$(echo "$TAG" | tr '[:upper:]' '[:lower:]')
RELEASE_TYPE=release
if [[ "$LOWER" == *alpha* ]]; then
RELEASE_TYPE=alpha
elif [[ "$LOWER" == *beta* || "$LOWER" == *rc* || "$LOWER" == *pre* ]]; then
RELEASE_TYPE=beta
else
CORE=$(echo "$LOWER" | sed -E 's/^v//')
if [[ "$CORE" =~ ^[0-9]+(\.[0-9]+)*a([0-9]*)?$ ]]; then
RELEASE_TYPE=alpha
elif [[ "$CORE" =~ ^[0-9]+(\.[0-9]+)*b([0-9]*)?$ ]]; then
RELEASE_TYPE=beta
fi
fi
TAG_COMMIT=$(git rev-list -n 1 "$TAG")
CL=$(.github/scripts/build_release_notes.sh "$TAG" "${GITHUB_REPOSITORY%/*}" "${GITHUB_REPOSITORY#*/}" "$TAG_COMMIT" "${GITHUB_SERVER_URL:-https://github.com}")
# Get release type from Gradle
RELEASE_TYPE=$(./gradlew -q printReleaseType)

# Gradle handles changelog and display name from mod_version
./gradlew curseforge --no-daemon \
-Ppublish_to_curseforge=true \
-Prelease_type="$RELEASE_TYPE" \
-Pcurseforge_changelog="$CL" \
-Pcurseforge_display_name="Cell Terminal $VERSION_DISPLAY"
-Ppublish_with_changelog=true \
-Prelease_type="$RELEASE_TYPE"
25 changes: 25 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,31 @@ The format is based on Keep a Changelog and this project adheres to Semantic Ver
- Semantic Versioning: https://semver.org/spec/v2.0.0.html


## [1.5.1] - 2026-03-14
### Fixed
- Fix Subnets Overview not handling Fluids.


## [1.5.0] - 2026-03-13
### Added
- Add proper content/partition handling to the Subnet Overview, mirroring the behavior of the Temporary Area tab.
- Add tooltip for Temporary Cells stored in the Wireless Terminal.

### Fixed
- Fix Upgrade Cards not being handled at all in the Temporary Area tab.
- Fix the Temporary Area not working at all with the Wireless Universal Terminal.
- (and probably many other small bugs I may add later as I compare in parallel)

### Changed
- Rewrite the whole GUI part of the mod, with proper icons and missing features implemented. Similar widgets have been unified for a more consistent experience across the different tabs.

### Technical
- Convert the heavy-handed context passing into a tree-like widgets structure. Tab Manager -> Tabs (Terminal/Inventory/Partition) -> Headers (Drive/Storage Bus) -> Tree Lines (Cell entries, partition entries, inventory entries). This allows to share a lot of the logic and code between the different tabs, as they are now mostly just different renderings of the same underlying data, and to avoid passing a huge amount of context parameters everywhere.
- The new widgets unify the behaviors by separating the implementation into the relevant widget classes, sharing the common logic and only implementing the specific rendering and interactions in the relevant classes. For example, the inventory and partition entries are the same widget with slightly different data (same data but different key), slightly different rendering, and slightly different interactions.
- The widgets handle clicks, hovering, and keybinds themselves at the lowest level, instead of delegating to a central handler in the main GUI class. This allows to move the logic for each interaction into the relevant widget, and avoid having a huge central handler with a lot of context parameters and special cases for different tabs. The main GUI delegates interactions to the top level widgets which then decide what to do with them, e.g. delegating further down to the relevant child widgets.
- The renaming logic has been moved to a singleton manager that just handles the state of the currently renaming entry and the renaming actions, the widgets themselves just call the manager when they need to trigger a rename. This allows to easily add renaming to *pretty much anything* in the GUI just by calling the manager with the relevant parameters and adding a new type in confirmEditing() for the network packet.
- The priority fields have also been (partially) moved to a singleton manager controlled by the headers. This case is slightly different, as they still need to keep state and they use a native text field for convenience.

## [1.4.0] - 2026-03-04
### Added
- Add keybind for Subnet Overview toggle (default: back).
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ enable_junit_testing = true
show_testing_output = false

# Mod Information
mod_version = 1.4.0
mod_version = 1.5.0
root_package = com.cellterminal
mod_id = cellterminal
mod_name = Cell Terminal
Expand Down
65 changes: 65 additions & 0 deletions gradle/scripts/extra.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,68 @@ apply from: 'gradle/scripts/helpers.gradle'
base {
archivesName.set('cell-terminal')
}

// Task to print the changelog for CI usage (GitHub releases, etc.)
// Usage: ./gradlew -q printChangelog
tasks.register('printChangelog') {
group 'publishing'
description 'Prints the changelog for the current mod_version to stdout'
doLast {
if (!file('CHANGELOG.md').exists()) {
throw new GradleException('CHANGELOG.md does not exist!')
}


// Access the OutputType enum via the plugin's classloader at execution time
def changelogClass = project.buildscript.classLoader.loadClass('org.jetbrains.changelog.Changelog$OutputType')
def outputTypeMarkdown = changelogClass.enumConstants.find { it.name() == 'MARKDOWN' }

def cl = changelog.renderItem(
changelog.get(propertyString('mod_version')).withHeader(false).withEmptySections(false),
outputTypeMarkdown
)

if (cl.isEmpty()) {
throw new GradleException("No changelog section found for version ${propertyString('mod_version')}")
}

println cl
}
}

// Task to print the mod version for CI usage
// Usage: ./gradlew -q printVersion
tasks.register('printVersion') {
group 'publishing'
description 'Prints the mod_version to stdout'
doLast {
println propertyString('mod_version')
}
}

// Task to print the mod full version for CI usage
// Usage: ./gradlew -q printFullVersion
tasks.register('printFullVersion') {
group 'publishing'
description 'Prints the full mod version (mod_name + mod_version) to stdout'
doLast {
println "${propertyString('mod_name')} ${propertyString('mod_version')}"
}
}

// Task to infer release type from mod_version (release, beta, alpha)
// Usage: ./gradlew -q printReleaseType
tasks.register('printReleaseType') {
group 'publishing'
description 'Prints the inferred release type (release/beta/alpha) based on mod_version'
doLast {
def version = propertyString('mod_version').toLowerCase()
def releaseType = 'release'
if (version.contains('alpha') || version =~ /^\d+(\.\d+)*a\d*$/) {
releaseType = 'alpha'
} else if (version.contains('beta') || version.contains('rc') || version.contains('pre') || version =~ /^\d+(\.\d+)*b\d*$/) {
releaseType = 'beta'
}
println releaseType
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -328,9 +328,9 @@ private static boolean isStringIdentifier(String id) {
}

private static boolean isOperator(String s) {
return "=".equals(s) || "!=".equals(s) || "<".equals(s) || ">".equals(s)
return s.startsWith("=") || "!=".equals(s) || s.startsWith("<") || s.startsWith(">")
|| "<=".equals(s) || ">=".equals(s) || "~".equals(s)
|| s.startsWith("=") || s.startsWith("!") || s.startsWith("<") || s.startsWith(">") || s.startsWith("~");
|| s.startsWith("!") || s.startsWith("~");
}

private static String normalizeOperator(String s) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;

Expand Down Expand Up @@ -83,10 +82,7 @@ public void onRenderWorldLast(RenderWorldLastEvent event) {
long now = System.currentTimeMillis();

// Remove expired standard highlights
Iterator<Map.Entry<BlockPos, Long>> iter = highlightedBlocks.entrySet().iterator();
while (iter.hasNext()) {
if (iter.next().getValue() < now) iter.remove();
}
highlightedBlocks.entrySet().removeIf(blockPosLongEntry -> blockPosLongEntry.getValue() < now);

if (highlightedBlocks.isEmpty()) return;

Expand Down
Loading
Loading