Skip to content

feat: add notification for inventory key binding - #50

Merged
soloturn merged 1 commit into
developfrom
feat/add-notification-for-inventory-key
Sep 27, 2026
Merged

soloturn merged 1 commit into
developfrom
feat/add-notification-for-inventory-key

Conversation

@jdrueckert

Copy link
Copy Markdown
Member

No description provided.

@jdrueckert jdrueckert self-assigned this Oct 10, 2021
@soloturn

soloturn commented Aug 4, 2024

Copy link
Copy Markdown
Contributor

@jdrueckert this can be merged?

@jdrueckert

Copy link
Copy Markdown
Member Author

@jdrueckert this can be merged?

That PR is three years old and in draft mode so I don't think so 😅
Would need to revisit it and see where I left it off, but it's currently not on my priority list

@soloturn
soloturn force-pushed the feat/add-notification-for-inventory-key branch from ea6b783 to 44c4a23 Compare September 27, 2026 14:55
@coderabbitai

coderabbitai Bot commented Sep 27, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 1bc17382-0d53-4bf7-8f69-f820c6d3ac6c


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@soloturn
soloturn marked this pull request as ready for review September 27, 2026 14:55
@soloturn

Copy link
Copy Markdown
Contributor

Rebased onto current develop, fixed the resulting conflicts, and verified with :modules:Inventory:compileJava (BUILD SUCCESSFUL). Changes made getting this current:

  • Fixed import paths a stale rebase had guessed wrong (org.terasology.gestalt.entitysystem.event.ReceiveEvent, separate @Priority annotation).
  • Removed a dead addHUDElement("Inventory:EmptyPocketsNagWidget")" call — that UI asset was never created; the shared Notifications overlay already renders ShowNotificationEvent` without it.
  • Added the empty-inventory check in onLocalPlayerInitialized so the notification only shows when the inventory is actually empty.
  • Bumped module.txt to develop's current version.

Happy to have someone else look it over before merge.

@soloturn
soloturn force-pushed the feat/add-notification-for-inventory-key branch from 44c4a23 to 40d8b4b Compare September 27, 2026 15:07
@soloturn
soloturn requested a lite review from Copilot September 27, 2026 15:19

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Resolve the icon dependency and key-formatting issues, and add focused tests.

Review effort: Lite
Findings: 1 Medium severity

Open (1)
What changed in this PR

Adds an empty-inventory notification displaying the configured inventory key and dismissing when inventory opens.

Changes:

  • Adds notification lifecycle handling.
  • Formats and displays the inventory key binding.
  • Adds the Notifications module dependency.
File Summary
src/​main/​java/​org/​terasology/​module/​inventory/​systems/​InventoryUIClientSystem.java Implements notification display, dismissal, and key-binding formatting.
module.txt Declares the Notifications dependency.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Rebuilt on current develop rather than rebased — the original branch's diff was mostly stale package-rename noise plus one file (InventoryClientSystem.java) with zero real content changes.

- Shows an "Empty Pockets" notification via the Notifications module when the player spawns with an empty inventory; dismissed when they open the inventory.
- Dropped a dead addHUDElement("Inventory:EmptyPocketsNagWidget") call — no such UI asset exists; the Notifications module's shared overlay already renders ShowNotificationEvent without it.
- Added the empty-inventory check in onLocalPlayerInitialized so the notification only shows when the inventory is actually empty.
- getActivationKey: only convert a bound key's display name to a circled letter when it's actually A-Z; a digit or symbol key now renders as-is instead of an unrelated circled Unicode character (review feedback from Copilot).
- module.txt: added Notifications (required) and ModuleTestingEnvironment (optional) dependencies, with version ranges matching what's actually published in Artifactory.

Original feature by jdrueckert, branch feat/add-notification-for-inventory-key.

Co-Authored-By: soloturn <soloturn@gmail.com>
@soloturn
soloturn force-pushed the feat/add-notification-for-inventory-key branch from 40d8b4b to 648b141 Compare September 27, 2026 17:28

@soloturn soloturn left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rebuilt against current develop, verified with :modules:Inventory:compileJava (BUILD SUCCESSFUL), and fixed the Copilot finding on getActivationKey (non-letter keys were being mangled into unrelated circled Unicode characters — now only A-Z gets that treatment).

@soloturn
soloturn merged commit 75e6371 into develop Sep 27, 2026
1 of 3 checks passed
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.

3 participants