Closed S-S-X closed 3 years ago
The jumpdrive
compat for textline
calls after_place_node
: https://github.com/mt-mods/jumpdrive/blob/master/compat/textline.lua
-- refresh textline entities after the jump
minetest.override_item("textline:lcd", {
on_movenode = function(from_pos, to_pos)
minetest.after(1, function()
textline_def.after_place_node(to_pos)
end)
end
})
Which sets the param2, depending on the node's param2: https://github.com/gbl08ma/textline/blob/master/init.lua#L103-L109
after_place_node = function (pos, placer, itemstack)
local param2 = minetest.get_node(pos).param2
if param2 == 0 or param2 == 1 then
minetest.add_node(pos, {name = "textline:lcd", param2 = 3})
end
prepare_writing (pos)
end,
Which sets the param2, depending on the node's param2
Is there some real requirement / reason to actually do that?
edit. so it is prepare_writing(pos)
that must be called and it is local...
Which sets the param2, depending on the node's param2
Is there some real requirement / reason to actually do that?
Looks like it has some issues with param2 being 0 or 1 :shrug:
Moving the text entity is more elegant anyway, thanks @S-S-X :+1:
Looks like it has some issues with param2 being 0 or 1
Yeah it does and wont add new entity if oriented that way, however if entity is already available it works just fine. I just wanted my quarry info HUD to work :smile:
I was actually also thinking about new display for textline mod, some textline:hud where node would not be panel like but instead more like 3 nodes wide thin bar.
And it should not do that.