[QUESTION] Is there a purpose in creating nodes for each item added to the inventory? #82
-
I believe that inventory only needs to add information about items by slots, creating a node for each item generates a lot of unnecessary information for the godot scene tree |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I made that design decision pretty early during development when the inspector part of the plugin still didn't exist (including the inventory editor, property editor, protoset editor etc.). Having inventory items represented as nodes made populating the inventories and editing item properties from the editor much easier. Another reason for this design was that it just seemed like the Godot-way of doing composition, as a lot of the engine components are added as child nodes (even ones that don't inherit from Now that editing items and inventories using special controls in the inspector is working decently, this design might not make a lot of sense any more. Reverting it could simplify parts of the implementation, but since the current logic revolves around items being nodes I don't expect it to be a simple task. It will definitely take some to analyze the current code and define all the steps required to pull it off and the potential problems. |
Beta Was this translation helpful? Give feedback.
I made that design decision pretty early during development when the inspector part of the plugin still didn't exist (including the inventory editor, property editor, protoset editor etc.). Having inventory items represented as nodes made populating the inventories and editing item properties from the editor much easier.
Another reason for this design was that it just seemed like the Godot-way of doing composition, as a lot of the engine components are added as child nodes (even ones that don't inherit from
Node3D
orCanvasItem
).Now that editing items and inventories using special controls in the inspector is working decently, this design might not make a lot of sense any more. Reverting…