Crafting Module Suggestion

Zaddo

Active member
I love the inventory system and I saw this opportunity to perhaps make it a little better. This is just a suggestion.

I have been building a customised crafting menu for the last few days. The core components are excellent and I haven't hit too many problems.

The one thing that has caused me some difficulty is the close integration with Panels. In my design, I have the crafting elements all on one Panel (still sticking with the underlying panel structure of the inventory system). But the crafting system requires the Quantity Picker panel to be separate. It wasn't difficult to customise some of the scripts to make this work on one panel.

I think with a couple minor tweaks to allow some of the panel actions to be turned off, the crafting system would allow more flexibility for different UI designs. I have kept the wiring in the components pretty much vanilla, using the existing components and subclassing to make changes.

I haven't kept close track, but I think the only changes I have had to make are:
- Change CraftingMenu.cs to not open/close the panel QuantityPickerPanel component is on.
- ConfirmCancelPanel.cs, option to not call close in the clicked events.
 
Last edited:
Ok,
I've added both suggested changes. I added a boolean for each of them such that you can choose to open/close or not individually. They'll be part of the update comming soon.


Code:
 [Tooltip("Close the quantity picker panel when the crafting menu is closed.")]
 [SerializeField] protected bool m_CloseQuantityPickerPanelOnClose = true;
 [Tooltip("Open the quantity picker panel when a crafting recipe has been clicked.")]
 [SerializeField] protected bool m_OpenQuantityPickerPanelOnRecipeClick = true;

Code:
[Tooltip("The confirm button and text.")]
[SerializeField] protected ButtonWithText m_Confirm;
[Tooltip("Close panel on confirm.")]
[SerializeField] protected bool m_CloseOnConfirm = true;
[Tooltip("The cancel button and text.")]
[SerializeField] protected ButtonWithText m_Cancel;
[Tooltip("Close panel on confirm.")]
[SerializeField] protected bool m_CloseOnCancel = true;
 
Top