working on a real texture for it, this is just the basic i am gonna jump off the web here at the library for the day wanted to post what i got so far. textures for this cube is harder than spriting. JMHO
Hmm, Not bad if you get the, node the right size I think it will go.
and i know you said you dont want to maintain the mod but it also has some sort of glitch where every few blocks it leavs and arch see attached image.
This is because ABMs are disabled when they are far from players. This decreases server load, but generates this kind of artifact.
I never found a work around that, maybe the ABM needs an "Before disable" callback. Something like that can only be implemented in the C++ side of things...
aldobr wrote:I never found a work around that, maybe the ABM needs an "Before disable" callback. Something like that can only be implemented in the C++ side of things...
minetest.after(time, func, ...) in lua doc will explain that it can be done without an abm.
on_construct = function(pos,node)
--regenerate plant only if exact location is not compromized
minetest.after(1, function()
local p = {x=pos.x,y-1=pos.y,z=pos.z}
local b = minetest.env:get_node(p).name
if (b ~= "air") then
minetest.env:add_node(p, node)
end
end)
end,
aldobr, i have a working example of the tbm using minetest.after()
That means that you are not required to stand near the tbm in order for it to keep on digging. Big win for large mining operations! With some changes to the formspec and placing items not on ground but in a chest this should improve performance and functionality. I will work on this today.
What is the essence of this mod? Should it place rails, torches and cobble floor or should this be configurable? What if i want to make a wood floor and no rail. I think this needs a formspec where one can determine the nodes that should be used and in how many cycles it should spawn.
Last edited by Bas080 on Sun Apr 14, 2013 13:18, edited 1 time in total.
I am changing the formspec to support an inventory where the digged nodes will be placed. Also working on supporting nodes that do not have a drop defined.
Anyways, I like the nodebox. however would be nice to have one that span almost all three blocks that the tbm digs.
edit:typo
Last edited by Bas080 on Sun Apr 14, 2013 14:55, edited 1 time in total.
Bas080 what happens when the TBM is outside player radius ?
It goes on indefinitely ?
What happens if it touches a unloaded map chunk ?
Player position information is lost, thats why i used an ABM.
What is the essence of this mod? Should it place rails, torches and cobble floor or should this be configurable? What if i want to make a wood floor and no rail. I think this needs a formspec where one can determine the nodes that should be used and in how many cycles it should spawn.
aldobr, the distance to which it digs is limited by the resources that are required to dig. Rails. cobble, torches and coal. I have edited the formspec to allow only one slot per resource and the rest an inventory to which the digged nodes are moved. THey are no longer dropped on the ground
I haven't got a download because it'sso simple but if you have pushable_blocks installed then you can get it to place monorails instead of normal rails. pushable_blocks adds 2 carts, 4 tracks and a couple of other things.Try it!
Does anyone have a copy of Bas80's init.lua file? The link to the Ubuntu pastebin has apparently expired. I can craft the tbm block, but attempting to click on it to load it with it's starting materials causes a lua error and Minetest crashes to the startup screen. I am using Minetest from git as of today.
basilgohar wrote:Does anyone have a copy of Bas80's init.lua file? The link to the Ubuntu pastebin has apparently expired. I can craft the tbm block, but attempting to click on it to load it with it's starting materials causes a lua error and Minetest crashes to the startup screen. I am using Minetest from git as of today.
Okay, in the version I got from Bas80, I've observed two bugs, at least one of which I saw elsewhere in this thread.
The first bug is the one where sometimes the machine only bores a single node, instead of nine, when going forward. Someone else commented that that seemed to be the case when the player was not near the machine while it was working. My observation somewhat confirms this, though I haven't sat there watching it long enough to rule out the possibility of it happening even when close-by and watching.
The second bug I've observed is that periodically, the machine will just change direction, for a reason I cannot yet determine. This can be either a 90 degree or a 180 degree turn (though I cannot rule-out 270, there's not really a way to tell that apart from a 90 degree turn). When the machines are placed next to each other, such that they clear our a contiguous area, then the "turn" happens the same time for both, and it's always 90 degrees. If they are spaced out such that they is a 1-node gap between the cleared areas, then the turn is always 180 degrees.
I haven't delved deeply into the code yet, as I've very little experience with lua, but I plan to take a closer look as I get more time. I just thought I'd bring up these issues first in case anyone knows of them and/or has a version that has them fixed.
Moving forward, is anyone interested in hosting this on Github? If no one else, then I will consider doing it, but I might just make a new version in that case, since I don't know who owns which parts of the code at this point.
Bas080 wrote:basilgohar, i don't mind if you host. Don't forget to say who made what. The nodebox/textures and those who contributed to the code.
Yeah, I guess the "who made what" part is what may be confusing. I might get a chance to look at it this weekend, since it's longer than usual. Alternatively, if I'm feeling ambitious, I might just write-up my own version, as I have a different idea that I might like to pursue. Assuming I don't have too much difficulty figuring-out lua.