-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feature-request/idea : rendering for node meta #11
Comments
There are multiple problems that would have to be worked around (and probably more that I'm not thinking of):
I don't think either of those are possible with node meta formspecs without jankiness (an old client would briefly see a formspec targeting newer clients before the server could respond to the right click event and update the formspec, and attempting to update them before players click on them would probably cause lots of useless form redraws and network traffic). Are there any advantages to node meta formspecs over calling If you were wanting to try using flow with node meta formspecs then maybe |
All good points. I think everything has been addressed. Perhaps just adding the recommendation to use interaction callbacks instead of node meta would be all that is needed. |
I'd be happy to implement this if you were wanting to try experimenting with node meta formspecs in flow_extras or another mod, though I'm not sure about including a node meta formspec API in flow itself (unless the implementation somehow works around most of the issues and isn't too complex, but some of the issues sound really hard to work around). |
I have experimented with this, though I didn't manage to find a solution to the issues I mentioned:
I also replicated the API ( |
I think that in this case, a field missing a name should error out if it requires one. Probably an assert. |
As I mentioned earlier, perhaps the better way is to not set the node fs string, and instead use node interaction callbacks. A wrapper function might still be nice 🤷♂️ but idk |
This isn't needed for anything right now [1], but I've been thinking about this:
It should be quite easy to make a very basic node meta renderer, akin to
:set_as_inventory_for
. As a security feature, it could simply setplayer
tonil
while calling the build function.That's the most basic level of support, but there are two other things that would be nice, but hard to support:
If either of the above are added, flow would have to re-render formspecs that need to be downgraded (or upgraded?) on occasion. My recommended fallback for this scenario is just always to assume the oldest formspec version flow supports, but have that variable overrideable or something so FS51 can make it lower. I don't know what to do about formspec size.
An unanswered question would be this: Would the player need to be passed to action callbacks? It would make sense if so, since the action likely needs to know who clicked it.
[1] It would be useful for mtg forks that use flow whenever possible. As of time of writing, I'm not aware of such a project. It would also be useful if someone, like me, made a mod to provide integration APIs between (my mod) Sway and MTG's chests. It would also be useful for things like flow-rewrites of Sokomine's chest mod, Hopper, or any other interactable voxel using node meta.
The text was updated successfully, but these errors were encountered: