OK! Hard mode #godot challenge question:

Is there any way to set up a Resource with a signal that has a call bound?

By default, defining signals works fine but they cannot be bound in the editor. I have been using trashy workarounds. I would prefer to just bind the signal.

Ugh, the only answer I got to this was on BlueSky and was "why would you ever want something easy and useful? You should just do backflips like everyone else!"

I guess I'm glad for the silence here on Mastodon, at least it's not people telling me to not ask the question.

This is probably not Godot-specific, but I can't help except notice that whenever I ask a Godot question, 95% of the answers are about how I shouldn't have asked.

And then like 5% are "here's how:" and it's super easy.

Be part of the 5%.

Since it seems people don't know why you'd want this:

You have a Resource class: Potion.

How do you tell each type what it does?

Easiest way would be to bind arbitrary functions and args on a on_drunk Signal.

Otherwise you have to duplicate that functionality and it's either flabby or brittle. #godot

@view Can you have a kind of PotionManager, which job will be be to take a potion resource, figure out what to do and have all the signals connected to/from that manager ?
@uzakl You can, but the wiring ends up backwards. It's pretty clumsy.