carenalgas / popochiu

Godot plugin to make point n' click games in a similar way to tools like Adventure Game Studio and Power Quest.
MIT License
177 stars 18 forks source link

Add a dropdown to Props' Inspector to define the `link_to_item` property #245

Open mapedorr opened 2 months ago

mapedorr commented 2 months ago

Benefit description

Instead of requiring developers to write the script_name of the inventory item they want to link a prop to (which is more prone to typos), it would be good if the property in the Inspector was a dropdown menu with the game's inventory items as options.

Solution description

An EditorInspectorPlugin can be created (prop_inspector_plugin.gd) to change the Control node used to render the link_to_item property to an OptionButton whose items are the inventory items in the game. This menu would be empty by default, and would show the option that matches the value of the link_to_item property (if any) of each prop.

Exclusions

None.

Implications

This won't require doing anything related to the Migrations tool.