don-tnowe / godot-wyvernbox-inventory

Action RPG-focused inventory system for Godot 3 and 4
MIT License
97 stars 4 forks source link

Allow item-specific custom actions via scripts #25

Open don-tnowe opened 10 months ago

don-tnowe commented 10 months ago

Submitted by Discord user.

There's no custom actions on items! And there should be. Because so many games have logic tied to items. Some can even be possible to be activated from the inventory!

For that, ItemType should store a script that can override methods:

All must return true if the input has been handled - which can, for example, prevent item grabbing and dropping.

don-tnowe commented 10 months ago

⚡ Custom actions with items are now doable

There are now signals that GrabbedItemStackView has that allow handling input onto inventories and items. Allows interception of the input, like when a ctrl-left-click would normally use the left-click action, but you want to do something else instead.

Although a system that lets the user give a script to each item would still be more discoverable.