This changes the Interactable structure so that it can support more than one action. No UI / behavioral changes are coming with this.
Structurally this switches the action_verb / action pairing for default_verb / action_map letting us define a default action for an interactable as well as other actions that can be taken.
Nominally this shouldn't have been too complicated except that there is no reasonable inspector editor for a typed Dictionary so it was a huge pain to actually set up the objects. So we now have some custom inspector plugins to handle it:
TGOInteractableSecondaryActions is (poorly named and) responsible for letting you add new entries to the action_map
Interactable creates synthetic properties via _get_property_list so that you can edit each property as an Array which understands type constraints. Also if you delete the last element it removes the verb from action_map.
I tried to put some tooling in place that would migrate from action to action_map as far as what is saved into the .tscn and I think I got the migration part but I couldn't get action unwound such that it'd save as empty/removed from the tscn. The new plan is basically to wait and then delete it / let it fall out. In the meantime I have removed it from the inspector so that we stop using it.
This changes the Interactable structure so that it can support more than one action. No UI / behavioral changes are coming with this.
Structurally this switches the action_verb / action pairing for default_verb / action_map letting us define a default action for an interactable as well as other actions that can be taken.
Nominally this shouldn't have been too complicated except that there is no reasonable inspector editor for a typed Dictionary so it was a huge pain to actually set up the objects. So we now have some custom inspector plugins to handle it:
I tried to put some tooling in place that would migrate from action to action_map as far as what is saved into the .tscn and I think I got the migration part but I couldn't get action unwound such that it'd save as empty/removed from the tscn. The new plan is basically to wait and then delete it / let it fall out. In the meantime I have removed it from the inspector so that we stop using it.