SwissalpS / minetest_ultrasonic

Upgraded sonic screwdriver that works on frequencies we cannot hear
GNU Lesser General Public License v2.1
1 stars 0 forks source link

Setting/mode for screwdriver to use rotation callbacks #1

Open S-S-X opened 3 years ago

S-S-X commented 3 years ago

Feature suggestion for ultrasonic screwdriver: Could this also replace screwdriver:screwdriver completely by adding some kind of configuration option to enable rotation callbacks done by screwdriver:screwdriver.

SwissalpS commented 3 years ago

all three are based on same code, so I think I see what you are asking: make a screwdriver api for all three. Something where you could set parameters in tool definition. Like sound = nil or sound = { file = 'a.snd', gain = 3.4, distance = 10 } and also capabilities like max_charge / wear, toggle protection check etc. then do smth like: api.register_screwdriver(parameter_table)

S-S-X commented 3 years ago

Actually what I was thinking about would be single more powerful screwdriver that could have some in game way to change settings. Simply better sonic screwdriver, single tool that can be configured on field to work, depending on situation, like regular screwdriver or like sonic screwdriver. So something similar that technic replacer does to change modes in a way that single tool can also handle regular tool jobs.

SwissalpS commented 3 years ago

Yes, I remember now an earlier discussion. Someone felt it would be cool to set the settings with digiline.

Also similar to replacer, set a certain param2 you want. I feel that that particular function would better fit to replacer.

Instead of clu in recipe, we could put luac making it a digiline item. Would also require an adapter to place ultrasonic into, so settings can be written from a luac or formspec of adapter node.

S-S-X commented 3 years ago

Someone felt it would be cool to set the settings with digiline.

Of course wont work that well on field but would be good option if done well, only harder to do well than direct setting.

Would also require an adapter to place ultrasonic into

I would avoid adding adapter as separate node if possible in any way.

But yes it would need something, while adding extra nodes often not that good idea if there is already something that could be used so is there? Digistuff card reader might work, maybe even technic power banks if functionality extended a bit. Probably there's other options too but currently from things that could already provide full support only card reader comes into mind.

S-S-X commented 3 years ago

Power banks could actually be very good option here as those are portable power sources too and can also be used to recharge tools, even technic batteries would work but I think if powerbanks would have support for digiline forwarding it would work very well. Powerbanks could very easily, with minimal amount of added code, be able to forward digiline messages for items that are placed inside. Items, like sonic screwedriver, could then easily just implement digiline interface like any other digiline node.

Downside with powerbanks is that those are not nodes you usually would keep in fixed locations where you would keep your lua controllers or buttons that would be needed to actually send digiline messages.

Also what do you think about original request: having setting built into screwdriver to change modes in game?

SwissalpS commented 3 years ago

Yes, thought of card reader too. That would work without having to code formspec and separate node. @6r1d has already begun design for such a node. This tool configurator could be used for multiple tools, not only for screwdriver.

Power banks, you laid it out already. Don't know what to add to that.

I don't like the idea of a formspec on tool. I'd rather use aux1 button to change direction than to open a formspec.

There is another way to pull up formspec: point at air / vacuum and click, but that would be annoying when user misses node and formspec pops up.

S-S-X commented 3 years ago

I don't like the idea of a formspec on tool.

Same here and formspec would be last option I'd go with. There's no reason for settings to be in formspec other than in formspec you can fit a lot of stuff, unless a lot of stuff will be added would probably be better to forget about formspec and to make on/off settings described in original request.

S-S-X commented 3 years ago

This tool configurator could be used for multiple tools,

Curious about what are those tools?

SwissalpS commented 3 years ago

This tool configurator could be used for multiple tools,

Curious about what are those tools?

me too :D, currently I only have faint ideas. Some I'm not sure if they aren't too creative for non-creative servers. I have the feeling we are pushing it with the replacer. I don't want to end up re-creating world edit with special tools, but those are the ideas that linger most in my mind. Pattern sketchers and outlines for special shapes.

SwissalpS commented 3 years ago

there is another method to configure tools without formspec or additional node: crafting.

S-S-X commented 3 years ago

As there was again some talk about screwdrivers I'm returning here with possibly more clear explanation what I actually had in mind (not sure if it was completely clear yet...):

Single screwdriver that can do everything listed below:

So it would have multiple modes for operation, each screwdriver configurable in game through some method. Be it crafting with magnetic card or something else, formspec with checkboxes/buttons/lists, chat commands, special+left/right click to rotate modes or something else. But basically all in one tool that can be configured by player to work exactly how player wants it to work.

Is that something that could be in scope of this repository? Or should this be separate mod?

SwissalpS commented 3 years ago

General gist, yes. Have not looked at details yet. I really like being able to special-click to reverse direction. Maybe special+sneak-click could be used to open formspec?