digibuilder's People
digibuilder's Issues
Add commands for processing lists of positions/nodes
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"},
},
})
inventory can't be filled via tubes
it works with injectors but not tubes, is that intentionally?
changing the digiline channel fails to update in formspec
`dignode` command?
Having a way to remove nodes as well as placing them would be useful. I had assumed that one could simply setnode
the node to be removed with default:air, but that doesn't seem to be the case.
To prevent this effect from being too good, it could have a longer delay (0.8 seconds?)
Crash when recieving malformed digiline request
Crashes here when the node
field of the setnode
request is omitted:
2023-06-14 17:09:18: ERROR[Main]: ServerError: AsyncErr: Lua: Runtime error from mod '??' in callback environment_Step(): /data/world//worldmods/digibuilder/digiline.lua:161: attempt to concatenate field 'name' (a nil value)
2023-06-14 17:09:18: ERROR[Main]: stack traceback:
2023-06-14 17:09:18: ERROR[Main]: /data/world//worldmods/digibuilder/digiline.lua:161: in function 'action'
2023-06-14 17:09:18: ERROR[Main]: /data/world//worldmods/digicontrol/override.lua:45: in function 'f'
2023-06-14 17:09:18: ERROR[Main]: /data/world//worldmods/monitoring/metrictypes/counter.lua:43: in function 'transmit'
2023-06-14 17:09:18: ERROR[Main]: /data/world//worldmods/digicontrol/override.lua:78: in function 'f'
2023-06-14 17:09:18: ERROR[Main]: /data/world//worldmods/monitoring/metrictypes/counter.lua:43: in function 'receptor_send'
2023-06-14 17:09:18: ERROR[Main]: /data/world//worldmods/mooncontroller/controller.lua:761: in function </data/world//worldmods/mooncontroller/controller.lua:755>
2023-06-14 17:09:18: ERROR[Main]: /data/world//worldmods/mesecons/mesecons/actionqueue.lua:137: in function 'f'
2023-06-14 17:09:18: ERROR[Main]: /data/world//worldmods/monitoring/metrictypes/counter.lua:43: in function 'old_execute'
2023-06-14 17:09:18: ERROR[Main]: ...d//worldmods/mesecons_debug/overrides/mesecons_queue.lua:27: in function 'execute'
2023-06-14 17:09:18: ERROR[Main]: /data/world//worldmods/mesecons/mesecons/actionqueue.lua:111: in function </data/world//worldmods/mesecons/mesecons/actionqueue.lua:73>
2023-06-14 17:09:18: ERROR[Main]: /usr/local/share/minetest/builtin/game/register.lua:446: in function </usr/local/share/minetest/builtin/game/register.lua:432>
bad bad crash bug
digiline_send("digibuilder",{
pos = {x = 0, y = 1, z = 0},
name = "scifi_nodes:white2",
param2 = 255,
command = "setnode"
})
Crashes the server
Crash log - from pandorabox
2024-05-05 18:01:53: ERROR[Main]: ServerError: AsyncErr: Lua: Runtime error from mod '??' in callback environment_Step(): /data/world//worldmods/digibuilder/digiline.lua:218: attempt to index local 'dir' (a nil value)
2024-05-05 18:01:53: ERROR[Main]: stack traceback:
2024-05-05 18:01:53: ERROR[Main]: /data/world//worldmods/digibuilder/digiline.lua:218: in function 'action'
2024-05-05 18:01:53: ERROR[Main]: /data/world//worldmods/digicontrol/override.lua:45: in function 'f'
2024-05-05 18:01:53: ERROR[Main]: /data/world//worldmods/monitoring/metrictypes/counter.lua:43: in function 'transmit'
2024-05-05 18:01:53: ERROR[Main]: /data/world//worldmods/digicontrol/override.lua:78: in function 'f'
2024-05-05 18:01:53: ERROR[Main]: /data/world//worldmods/monitoring/metrictypes/counter.lua:43: in function 'receptor_send'
2024-05-05 18:01:53: ERROR[Main]: /data/world//worldmods/mooncontroller/controller.lua:714: in function </data/world//worldmods/mooncontroller/controller.lua:708>
2024-05-05 18:01:53: ERROR[Main]: /data/world//worldmods/mesecons/mesecons/actionqueue.lua:137: in function 'f'
2024-05-05 18:01:53: ERROR[Main]: /data/world//worldmods/monitoring/metrictypes/counter.lua:43: in function 'old_execute'
2024-05-05 18:01:53: ERROR[Main]: ...d//worldmods/mesecons_debug/overrides/mesecons_queue.lua:27: in function 'execute'
2024-05-05 18:01:53: ERROR[Main]: /data/world//worldmods/mesecons/mesecons/actionqueue.lua:111: in function 'globalstep'
2024-05-05 18:01:53: ERROR[Main]: /data/world//worldmods/monitoring/builtin/globalstep.lua:73: in function </data/world//worldmods/monitoring/builtin/globalstep.lua:55>
2024-05-05 18:01:53: ERROR[Main]: /usr/local/share/minetest/builtin/common/register.lua:26: in function </usr/local/share/minetest/builtin/common/register.lua:12>
Accidentally done this in the main pandorabox server, and reproduced it in the test server
Also param2 isn't used just for rotation, it can also be used for color, but i think it would be more fun if this bug was just... fixed rather than param2 setnode'ing being limited more oh wait no param2 is checked
Slabs not rotated correctly
example: scifi_nodes:slab_grey_1
placement issue (from discord)
code seems good to me, though it probably should use the on_place function to place the nodes, rather than minetest.set_node
also should check if the item type is a node
support for special nodes
Are there any intentions to add support for special nodes like:
- cables
- tubes
- liquids (they work, when owning player is online, but buckets are destroyed)
- wires (mesecon/digiline)
- luac
or is that up to user to write translation code?
well, cable-plates are a very special one
digibuilder allows getnode/setnode on places it shouldn't
nan=0/0
if event.type=="program" then
digiline_send("digibuilder",{
command="setnode",
pos={
x=0,y=0,z=nan
},
name="default:cobble",
param2=0
})
end
print(event)
actually builds the node (if the target position isn't protected or occupied)
what's going on here
digibuilder's https://github.com/BuckarooBanzay/digibuilder/blob/master/digiline_validate_pos.lua does not check for NaN
x<NaN = false
x>NaN = false
x==NaN = false
(so passes the max radius checks)
and minetest somehow interprets NaN as 0
so when pos={x=0,y=0,z=nan}
it will build at x=digibuilder's x,y= digibuilder's y, z=0
fix
simply check for nan
static formspec
@BuckarooBanzay you could make the formspec static if you used a variable reference, then you wouldn't need to update the formspec:
-"field[4.3,9;3.2,1;digiline_channel;Digiline channel;" .. (meta:get_string("channel") or "") .. "]" ..
+"field[4.3,9;3.2,1;digiline_channel;Digiline channel;${channel}]" ..
Originally posted by @OgelGames in pandorabox-io/pandorabox-mods#2668 (comment)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.