Staffs wrote:Oh plus how did you record it ?
I mean with what program. I tried recordmydesktop but it ended with a quite buggy black video :(
I used HyperCam2, but i don't know any good Recording-Program for Linux
Staffs wrote:Oh plus how did you record it ?
I mean with what program. I tried recordmydesktop but it ended with a quite buggy black video :(
Staffs wrote:sfan5 wrote:Just made a Piston Door: http://youtu.be/MUllePYjscY
I wanted to do that but then i'd have to fatten my house walls :(
Jeija wrote:@redcrab: I checked the latest git version and it works for me. Could you please post your error?
@Temperest: Nice work! But this can make the game crash when connecting a socket and an inverter. I guess you should make a delay (Minecraft redstone does not have torches/repeaters with delay for no reason)
I will include this in my mod as soon as this is fixed.
minetest.register_craft({
output = 'node "jeija_torches:mesecon_torch_off" 4',
recipe = {
{'node "jeija:mesecon_off"'},
{'craft "default:stick"'},
}
})
minetest.register_node("jeija_torches:mesecon_torch_off", {
drawtype = "torchlike",
tile_images = {"jeija_torches_off.png", "jeija_torches_off_ceiling.png", "jeija_torches_off_side.png"},
inventory_image = "jeija_torches_off.png",
sunlight_propagates = true,
walkable = false,
wall_mounted = true,
material = minetest.digprop_constanttime(0.5),
})
minetest.register_node("jeija_torches:mesecon_torch_on", {
drawtype = "torchlike",
tile_images = {"jeija_torches_on.png", "jeija_torches_on_ceiling.png", "jeija_torches_on_side.png"},
inventory_image = "jeija_torches_on.png",
paramtype = "light",
sunlight_propagates = true,
walkable = false,
wall_mounted = true,
material = minetest.digprop_constanttime(0.5),
light_source = LIGHT_MAX-5,
dug_item = 'node "jeija_torches:mesecon_torch_off" 1',
})
mesecon:add_receptor_node("jeija_torches:mesecon_torch_on")
mesecon:add_receptor_node_off("jeija_torches:mesecon_torch_off")
minetest.register_abm({
nodenames = {"jeija_torches:mesecon_torch_off","jeija_torches:mesecon_torch_on"},
interval = 0.2,
chance = 1,
action = function(pos, node, active_object_count, active_object_count_wider)
pa = {}
pa.x = 0
pa.y = 0
pa.z = 0
if node.param2 == 32 then
pa.z = -1
end
if node.param2 == 2 then
pa.x = -1
end
if node.param2 == 8 then
pa.y = -1
end
if node.param2 == 16 then
pa.z = 1
end
if node.param2 == 1 then
pa.x = 1
end
if node.param2 == 4 then
pa.y = 1
end
--print(node.param2 .. "," .. dump(pa))
local lp = {}
lp.x = pos.x + pa.x
lp.y = pos.y + pa.y
lp.z = pos.z + pa.z
if mesecon:check_if_turnon(lp) then
if node.name ~= "jeija_torches:mesecon_torch_off" then
minetest.env:add_node(pos, {name="jeija_torches:mesecon_torch_off",param2=node.param2})
mesecon:receptor_off(pos)
end
else
if node.name ~= "jeija_torches:mesecon_torch_on" then
minetest.env:add_node(pos, {name="jeija_torches:mesecon_torch_on",param2=node.param2})
mesecon:receptor_on(pos)
end
end
end
})
-- Param2 Table (Block Attached To)
-- 32 = z-1
-- 2 = x-1
-- 16 = z+1
-- 1 = x+1
-- 4 = y+1
-- 8 = y-1
00:49:39: ERROR[main]: Failed to load and run script from /home/minetest/minetest/bin/../data/mods/jeija/init.lua:
00:49:39: ERROR[main]: [LUA]
00:49:39: ERROR[main]: [LUA] cannot open ../data/mods/jeija/movestone.lua: No such file or directory
00:49:39: ERROR[main]: stack traceback:
00:49:39: ERROR[main]: [C]: in function 'dofile'
00:49:39: ERROR[main]: ...me/minetest/minetest/bin/../data/mods/jeija/init.lua:1618: in main chunk
00:49:39: ERROR[main]: [LUA]
00:49:39: ERROR[main]: Server: Failed to load and run /home/minetest/minetest/bin/../data/mods/jeija/init.lua
Jeija wrote:Is there any better way to get the right path by default? I don't want seperate mods for each of the files.
Jeija wrote:The configure looks like this:
X Plug
| Mesecon
O Inverter
It would be great if you fixed this problem... I will publish a new version of my mod today, with your part disabled by default. I will enable it as soon as it does not make the server crash,
Thanks for your contribution again!
--TEMPEREST-PLUG
minetest.register_node("jeija:mesecon_plug", {
drawtype = "raillike",
paramtype = "light",
is_ground_content = true,
tile_images = {"jeija_mesecon_plug.png"},
inventory_image = "jeija_mesecon_plug.png",
material = minetest.digprop_constanttime(0.1),
walkable = false,
selection_box = {
type = "fixed",
},
})
mesecon:register_on_signal_on(function(pos, node)
if node.name=="jeija:mesecon_plug" then
for x = -1,1 do
for z = -1,1 do
lpos = {x=pos.x+(x*2), y=pos.y, z=pos.z+(z*2)} --a node two nodes away from this one
lnode = minetest.env:get_node(lpos)
lnode1 = minetest.env:get_node({x=pos.x+x, y=pos.y, z=pos.z+z}) --a node between this node and the one two nodes away
if lnode1.name=="air" then --the node between the two is empty
if lnode.name=="jeija:mesecon_socket_off" then
minetest.env:add_node(lpos, {name="jeija:mesecon_socket_on"})
nodeupdate(lpos)
mesecon:receptor_on(lpos)
elseif lnode.name=="jeija:mesecon_inverter_on" then
minetest.env:add_node(lpos, {name="jeija:mesecon_inverter_off"})
nodeupdate(lpos)
mesecon:receptor_off(lpos)
end
end
end
end
end
end)
mesecon:register_on_signal_off(function(pos, node)
if node.name=="jeija:mesecon_plug" then
for x = -1,1 do
for z = -1,1 do
lpos = {x=pos.x+(x*2), y=pos.y, z=pos.z+(z*2)} --a node two nodes away from this one
lnode = minetest.env:get_node(lpos)
lnode1 = minetest.env:get_node({x=pos.x+x, y=pos.y, z=pos.z+z}) --a node between this node and the one two nodes away
if lnode1.name=="air" then --the node between the two is empty
if lnode.name=="jeija:mesecon_socket_on" then
minetest.env:add_node(lpos, {name="jeija:mesecon_socket_off"})
nodeupdate(lpos)
mesecon:receptor_off(lpos)
elseif lnode.name=="jeija:mesecon_inverter_off" then
minetest.env:add_node(lpos, {name="jeija:mesecon_inverter_on"})
nodeupdate(lpos)
mesecon:receptor_on(lpos)
end
end
end
end
end
end)
minetest.register_on_dignode(function(pos, oldnode, digger)
if oldnode.name == "jeija:mesecon_plug" then
for x = -1,1 do
for z = -1,1 do
lpos = {x=pos.x+(x*2), y=pos.y, z=pos.z+(z*2)} --a node two nodes away from this one
lnode = minetest.env:get_node(lpos)
lnode1 = minetest.env:get_node({x=pos.x+x, y=pos.y, z=pos.z+z}) --a node between this node and the one two nodes away
if lnode1.name=="air" then --the node between the two is empty
if lnode.name=="jeija:mesecon_socket_on" then
minetest.env:add_node(lpos, {name="jeija:mesecon_socket_off"})
nodeupdate(lpos)
mesecon:receptor_off(lpos)
elseif lnode.name=="jeija:mesecon_inverter_on" then
minetest.env:add_node(lpos, {name="jeija:mesecon_inverter_off"})
nodeupdate(lpos)
mesecon:receptor_off(lpos)
end
end
end
end
end
end)
minetest.register_craft({
output = 'node "jeija:mesecon_plug" 2',
recipe = {
{'', 'node "jeija:mesecon_off"', ''},
{'node "jeija:mesecon_off"', 'craft "default:steel_ingot"', 'node "jeija:mesecon_off"'},
{'', 'node "jeija:mesecon_off"', ''},
}
})
--TEMPEREST-SOCKET
minetest.register_node("jeija:mesecon_socket_off", {
drawtype = "raillike",
paramtype = "light",
is_ground_content = true,
tile_images = {"jeija_mesecon_socket_off.png"},
inventory_image = "jeija_mesecon_socket_off.png",
material = minetest.digprop_constanttime(0.1),
walkable = false,
selection_box = {
type = "fixed",
},
})
minetest.register_node("jeija:mesecon_socket_on", {
drawtype = "raillike",
paramtype = "light",
is_ground_content = true,
tile_images = {"jeija_mesecon_socket_on.png"},
inventory_image = "jeija_mesecon_socket_on.png",
material = minetest.digprop_constanttime(0.1),
walkable = false,
selection_box = {
type = "fixed",
},
dug_item='node "jeija:mesecon_socket_off" 1',
})
minetest.register_on_dignode(
function(pos, oldnode, digger)
if oldnode.name == "jeija:mesecon_socket_on" then
mesecon:receptor_off(pos)
end
end
)
mesecon:add_receptor_node("jeija:mesecon_socket_on")
mesecon:add_receptor_node_off("jeija:mesecon_socket_off")
minetest.register_craft({
output = 'node "jeija:mesecon_socket_off" 2',
recipe = {
{'', 'craft "default:steel_ingot"', ''},
{'craft "default:steel_ingot"', 'node "jeija:mesecon_off"', 'craft "default:steel_ingot"'},
{'', 'craft "default:steel_ingot"', ''},
}
})
--TEMPEREST-INVERTER
minetest.register_node("jeija:mesecon_inverter_off", {
drawtype = "raillike",
paramtype = "light",
is_ground_content = true,
tile_images = {"jeija_mesecon_inverter_off.png"},
inventory_image = "jeija_mesecon_inverter_off.png",
material = minetest.digprop_constanttime(0.1),
walkable = false,
selection_box = {
type = "fixed",
},
})
minetest.register_node("jeija:mesecon_inverter_on", {
drawtype = "raillike",
paramtype = "light",
is_ground_content = true,
tile_images = {"jeija_mesecon_inverter_on.png"},
inventory_image = "jeija_mesecon_inverter_on.png",
material = minetest.digprop_constanttime(0.1),
walkable = false,
selection_box = {
type = "fixed",
},
dug_item='node "jeija:mesecon_inverter_off" 1',
})
minetest.register_on_dignode(
function(pos, oldnode, digger)
if oldnode.name == "jeija:mesecon_inverter_on" then
mesecon:receptor_off(pos)
end
end
)
mesecon:add_receptor_node("jeija:mesecon_inverter_on")
mesecon:add_receptor_node_off("jeija:mesecon_inverter_off")
minetest.register_craft({
output = 'node "jeija:mesecon_inverter_off" 2',
recipe = {
{'node "jeija:mesecon_off"', 'craft "default:steel_ingot"', 'node "jeija:mesecon_off"'},
{'craft "default:steel_ingot"', '', 'craft "default:steel_ingot"'},
{'node "jeija:mesecon_off"', 'craft "default:steel_ingot"', 'node "jeija:mesecon_off"'},
}
})
Jeija wrote:Update to V 0.4
This new version doesn't really add new features but mainly bugfixes.
- Chests, Locked Chests and Furnaces can't be moved by pistons or movestones
- The near range/object detector only detects players (may be changed... tell me your oppinion)
- Temperest's code added, but turned off by default. You can turn it on by setting ENABLE_TEMPEREST in the init.lua to 1
- Some other bugfixes... I don't remember them all. One of them is that sticky movestones don't turn to normal ones when stopping.
Download link is in the first post above.
Do you have any feature requests? It would be nice if someone drew new textures for wireless_receivers/wireless_inverters/wireless_transmitters
Next Version, 0.41, will maybe add support for conduction through a wall and if it finally works, Temperest's code enabled by default.
Jeija wrote:This won't work. What happens if you dont directly connect plug and receiver? Like this:
X__
|
O__|
minetest.register_craft({
output = 'node "jeija:mesecon_torch_off" 4',
recipe = {
{'node "jeija:mesecon_off"'},
{'craft "default:stick"'},
}
})
minetest.register_node("jeija:mesecon_torch_off", {
drawtype = "torchlike",
tile_images = {"jeija_torches_off.png", "jeija_torches_off_ceiling.png", "jeija_torches_off_side.png"},
inventory_image = "jeija_torches_off.png",
sunlight_propagates = true,
walkable = false,
wall_mounted = true,
material = minetest.digprop_constanttime(0.5),
})
minetest.register_node("jeija:mesecon_torch_on", {
drawtype = "torchlike",
tile_images = {"jeija_torches_on.png", "jeija_torches_on_ceiling.png", "jeija_torches_on_side.png"},
inventory_image = "jeija_torches_on.png",
paramtype = "light",
sunlight_propagates = true,
walkable = false,
wall_mounted = true,
material = minetest.digprop_constanttime(0.5),
light_source = LIGHT_MAX-5,
dug_item = 'node "jeija:mesecon_torch_off" 1',
})
mesecon:add_receptor_node("jeija:mesecon_torch_on")
mesecon:add_receptor_node_off("jeija:mesecon_torch_off")
minetest.register_abm({
nodenames = {"jeija:mesecon_torch_off","jeija:mesecon_torch_on"},
interval = 0.2,
chance = 1,
action = function(pos, node, active_object_count, active_object_count_wider)
pa = {x=0, y=0, z=0}
if node.param2 == 32 then
pa.z = -1
end
if node.param2 == 2 then
pa.x = -1
end
if node.param2 == 8 then
pa.y = -1
end
if node.param2 == 16 then
pa.z = 1
end
if node.param2 == 1 then
pa.x = 1
end
if node.param2 == 4 then
pa.y = 1
end
if mesecon:is_power_on(pos, pa.x, pa.y, pa.z)==1 then
if node.name ~= "jeija:mesecon_torch_off" then
minetest.env:add_node(pos, {name="jeija:mesecon_torch_off",param2=node.param2})
mesecon:receptor_off({x=pos.x-pa.x, y=pos.y-pa.y, z=pos.z-pa.z})
end
else
if node.name ~= "jeija:mesecon_torch_on" then
minetest.env:add_node(pos, {name="jeija:mesecon_torch_on",param2=node.param2})
mesecon:receptor_on({x=pos.x-pa.x, y=pos.y-pa.y, z=pos.z-pa.z})
end
end
end
})
Jeija wrote:@Sfan5:
This code should work:Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
- Code: Select all
minetest.register_craft({
output = 'node "jeija:mesecon_torch_off" 4',
recipe = {
{'node "jeija:mesecon_off"'},
{'craft "default:stick"'},
}
})
minetest.register_node("jeija:mesecon_torch_off", {
drawtype = "torchlike",
tile_images = {"jeija_torches_off.png", "jeija_torches_off_ceiling.png", "jeija_torches_off_side.png"},
inventory_image = "jeija_torches_off.png",
sunlight_propagates = true,
walkable = false,
wall_mounted = true,
material = minetest.digprop_constanttime(0.5),
})
minetest.register_node("jeija:mesecon_torch_on", {
drawtype = "torchlike",
tile_images = {"jeija_torches_on.png", "jeija_torches_on_ceiling.png", "jeija_torches_on_side.png"},
inventory_image = "jeija_torches_on.png",
paramtype = "light",
sunlight_propagates = true,
walkable = false,
wall_mounted = true,
material = minetest.digprop_constanttime(0.5),
light_source = LIGHT_MAX-5,
dug_item = 'node "jeija:mesecon_torch_off" 1',
})
mesecon:add_receptor_node("jeija:mesecon_torch_on")
mesecon:add_receptor_node_off("jeija:mesecon_torch_off")
minetest.register_abm({
nodenames = {"jeija:mesecon_torch_off","jeija:mesecon_torch_on"},
interval = 0.2,
chance = 1,
action = function(pos, node, active_object_count, active_object_count_wider)
pa = {x=0, y=0, z=0}
if node.param2 == 32 then
pa.z = -1
end
if node.param2 == 2 then
pa.x = -1
end
if node.param2 == 8 then
pa.y = -1
end
if node.param2 == 16 then
pa.z = 1
end
if node.param2 == 1 then
pa.x = 1
end
if node.param2 == 4 then
pa.y = 1
end
if mesecon:is_power_on(pos, pa.x, pa.y, pa.z)==1 then
if node.name ~= "jeija:mesecon_torch_off" then
minetest.env:add_node(pos, {name="jeija:mesecon_torch_off",param2=node.param2})
mesecon:receptor_off({x=pos.x-pa.x, y=pos.y-pa.y, z=pos.z-pa.z})
end
else
if node.name ~= "jeija:mesecon_torch_on" then
minetest.env:add_node(pos, {name="jeija:mesecon_torch_on",param2=node.param2})
mesecon:receptor_on({x=pos.x-pa.x, y=pos.y-pa.y, z=pos.z-pa.z})
end
end
end
})
Unfortunately, it only checks for the block it is connected to, so this has to be a mesecon or a receptor. It would be amazing if you changed that. I will include this in my mod if you agree.
hijera wrote:v. 0.4 doesn't work on newest server (sources from 4 jan 2011 ) - it just won't start.
Users browsing this forum: No registered users and 31 guests