From bf2350f5aa62a9a4369e8a9f9c0bc6087f713141 Mon Sep 17 00:00:00 2001 From: oilboi <47129783+oilboi@users.noreply.github.com> Date: Wed, 1 Jul 2020 10:58:56 -0400 Subject: [PATCH] Make redstone have 16 states, overhaul performance --- mods/redstone/button.lua | 8 +- mods/redstone/init.lua | 275 ++++++++++++------ mods/redstone/inverter.lua | 18 +- mods/redstone/lever.lua | 8 +- mods/redstone/player_detector.lua | 2 +- mods/redstone/repeater.lua | 23 +- mods/redstone/space_maker.lua | 36 ++- mods/redstone/textures/redstone_cross.png | Bin 2571 -> 1793 bytes mods/redstone/textures/redstone_dust_main.png | Bin 168 -> 1697 bytes .../textures/redstone_redstone_dust_line1.png | Bin 166 -> 0 bytes mods/redstone/textures/redstone_t.png | Bin 2571 -> 1800 bytes mods/redstone/textures/redstone_turn.png | Bin 2572 -> 1796 bytes mods/redstone/torch.lua | 13 +- 13 files changed, 255 insertions(+), 128 deletions(-) delete mode 100644 mods/redstone/textures/redstone_redstone_dust_line1.png diff --git a/mods/redstone/button.lua b/mods/redstone/button.lua index d1b96f8..42d50e6 100644 --- a/mods/redstone/button.lua +++ b/mods/redstone/button.lua @@ -53,9 +53,9 @@ minetest.register_node("redstone:button_off", { local dir = minetest.wallmounted_to_dir(node.param2) - redstone.inject(pos,{torch=9}) + redstone.inject(pos,{torch=16}) local pos2 = vector.add(dir,pos) - redstone.inject(pos2,{torch=9}) + redstone.inject(pos2,{torch=16}) redstone.update(pos) redstone.update(pos2) @@ -123,9 +123,9 @@ minetest.register_lbm({ local param2 = minetest.get_node(pos).param2 local dir = minetest.wallmounted_to_dir(param2) - redstone.inject(pos,{torch=9}) + redstone.inject(pos,{torch=16}) local pos2 = vector.add(dir,pos) - redstone.inject(pos2,{torch=9}) + redstone.inject(pos2,{torch=16}) minetest.after(0,function() redstone.update(pos) diff --git a/mods/redstone/init.lua b/mods/redstone/init.lua index 6bf60f6..1998fb4 100644 --- a/mods/redstone/init.lua +++ b/mods/redstone/init.lua @@ -22,6 +22,7 @@ end) -- math class local abs = math.abs local floor = math.floor +local ceil = math.ceil -- vector library local new_vec = vector.new @@ -83,6 +84,8 @@ dofile(path.."/capacitors.lua") --this is written out manually so that --math.abs is not needed local order = { + {x=0,y=0,z=0}, + {x=1, y=0, z=0}, {x=-1, y=0, z= 0}, {x=0, y=0, z=1}, {x= 0, y=0, z=-1}, @@ -125,19 +128,19 @@ local table_3d local temp_pool local function create_boundary_box(pos) table_3d = {} - for x = pos.x-9,pos.x+9 do + for x = pos.x-16,pos.x+16 do if pool[x] then - for y = pos.y-9,pos.y+9 do + for y = pos.y-16,pos.y+16 do if pool[x][y] then - for z = pos.z-9,pos.z+9 do + for z = pos.z-16,pos.z+16 do temp_pool = pool[x][y][z] if temp_pool then if not table_3d[x] then table_3d[x] = {} end if not table_3d[x][y] then table_3d[x][y] = {} end - if (x == pos.x-9 or x == pos.x+9 or - y == pos.y-9 or y == pos.y+9 or - z == pos.z-9 or z == pos.z+9) and + if (x == pos.x-16 or x == pos.x+16 or + y == pos.y-16 or y == pos.y+16 or + z == pos.z-16 or z == pos.z+16) and temp_pool.dust and temp_pool.dust > 1 then table_3d[x][y][z] = {torch=temp_pool.dust} else @@ -267,7 +270,7 @@ local directional_activator = function(pos) temp_pool = nil temp_pool2 = nil - --if not (pool[pos.x] and pool[pos.x][pos.y] and pool[pos.x][pos.y][pos.z]) then return end + if not (pool[pos.x] and pool[pos.x][pos.y] and pool[pos.x][pos.y][pos.z]) then return end temp_pool = pool[pos.x][pos.y][pos.z] @@ -309,34 +312,33 @@ end local i local index local passed_on_level -local function redstone_pathfinder(source,source_level,mem_map,output) - if not source_level then return end +local x,y,z +local function redstone_distribute(pos,power,mem_map,output) + + power = power - 1 + --directional torches if output then - i = output - if i and mem_map and mem_map[i.x] and mem_map[i.x][i.y] and mem_map[i.x][i.y][i.z] then - index = mem_map[i.x][i.y][i.z] - --dust - if index.dust then - passed_on_level = source_level - 1 - if passed_on_level > 0 then - mem_map[i.x][i.y][i.z].dust = passed_on_level - redstone_pathfinder(i,passed_on_level,mem_map,nil) - end + x=output.x + y=output.y + z=output.z + if mem_map.dust[x] and mem_map.dust[x][y] and mem_map.dust[x][y][z] then + if mem_map.dust[x][y][z].dust < power then + mem_map.dust[x][y][z].dust = power + redstone_distribute(new_vec(x,y,z),power,mem_map,nil) end end else --redstone and torch for _,order in pairs(order) do - i = add_vec(source,order) - if i and mem_map and mem_map[i.x] and mem_map[i.x][i.y] and mem_map[i.x][i.y][i.z] then - index = mem_map[i.x][i.y][i.z] - if index.dust then - passed_on_level = source_level - 1 - if passed_on_level > 0 and index.dust < source_level then - mem_map[i.x][i.y][i.z].dust = passed_on_level - redstone_pathfinder(i,passed_on_level,mem_map,nil) - end + i = add_vec(pos,order) + x=i.x + y=i.y + z=i.z + if mem_map.dust[x] and mem_map.dust[x][y] and mem_map.dust[x][y][z] then + if mem_map.dust[x][y][z].dust < power then + mem_map.dust[x][y][z].dust = power + redstone_distribute(new_vec(x,y,z),power,mem_map,nil) end end end @@ -371,38 +373,131 @@ end ]]-- sic em boy! local i local index -local function dust_sniff(pos,mem_map,boundary) - for _,order in pairs(order) do - i = add_vec(pos,order) +local function dust_sniff(pos,mem_map,boundary,single,origin,ignore) + if not single then + --print("all position index--") + for _,order in pairs(order) do + i = add_vec(pos,order) + + if not mem_map[i.x] then mem_map[i.x] = {} end + if not mem_map[i.x][i.y] then mem_map[i.x][i.y] = {} end + + if not mem_map[i.x][i.y][i.z] then + if i and boundary and boundary[i.x] and boundary[i.x][i.y] and boundary[i.x][i.y][i.z] then + index = boundary[i.x][i.y][i.z] + + if index.dust then + + mem_map[i.x][i.y][i.z] = true + + if not mem_map.dust[i.x] then mem_map.dust[i.x] = {} end + if not mem_map.dust[i.x][i.y] then mem_map.dust[i.x][i.y] = {} end + + mem_map.dust[i.x][i.y][i.z] = index + + dust_sniff(i,mem_map,boundary) + + elseif index.torch and index.torch > 1 then + if index.torch_directional and vec_equals(pos,index.output) then + + mem_map[i.x][i.y][i.z] = true + + if not mem_map.torch[i.x] then mem_map.torch[i.x] = {} end + if not mem_map.torch[i.x][i.y] then mem_map.torch[i.x][i.y] = {} end + + mem_map.torch[i.x][i.y][i.z] = index + + + elseif not index.torch_directional then + + mem_map[i.x][i.y][i.z] = true + + if not mem_map.torch[i.x] then mem_map.torch[i.x] = {} end + if not mem_map.torch[i.x][i.y] then mem_map.torch[i.x][i.y] = {} end + + mem_map.torch[i.x][i.y][i.z] = index + end + end + + if index.activator then + mem_map[i.x][i.y][i.z] = true + + if not mem_map.activator[i.x] then mem_map.activator[i.x] = {} end + if not mem_map.activator[i.x][i.y] then mem_map.activator[i.x][i.y] = {} end + + mem_map.activator[i.x][i.y][i.z] = index + elseif index.directional_activator and vec_equals(pos,index.input) then + + mem_map[i.x][i.y][i.z] = true + + if not mem_map.activator[i.x] then mem_map.activator[i.x] = {} end + if not mem_map.activator[i.x][i.y] then mem_map.activator[i.x][i.y] = {} end + + mem_map.activator[i.x][i.y][i.z] = index + end + end + end + end + else + --print("single position index") + + i = pos + if not mem_map[i.x] then mem_map[i.x] = {} end if not mem_map[i.x][i.y] then mem_map[i.x][i.y] = {} end if not mem_map[i.x][i.y][i.z] then - if i and boundary and boundary[i.x] and boundary[i.x][i.y] and boundary[i.x][i.y][i.z] then index = boundary[i.x][i.y][i.z] - if index.dust then - mem_map[i.x][i.y][i.z] = index - mem_map[i.x][i.y][i.z].sniffed = true - dust_sniff(i,mem_map,boundary) + mem_map[i.x][i.y][i.z] = true + + if not mem_map.dust[i.x] then mem_map.dust[i.x] = {} end + if not mem_map.dust[i.x][i.y] then mem_map.dust[i.x][i.y] = {} end + + mem_map.dust[i.x][i.y][i.z] = index - elseif index.directional_activator and vec_equals(pos,index.input) then - mem_map[i.x][i.y][i.z] = index - mem_map[i.x][i.y][i.z].sniffed = true + dust_sniff(i,mem_map,boundary) + elseif index.torch and index.torch > 1 then - if index.torch_directional and vec_equals(pos,index.output) then - mem_map[i.x][i.y][i.z] = index - mem_map[i.x][i.y][i.z].sniffed = true + if index.torch_directional and (vec_equals(origin,index.output) or ignore) then + + mem_map[i.x][i.y][i.z] = true + + if not mem_map.torch[i.x] then mem_map.torch[i.x] = {} end + if not mem_map.torch[i.x][i.y] then mem_map.torch[i.x][i.y] = {} end + + mem_map.torch[i.x][i.y][i.z] = index + + elseif not index.torch_directional then - mem_map[i.x][i.y][i.z] = index - mem_map[i.x][i.y][i.z].sniffed = true + + mem_map[i.x][i.y][i.z] = true + + if not mem_map.torch[i.x] then mem_map.torch[i.x] = {} end + if not mem_map.torch[i.x][i.y] then mem_map.torch[i.x][i.y] = {} end + + mem_map.torch[i.x][i.y][i.z] = index end - elseif index.activator then - mem_map[i.x][i.y][i.z] = index - mem_map[i.x][i.y][i.z].sniffed = true + end + + if index.activator then + mem_map[i.x][i.y][i.z] = true + + if not mem_map.activator[i.x] then mem_map.activator[i.x] = {} end + if not mem_map.activator[i.x][i.y] then mem_map.activator[i.x][i.y] = {} end + + mem_map.activator[i.x][i.y][i.z] = index + elseif index.directional_activator and (vec_equals(origin,index.input) or ignore) then + + mem_map[i.x][i.y][i.z] = true + + if not mem_map.activator[i.x] then mem_map.activator[i.x] = {} end + if not mem_map.activator[i.x][i.y] then mem_map.activator[i.x][i.y] = {} end + + mem_map.activator[i.x][i.y][i.z] = index end end end @@ -417,49 +512,63 @@ local power local boundary local dust_detected local dust_map -local count local pos3 local temp_pool3 +local directional local function calculate(pos,is_capacitor) if not is_capacitor then boundary = create_boundary_box(pos) dust_map = {} + dust_map.dust = {} + dust_map.torch = {} + dust_map.activator = {} + dust_detected = false - count = 0 - - --update needs to sniff it's own position + + directional = false + if boundary[pos.x] and boundary[pos.x][pos.y] and boundary[pos.x][pos.y][pos.z] then - if not dust_map[pos.x] then dust_map[pos.x] = {} end - if not dust_map[pos.x][pos.y] then dust_map[pos.x][pos.y] = {} end - dust_map[pos.x][pos.y][pos.z] = boundary[pos.x][pos.y][pos.z] + if boundary[pos.x][pos.y][pos.z].torch_directional or boundary[pos.x][pos.y][pos.z].directional_activator then + directional = true + end end - dust_sniff(pos,dust_map,boundary) - -- sniff all possible dust within boundaries - for _,pos2 in pairs(order) do - pos3 = add_vec(pos,pos2) - if boundary[pos3.x] and boundary[pos3.x][pos3.y] and boundary[pos3.x][pos3.y][pos3.z] and - not (dust_map[pos3.x] and dust_map[pos3.x][pos3.y] and dust_map[pos3.x][pos3.y][pos3.z] and dust_map[pos3.x][pos3.y][pos3.z].sniffed) then - temp_pool3 = boundary[pos3.x][pos3.y][pos3.z] - if temp_pool3.dust then - dust_sniff(pos3,dust_map,boundary) + if not directional then + dust_sniff(pos,dust_map,boundary) + for _,pos2 in pairs(order) do + pos3 = add_vec(pos,pos2) + if boundary[pos3.x] and boundary[pos3.x][pos3.y] and boundary[pos3.x][pos3.y][pos3.z] and + not (dust_map[pos3.x] and dust_map[pos3.x][pos3.y] and dust_map[pos3.x][pos3.y][pos3.z]) then + temp_pool3 = boundary[pos3.x][pos3.y][pos3.z] + if temp_pool3.dust then + dust_sniff(pos3,dust_map,boundary) + end end end - end + else + dust_sniff(pos,dust_map,boundary,true,pos,true) + local input = boundary[pos.x][pos.y][pos.z].input + local output = boundary[pos.x][pos.y][pos.z].output + + if input and boundary[input.x] and boundary[input.x][input.y] and boundary[input.x][input.y][input.z] then + dust_sniff(input,dust_map,boundary,true,pos) + end + if output and boundary[output.x] and boundary[output.x][output.y] and boundary[output.x][output.y][output.z] then + dust_sniff(output,dust_map,boundary,true,pos) + end + end --do torches - for x,datax in pairs(dust_map) do + for x,datax in pairs(dust_map.torch) do for y,datay in pairs(datax) do for z,data in pairs(datay) do - count = count + 1 if data.torch then if data.torch_directional then - redstone_pathfinder(new_vec(x,y,z),data.torch,dust_map,data.output) + redstone_distribute(new_vec(x,y,z),data.torch,dust_map,data.output) else - redstone_pathfinder(new_vec(x,y,z),data.torch,dust_map) - dust_map[x][y][z] = nil + redstone_distribute(new_vec(x,y,z),data.torch,dust_map) end end end @@ -467,22 +576,20 @@ local function calculate(pos,is_capacitor) end --set dust, set pool memory - for x,datax in pairs(dust_map) do + for x,datax in pairs(dust_map.dust) do for y,datay in pairs(datax) do for z,data in pairs(datay) do if data.dust and data.dust ~= data.origin then swap_node(new_vec(x,y,z),{name="redstone:dust_"..data.dust}) data_injection(new_vec(x,y,z),data) - --delete the data to speed up next loop - dust_map[x][y][z] = nil end end end end - + --activators --this must be run at the end - for x,datax in pairs(dust_map) do + for x,datax in pairs(dust_map.activator) do for y,datay in pairs(datax) do for z,data in pairs(datay) do if data.directional_activator then @@ -541,9 +648,9 @@ local function player_detector_calculation() max = 0 for _,player in ipairs(minetest.get_connected_players()) do pos2 = player:get_pos() - power = floor(10-vector_distance(pos2,pos)) - if power > 9 then - power = 9 + power = floor(17-vector_distance(pos2,pos)) + if power > 16 then + power = 16 elseif power < 0 then power = 0 end @@ -629,16 +736,17 @@ minetest.register_craftitem("redstone:dust", { end, }) ---8 power levels 8 being the highest -local color = 0 -for i = 0,8 do - local coloring = floor(color) +--15 power levels 15 being the highest +for i = 0,15 do + + local color = floor(255 * (i/15)) + minetest.register_node("redstone:dust_"..i,{ description = "Redstone Dust", wield_image = "redstone_dust_item.png", tiles = { - "redstone_dust_main.png^[colorize:red:"..coloring, "redstone_turn.png^[colorize:red:"..coloring, - "redstone_t.png^[colorize:red:"..coloring, "redstone_cross.png^[colorize:red:"..coloring + "redstone_dust_main.png^[colorize:red:"..color, "redstone_turn.png^[colorize:red:"..color, + "redstone_t.png^[colorize:red:"..color, "redstone_cross.png^[colorize:red:"..color }, power=i, drawtype = "raillike", @@ -664,7 +772,6 @@ for i = 0,8 do end, connects_to = {"group:redstone"}, }) - color= color +31.875 minetest.register_lbm({ name = "redstone:"..i, diff --git a/mods/redstone/inverter.lua b/mods/redstone/inverter.lua index a4cc2a3..4582d88 100644 --- a/mods/redstone/inverter.lua +++ b/mods/redstone/inverter.lua @@ -38,6 +38,7 @@ minetest.register_node("redstone:inverter_on", { name = "redstone:inverter_on", directional_activator = true, input = vector.subtract(pos,dir), + output = vector.add(pos,dir), dir = dir }) redstone.update(pos) @@ -57,13 +58,14 @@ redstone.register_activator({ local dir = minetest.facedir_to_dir(param2) redstone.inject(pos,{ name = "redstone:inverter_off", - torch = 9, + torch = 16, torch_directional = true, directional_activator = true, input = vector.subtract(pos,dir), output = vector.add(pos,dir), dir = dir }) + redstone.update(vector.add(pos,dir)) end }) @@ -79,6 +81,7 @@ minetest.register_lbm({ name = "redstone:inverter_on", directional_activator = true, input = vector.subtract(pos,dir), + output = vector.add(pos,dir), dir = dir }) end, @@ -98,7 +101,7 @@ minetest.register_lbm({ minetest.register_node("redstone:inverter_off", { description = "Redstone Inverter", tiles = {"repeater_off.png"}, - groups = {stone = 1, hard = 1, pickaxe = 1, hand = 4,attached_node = 1,redstone_activation_directional=1,torch_directional=1,redstone_power=9}, + groups = {stone = 1, hard = 1, pickaxe = 1, hand = 4,attached_node = 1,redstone_activation_directional=1,torch_directional=1,redstone_power=16}, sounds = main.stoneSound(), paramtype = "light", paramtype2 = "facedir", @@ -118,7 +121,7 @@ minetest.register_node("redstone:inverter_off", { local dir = minetest.facedir_to_dir(minetest.get_node(pos).param2) redstone.inject(pos,{ name = "redstone:inverter_off", - torch = 9, + torch = 16, torch_directional = true, directional_activator = true, input = vector.subtract(pos,dir), @@ -144,6 +147,7 @@ redstone.register_activator({ name = "redstone:inverter_on", directional_activator = true, input = vector.subtract(pos,dir), + output = vector.add(pos,dir), dir = dir }) redstone.update(vector.add(pos,dir)) @@ -159,16 +163,12 @@ minetest.register_lbm({ local dir = minetest.facedir_to_dir(minetest.get_node(pos).param2) redstone.inject(pos,{ name = "redstone:inverter_off", - torch = 9, + torch = 16, torch_directional = true, directional_activator = true, input = vector.subtract(pos,dir), output = vector.add(pos,dir), dir = dir }) - --redstone needs to warm up - minetest.after(0,function() - redstone.update(pos) - end) end, -}) \ No newline at end of file +}) diff --git a/mods/redstone/lever.lua b/mods/redstone/lever.lua index 8498c80..39d8ec3 100644 --- a/mods/redstone/lever.lua +++ b/mods/redstone/lever.lua @@ -64,9 +64,9 @@ minetest.register_lbm({ action = function(pos) local param2 = minetest.get_node(pos).param2 local dir = minetest.wallmounted_to_dir(param2) - redstone.inject(pos,{torch=9}) + redstone.inject(pos,{torch=16}) local pos2 = vector.add(dir,pos) - redstone.inject(pos2,{torch=9}) + redstone.inject(pos2,{torch=16}) minetest.after(0,function() redstone.update(pos) redstone.update(pos2) @@ -115,9 +115,9 @@ minetest.register_node("redstone:lever_off", { local dir = minetest.wallmounted_to_dir(node.param2) - redstone.inject(pos,{torch=9}) + redstone.inject(pos,{torch=16}) local pos2 = vector.add(dir,pos) - redstone.inject(pos2,{torch=9}) + redstone.inject(pos2,{torch=16}) redstone.update(pos) redstone.update(pos2) diff --git a/mods/redstone/player_detector.lua b/mods/redstone/player_detector.lua index bef44ab..7ece35d 100644 --- a/mods/redstone/player_detector.lua +++ b/mods/redstone/player_detector.lua @@ -4,7 +4,7 @@ minetest,ipairs,math minetest,ipairs,math --detects players and outputs accordingly -for i = 0,9 do +for i = 0,16 do minetest.register_node("redstone:player_detector_"..i, { description = "Redstone Player Detector", diff --git a/mods/redstone/repeater.lua b/mods/redstone/repeater.lua index 5120158..5582898 100644 --- a/mods/redstone/repeater.lua +++ b/mods/redstone/repeater.lua @@ -18,7 +18,7 @@ for level = 0,max_timer do minetest.register_node("redstone:repeater_on_"..level, { description = "Redstone Repeater", tiles = {"repeater_on.png"}, - groups = {stone = 1, hard = 1, pickaxe = 1, hand = 4,attached_node = 1,redstone_activation_directional=1,repeater_on=1,repeater=1,torch_directional=1,redstone_power=9,repeater_level=level}, + groups = {stone = 1, hard = 1, pickaxe = 1, hand = 4,attached_node = 1,redstone_activation_directional=1,repeater_on=1,repeater=1,torch_directional=1,redstone_power=16,repeater_level=level}, sounds = main.stoneSound(), paramtype = "light", paramtype2 = "facedir", @@ -48,7 +48,7 @@ minetest.register_node("redstone:repeater_on_"..level, { minetest.sound_play("lever", {pos=pos}) redstone.inject(pos,{ name = "redstone:repeater_on_"..newlevel, - torch = 9, + torch = 16, torch_directional = true, directional_activator = true, input = vector.subtract(pos,dir), @@ -65,10 +65,10 @@ minetest.register_node("redstone:repeater_on_"..level, { name = "redstone:repeater_off_"..level, directional_activator = true, input = vector.subtract(pos,dir), + output = vector.add(pos,dir), dir = dir }) redstone.update(pos) - redstone.update(vector.add(pos,dir)) end, after_destruct = function(pos, oldnode) @@ -80,7 +80,7 @@ minetest.register_node("redstone:repeater_on_"..level, { local dir = minetest.facedir_to_dir(minetest.get_node(pos).param2) redstone.inject(pos,{ name = "redstone:repeater_on_"..level, - torch = 9, + torch = 16, torch_directional = true, directional_activator = true, input = vector.subtract(pos,dir), @@ -110,17 +110,13 @@ minetest.register_lbm({ local dir = minetest.facedir_to_dir(minetest.get_node(pos).param2) redstone.inject(pos,{ name = "redstone:repeater_on_"..level, - torch = 9, + torch = 16, torch_directional = true, directional_activator = true, input = vector.subtract(pos,dir), output = vector.add(pos,dir), dir = dir }) - --redstone needs to warm up - minetest.after(0,function() - redstone.update(pos) - end) end, }) @@ -172,7 +168,7 @@ minetest.register_node("redstone:repeater_off_"..level, { local dir = minetest.facedir_to_dir(param2) redstone.inject(pos,{ name = "redstone:repeater_on_"..level, - torch = 9, + torch = 16, torch_directional = true, directional_activator = true, input = vector.subtract(pos,dir), @@ -180,7 +176,6 @@ minetest.register_node("redstone:repeater_off_"..level, { dir = dir }) redstone.update(pos) - redstone.update(vector.add(pos,dir)) end, on_rightclick = function(pos, node, clicker, itemstack, pointed_thing) @@ -195,6 +190,7 @@ minetest.register_node("redstone:repeater_off_"..level, { name = "redstone:repeater_off_"..newlevel, directional_activator = true, input = vector.subtract(pos,dir), + output = vector.add(pos,dir), dir = dir }) minetest.sound_play("lever", {pos=pos}) @@ -211,6 +207,7 @@ minetest.register_node("redstone:repeater_off_"..level, { name = "redstone:repeater_off_"..level, directional_activator = true, input = vector.subtract(pos,dir), + output = vector.add(pos,dir), dir = dir }) redstone.update(pos) @@ -241,10 +238,6 @@ minetest.register_lbm({ input = vector.subtract(pos,dir), dir = dir }) - --redstone needs a second to warm up - minetest.after(0,function() - redstone.update(pos) - end) end, }) diff --git a/mods/redstone/space_maker.lua b/mods/redstone/space_maker.lua index b56dbef..be38bdd 100644 --- a/mods/redstone/space_maker.lua +++ b/mods/redstone/space_maker.lua @@ -55,9 +55,39 @@ minetest.register_node("redstone:space", { -- obj:setvelocity({x=x, y=y, z=z}) --end end - end, - - + end, }) + +minetest.register_node("redstone:the_stone", { + description = "redstone ultimate", + tiles = {"redstone_dust_item.png"}, + groups = {stone = 1, hard = 1, pickaxe = 1, hand = 4,pathable = 1}, + sounds = main.stoneSound(), + after_place_node = function(pos, placer, itemstack, pointed_thing) + local min = vector.subtract(pos,50) + min.y = pos.y + local max = vector.add(pos,50) + max.y = pos.y + local vm = minetest.get_voxel_manip() + local emin, emax = vm:read_from_map(min,max) + local area = VoxelArea:new{MinEdge=emin, MaxEdge=emax} + local data = vm:get_data() + local content_id = minetest.get_name_from_content_id + + local y = pos.y + + for x = -50,50 do + for z = -50,50 do + local i = vector.add(pos,vector.new(x,0,z)) + i.y = pos.y + local p_pos = area:index(i.x,i.y,i.z) + data[p_pos] = minetest.get_content_id("redstone:dust_0") + redstone.inject(i,{dust=0}) + end + end + vm:set_data(data) + vm:write_to_map() + end, +}) diff --git a/mods/redstone/textures/redstone_cross.png b/mods/redstone/textures/redstone_cross.png index 0b23a20e72911f038798fc31bd5bc24ff2bee2eb..263a30db244fe6c4a9eb0b78ffa1eca8b459c9af 100644 GIT binary patch delta 1703 zcmV;Y23Yxv6oC$qBLV~iktH90Te9OQ4E<*nvjij|1k2%B)jR0rkHFwO``+YsYHC7k zVIhP#N5VGk_pfgL(H~k0#<2t+y|?;v(M3$!3HJEKc?av}eLdLSxzU?*098dQ>3Ed1 z?33#GGGVU)`Brbj8o{s}ZO_Xgjg?V5^*Tt^=33!IQL3y~gxCnk&U-i_pyNt<$-INwS@POPVxs~GRwN3@&Gt?J?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Tt7T zy!b17F|7v>?I*lTbh9Zwa*Fwng z(^!>TDk<9UAv4_h;(6WepG^(fDQ}+FYc2El@~0q&m@P+GAy6;N9!z^+fK{Cl{J0KI zZbMvG&)nOySb5iL#EG@nZ&p!{S&ai5w(D7q-9RD6zB8s(cS^fpj2+YevF)S}Lvbd0 zCh{T*^Qnt4_R_lFFFamK9LcM;cc(XZPpwJa4$D?i+nLGXLg*zR|C*q2xE ziOOlLWz5<2ZEdSggfZlFm`N5!_vA``M7E=8?*cVHpX@BuyXIDDp<=tuiz?au=AwYJ ze5S8uxHwml4w*Eq-7uGg#gc<3Yn#)<9uT4L3(3ZJm#VB1#yp33VLPK>iM8Z3UakHz z+L7GrQ5XNzxI2n* zp-Ku8R>w4VZ(3mLF6e_tY_>w=V9Osjzl95v$rK1fK!rIu9FBm?$rlcai;D#*DJlN}^!N9NbaZq8 zAP=B`D+2Y~V$hbB7J;UwCcx+O0dNi`0|R(Go&Y3}Mx#N%t$>)X9f^&N6@XX}2Q@M> z0%m4rz5v0B7z_rq1NHUw02l-U!Q`M2i9`rEqEILR#C|OX+WsQltn@Fd`1T-uyM@05 z{!a~Hb&v~TNrj$7kb}IuJYn(Q_kqk42n3%2aESl_ diff --git a/mods/redstone/textures/redstone_dust_main.png b/mods/redstone/textures/redstone_dust_main.png index 3219df3c4bb2520b57880e8e33639e7f5f566045..8c53367e9d9c61d8a1e4d79994b55087892cbe5f 100644 GIT binary patch delta 1682 zcmV;D25tGM0ig|$BYy+hdQ@0+Qek%>aB^>EX>4U6ba`-PAZ2)IW&i+q+Ray6a_lG! z{bv=k1SBB@%fURVW(TwUIoR0!NbXH{DsyX0Y+)fJ`5am8xc<-I!~KPWJqH)mQp_=W z93h9y1(W2DBkx!8VZW{$e@-6s?pk1|1X7M$E6ct>ueS|n41d}l^)9UyPRkKpj`u@m zAjes7 z+I}V2d5M^_sDmJ}z0J-ejB8K5q%xxbTBl+ShC~v;{ z4Wm*f1}no+phkrT^<7q~v*5Y2K{8jCU6;f-bDdmCn1cqJWNDJXS>^6Tpyn$V+T-Ru zUZsS{jbO?IXM`=k9PW3E?+iCaoe+^v7gorNXI&$W$$#9u!U}}YSiI>D@HrO!{;qyz zsRo!$m=hkb`0a49Dcx#IcAf=x3VFOjj&(k;u+C@r;c=`n+)7!DIhBZMg3SvsG*{wK~m|8TmWZ6oR6q2TxETxoF$(#i}P;<VASb2kJiZ_6cik{?65%vEwbA zn0guWhpgbwos;+FAT9gcODn~F)5{0>sw1#`h6k2sBJpPCekh@@91Yms)k8B?OO&{$l1;@{OhxP9~p_|^ijdxM$=>|}qxwx6c zW2<^KPZ7$ZRM@00a z_7T7vreD%+oh*ooI7$_ZV4<`XT6Hja=^r#PBq=VAf@{ISpT(+! zi?gl{u7V)=1LEZ9r060g-j@_w#CYNHKF+)6@ZNoZ(5N!a>KX?$-8R#SxRlGUNTFAR z5I`6M5M^c=$;?6)zV&ray;OHGo`2=v_h0nkiHR37asH*9dFXTK{Id5^+sx{WS zCx2n2pf6{*PHPwmEFy^%Bq*q%f+}ppXxB-xkf!svkAKMZr^uy{s{%%jd4Fs`gY5dj z|KRs*t>WZ_mlTNu-7k*wF#?2kfo9!tzK)BVfh)c3-)I0cpQP8@TJ#9$+XgPK z+nTZmTRswi0Dk}g24YJ`L;(K){{a7>y{D4^000SaNLh0L01FcU01FcV z0GgZ_00007bV*G`2jm9<3K*@}00Xb*% z-d(`r759A)m?(PQRn=yI;RGVG)*1ldIF9hM1!fMaYAL1f*=%F3M$O|bqz8z|VvOcN zmJzu;U#PW$h``L_NBqmzEJz|^r4+jjXsuz}wtGobRm(X~(>T0A?;Y25K}7CZ_zy3o?^#gMR?b>XY0?0&SpJ0-*-l;q0{w@2CbP0l+XkKiBdg< diff --git a/mods/redstone/textures/redstone_t.png b/mods/redstone/textures/redstone_t.png index 486e6e8c3f5edd726933fbcff50faf98af37100e..475eb5f822c86d35680ca2be1907d02228a41217 100644 GIT binary patch delta 1708 zcmV;d22=Tq6o?LxBLV~kktH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UDm&$H@|c^-zq_0+hsy}@Hp+UrNW%()umkLnOAEq zfn}YlhYm#!R23Z442gFcg!QkTZ9~;%XVB|iox7fp8wPII;%L9+N4DiP->20s-a1#% zxc=5PJP@|{Z4I$_uzh)VH2a&EQpgb2*N@yW@rE^5t2SZtt~=DgN&P^R&1m@5n%8sf zjGo^}?SqEZ#s4lZV>F_2uYJ#5SNQeJFUn!lWQkyi)vQ}X$Eh~=Mtlt!2nQ({^~KVM`a38I^KjE-g@Ne zlq1EAVnz^==37l(lkYjS-^9DjKInD1 z|J<2fx}DnffSxmNI3)4t#}vUFaplVEIvNe)w=W*PwJEV;O-6%`ay#IT>UgEgjC_6+eQZR*{ zl)>SBO%Hg-+WB~4u^VMKDoRe z8)J7Rj9VJ8wl1LS7@6f|c)OqX6BhEawz2@Y;8XtaPA)I}#!W4U20wONR+2SGiTV-V>UjUR}wyUcPV6j;IAOK&2 zrluwU4u|t4_~(+~+SAg~K3M?DgbP(9jS7b>L@v8c?ZJfJ7qw2hPpS4e0CZ z13(=><8{OZ{qMz~-QC@QqM{+(P%Un2U=QM_J~0sNDdl-K!AWF5{cZy@`~+|fU*Cw0b2H67hv0e zP5ylef6e{>zrpID7W|m`oO8m@_0O+Z*_3?M>_!TfQ^mK-u{2Q%qKFu aQ}{^@kTN9>59_j}K`M-;two)gNAe#B|8*Du diff --git a/mods/redstone/torch.lua b/mods/redstone/torch.lua index 6cd222b..31fb4d2 100644 --- a/mods/redstone/torch.lua +++ b/mods/redstone/torch.lua @@ -7,7 +7,6 @@ minetest.register_craftitem("redstone:torch", { wield_image = "redstone_torch.png", wield_scale = {x = 1, y = 1, z = 1 + 1/16}, liquids_pointable = false, - power = 9, on_place = function(itemstack, placer, pointed_thing) if pointed_thing.type ~= "node" then return itemstack @@ -47,12 +46,11 @@ minetest.register_node("redstone:torch_floor", { tiles = {"redstone_torch.png"}, paramtype = "light", paramtype2 = "none", - power = 9, sunlight_propagates = true, drop = "redstone:torch", walkable = false, light_source = 13, - groups = {choppy=2, dig_immediate=3, not_in_creative_inventory=1, attached_node=1, torch=1,redstone=1,redstone_torch=1,redstone_power=9}, + groups = {choppy=2, dig_immediate=3, not_in_creative_inventory=1, attached_node=1, torch=1,redstone=1,}, legacy_wallmounted = true, selection_box = { type = "fixed", @@ -60,7 +58,7 @@ minetest.register_node("redstone:torch_floor", { }, on_construct = function(pos) - redstone.inject(pos,{torch=9}) + redstone.inject(pos,{torch=16}) redstone.update(pos) end, after_destruct = function(pos, oldnode) @@ -82,8 +80,7 @@ minetest.register_node("redstone:torch_wall", { sunlight_propagates = true, walkable = false, light_source = 13, - power = 9, - groups = {choppy=2, dig_immediate=3, flammable=1, not_in_creative_inventory=1, attached_node=1, torch=1,redstone=1,redstone_torch=1,redstone_power=9}, + groups = {choppy=2, dig_immediate=3, flammable=1, not_in_creative_inventory=1, attached_node=1, torch=1,redstone=1,}, drop = "redstone:torch", selection_box = { type = "wallmounted", @@ -92,7 +89,7 @@ minetest.register_node("redstone:torch_wall", { wall_side = {-0.5, -0.3, -0.1, -0.2, 0.3, 0.1}, }, on_construct = function(pos) - redstone.inject(pos,{torch=9}) + redstone.inject(pos,{torch=16}) redstone.update(pos) end, after_destruct = function(pos, oldnode) @@ -108,6 +105,6 @@ minetest.register_lbm({ nodenames = {"redstone:torch_wall","redstone:torch_floor"}, run_at_every_load = true, action = function(pos) - redstone.inject(pos,{torch=9}) + redstone.inject(pos,{torch=16}) end, }) \ No newline at end of file -- 2.44.0