Feruchemical Nicrosil Improvements
Changes proposed in this pull request (partially written by copilot...)
Client-Side Features & GUI
- The core functionality of this new Menu is to store and tap manifestations. This works for: Allomancy, Feruchemy, and Surgebinding. Sand Mastery is a special case, specifically updating the Ribbons attribute. Manifestations from Hemalurgy are ignored.
This pull request introduces several key improvements and new features, primarily focused on supporting special handling for Nicrosil items and enhancing the Feruchemy client GUI. The changes include updates to item registration, recipe and tag generation, and the addition of new GUI components for interacting with spiritweb powers. The most significant changes are grouped below:
Nicrosil Item Handling and Data Generation
- Added special handling for Nicrosil items in recipe and tag generation, using switch statements to allow future extensibility for unique metals. This affects how necklaces, rings, and bracelets are registered and crafted for Nicrosil, separating them from the generic metal item logic. [1] [2]
- Registered the Nicrosil bracelet and Bands of Mourning items with the Curios renderer to ensure proper client-side display.
Feruchemy Client GUI Enhancements
- Introduced new GUI classes:
SpiritwebButtonContainerandSpiritwebPowerButton, which allow for dynamic arrangement and rendering of power buttons in the spiritweb menu. These components support highlighting, icon rendering, and interaction logic. [1] [2] - Added a Nicrosil HUD overlay to the client, rendering spiritweb information below the debug text using Forge's GUI overlay system. This enables players to interact with Nicrosil-related powers directly from the HUD.
Codebase Consistency and Refactoring
- Updated imports and type checks to consistently include new item types (
ManifestationMetalCurioItem) alongside existing ones, improving maintainability and extensibility for future item additions. [1] [2] [3] [4]
Manifestation and Math Helper Improvements
- Corrected the manifestation ID assignments to maintain logical ordering and updated related enum comments for clarity. [1] [2]
- Refactored the
InverseLerpmethod inMathHelperfor improved readability and documentation, clarifying its purpose and parameter names.
These changes collectively improve the mod's support for special metals like Nicrosil, enhance the user interface for interacting with powers, and lay groundwork for future extensibility.
@leafreynolds This PR is officially ready for review. Please link it to https://github.com/leafreynolds/cosmere/issues/77.
Link to demo: https://discord.com/channels/828383636465123328/837601788755836948/1442981148631498953
Comments are acknowledged. I’m going to review and clean them up. Tbh, the way it was implemented was a real chore without a common interface to abstract granting manifestations across modules. I might pull it back and wait to properly demo that.
Starting a server crashes, here's the log:
https://mclo.gs/xviOMOY
This could just be me, of course.
More concrete, we usually allow inventory metalminds as well, while your nicrosil only seems to allow metalminds equipped in curio slots. It should be consistent with the rest of the mod, in my opinion. If it makes your UI work harder, then maybe we can use this in the interim, just have to ask Leaf lol
- OOPS I should’ve done better server testing. I’ll review that after work today.
- Id love to have a discussion on discord on whether or not metalminds in inventories can be used.
@Gerbagel The fixes are in! Metalminds in the inventory now work, and server now runs. I forgot to put a "client only" decorator for the openMenu function.