Skip to content
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

Add commands for processing lists of positions/nodes #16

Open
OgelGames opened this issue Jul 18, 2023 · 0 comments
Open

Add commands for processing lists of positions/nodes #16

OgelGames opened this issue Jul 18, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@OgelGames
Copy link
Contributor

Reading or placing a bunch of nodes requires complex programming to avoid overheating the controlling Luacontroller, and it also creates a lot of digiline messages.

I suggest adding commands to send the digibuilder a list of positions or nodes, with only a single message sent back after completion (or if anything fails). For reading it could be instant, and for placing it would respect the placement delay. (optionally with a "stop" command to abort placement)

Commands could be getnodes and setnodes, like this:

digiline_send("digibuilder", {
	command = "getnodes",
	positions = {
		{x = 1, y = 1, z = 1},
		{x = 2, y = 2, z = 2},
		{x = 3, y = 3, z = 3},
		{x = 4, y = 4, z = 4},
	},
})
digiline_send("digibuilder", {
	command = "setnodes",
	nodes = {
		{pos = {x = 1, y = 1, z = 1}, name = "default:dirt"},
		{pos = {x = 2, y = 2, z = 2}, name = "default:dirt"},
		{pos = {x = 3, y = 3, z = 3}, name = "default:dirt"},
		{pos = {x = 4, y = 4, z = 4}, name = "default:dirt"},
	},
})
@OgelGames OgelGames changed the title Add support for processing lists of commands Add support for processing lists of positions/nodes Jul 18, 2023
@OgelGames OgelGames changed the title Add support for processing lists of positions/nodes Add commands for processing lists of positions/nodes Jul 18, 2023
@BuckarooBanzay BuckarooBanzay added the enhancement New feature or request label Jul 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants