DEV Community

John
John

Posted on

Dev Log 31 - Attachment Panel

🧾 Dev Log — October 11, 2025
Prefab Purged, Static Shrine Rises, Blackout Descends
Subtitle: Fusion Ritual Complete — Registry Bound, Resolver Awakened

🔮 Summary
The prefab-based attachment panel has been officially retired. I was working on this for a couple of days but I have changed direction away from the prefab set up.

In its place stands a static, Inspector-wired shrine panel this is now a permanent structure built for clarity, control, and mythic permanence. Slot references are now explicitly declared, eliminating prefab instantiation bugs and runtime ghosts.

A blackout overlay was added to enforce visual dominance. Loot panels now bow before the attachment ritual, hidden when summoned, restored only if deemed worthy. Panel hierarchy is enforced via transform.SetAsLastSibling() — the shrine always floats to the top.

The Close button was summoned and bound, finally offering a way out of the ritual without sacrificing a candidate.

A title text field was added to crown the panel with “Attachment Menu” bringing clarity to the ritual’s purpose.

And now, the fusion ritual is complete.

A centralized ItemAttachmentResolver script handles all fusion logic, querying the ItemRegistry for shrine-tier relics. Fused items are injected into the inventory, originals removed, and debug logs mythified.

✅ Tasks Completed

Replaced prefab-based panel with static Inspector-wired UniversalAttachmentPanel

Added blackout image overlay to visually suppress loot panels beneath

Implemented loot panel visibility tracking and restoration logic

Ensured attachment panel always renders on top via sibling sort

Added Close button with direct HidePanel() binding

Added title text field for panel header

Refactored ShowAttachmentOptions() and HidePanel() for shrine clarity

Confirmed full blackout logic and slot visibility control working in tandem

Created ItemAttachmentResolver.cs to handle fusion logic

Defined fusionMap with valid item pairings and resulting relic IDs

Integrated ItemRegistry for asset lookup and clone injection

Updated UniversalAttachmentPanel.cs to call resolver and inject fused item

Wired slot buttons to open correct popup panels (ConfirmPopupPanel vs CancelOnlyPopupPanel)

Renamed confirmButton to selectButton for clarity in UniversalAttachmentSlotUI.cs

Added SlotType enum to distinguish target vs candidate slots

Verified fusion works for:

attachable_gas_hob + personal_gas_canister_large → personal_gas_hob_attached_large

attachable_gas_hob + personal_gas_canister_regular → personal_gas_hob_attached_regular

🧪 Methods Used
Fusion Mapping: Defined valid fusion pairs in fusion map using (string, string) → string tuples

Registry Lookup: Used ItemRegistry.Instance.GetByID(...) to fetch fused assets

Interface Injection: Required all assets to implement IInjectableItem for GetItem() access

Panel Integration: Called ItemAttachmentResolver.TryResolveFusion(...) from ConfirmFusion() in the panel

Inventory Mutation: Injected fused item via PlayerInventoryManager.Instance.AddItemToFirstFreeSlot(...) Removed source items via RemoveItem(...)

Slot Wiring: Used Load(item, callback) to bind overlay buttons to popup triggers Slot 0 → opens CancelOnlyPopupPanel Slots 1–5 → open ConfirmPopupPanel

Debug Rituals: Added [Shrine] 🧬, [Shrine] ❌, and [Shrine] 🔗 logs for tracing fusion flow

📝 Notes
Loot panel visibility now fully automated — no UnityEvents, no manual toggling

Attachment panel now feels like a true shrine: static, layered, and self-aware

Fusion logic centralized, decoupled, and mythically expandable

Registry now acts as a relic vault — every asset preserved, every fusion traced

--

Continuing to adjust each item individually so there is a nice crisp tooltip for both loot and inventory panels, each item having their own manually injected button labels and function for each panel separately, so all logic lines up with no mistakes. Attachment , Take , Equip and Eat Buttons now all working flawlessly.

Next to adjust the discard, combine, drink and fill functions - and further cook/ clean / and camping/base systems. work on the cooking system, and the recipe system, will create a similar system to how the attachment system is working to create or combine items, Should be easier now with a solid blueprint reference in the attachment system.

“The shrine no longer flickers. The blackout holds. The slots await fusion. The ritual nears completion. The registry speaks. The resolver listens. The altar accepts its offering.”

Top comments (0)