Skip to content

Fix the scripting terminal showing disk -1, and update CyclopsCore - #99

Open
rubensworks wants to merge 3 commits into
master-1.21-ltsfrom
fix/no-disk
Open

rubensworks wants to merge 3 commits into
master-1.21-ltsfrom
fix/no-disk

Conversation

@rubensworks

@rubensworks rubensworks commented Oct 20, 2026 •

Copy link
Copy Markdown
Member

There are three standalone commits:

  1. Fix empty scripting drives exposing a disk with ID -1. With an empty Scripting Drive in the network, the terminal showed "Disk: -1" with an empty script list. Two bugs caused it:

    • ScriptingDriveNetworkElement added the drive's disk ID to the network even when the drive was empty (ID -1).
    • BlockEntityScriptingDrive.setExposedDiskId only removed the old disk when the new ID was -1. So inserting a disk into such a drive kept the stray -1, and swapping one disk directly for another kept both in the network.

    Drives now only add or remove real disk IDs. The new game test testScriptingDriveExposedDisks covers an empty drive, inserting a disk, swapping it and removing it. It fails on master with "Expected disks [] but got [-1]". Network disks are rebuilt when the world loads, so existing worlds are fixed too.

  2. Show a hint in the scripting terminal editor when no script is open. The empty editor now shows a hint for the next step, centered in the editing area:

    • no disks: "Insert a Scripting Disk into a connected Scripting Drive."
    • disk without scripts: "Click + to create a script."
    • disk with scripts, none open: "Select a script from the list."

    The unusable editor (including the line number gutter) and script list are darkened more clearly. The old overlay was barely visible because its shader color reduced the alpha to about 12%. Without disks, the disk field is empty instead of -1, and the "+" and open-folder buttons (which did nothing) are hidden.

  3. Update to CyclopsCore 1.30.0 (1.30.0-1205, the build of Show the bound key in key binding appendices CyclopsCore#255). It fixes the key binding labels in info book appendices. I checked the Editor Shortcuts section in-game: every binding shows its real key, including ALT + Up Arrow and F12.

Validation:

  • build passes, and runGameTestServer passes 27/27, including the new test.
  • In-game: all three hint states checked, and with a script open the terminal looks and works as before.

🤖 Generated with Claude Code

https://claude.ai/code/session_018MRyTdV3fSV5Q5NPGep4q9

An empty drive added disk -1 to the network, which the scripting terminal
then showed as an available disk. Replacing a disk in a drive by another
one also kept the old disk in the network. Drives now only expose the
disk they contain.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018MRyTdV3fSV5Q5NPGep4q9
@github-actions

github-actions Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Coverage Report for CI Build 39476691451

Coverage increased (+0.1%) to 43.876%

Details

  • Coverage increased (+0.1%) from the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • 251 coverage regressions across 4 files.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

251 previously-covered lines in 4 files lost coverage.

File Lines Losing Coverage Coverage
org/cyclops/integratedscripting/client/gui/container/ContainerScreenTerminalScripting.java 239 0.0%
org/cyclops/integratedscripting/inventory/container/ContainerTerminalScripting.java 5 39.66%
org/cyclops/integratedscripting/blockentity/BlockEntityScriptingDrive.java 4 74.58%
org/cyclops/integratedscripting/core/network/ScriptingDriveNetworkElement.java 3 75.0%

Coverage Stats

Coverage Status
Relevant Lines: 4198
Covered Lines: 1983
Line Coverage: 47.24%
Relevant Branches: 1974
Covered Branches: 725
Branch Coverage: 36.73%
Branches in Coverage %: Yes
Coverage Strength: 23.53 hits per line

💛 - Coveralls

@rubensworks
rubensworks force-pushed the fix/no-disk branch 2 times, most recently from 9d11c19 to bb4b564 Compare October 20, 2026 18:49
The empty editor now tells the player what to do next: insert a
Scripting Disk into a connected drive when there are no disks, click +
to create a script when the disk is empty, or select a script from the
list otherwise. The unusable editor and script list are also grayed out
more clearly. The create and open-folder buttons are hidden while there
are no disks, and the disk field no longer shows -1.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018MRyTdV3fSV5Q5NPGep4q9
This includes the fix for incorrect key binding labels in info book
appendices, such as the ones in the editor shortcuts section.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018MRyTdV3fSV5Q5NPGep4q9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants