mirror of
https://github.com/minetest-mods/mesecons.git
synced 2025-07-21 16:20:24 +02:00
Compare commits
2 Commits
68c1729990
...
e1cffdedbf
Author | SHA1 | Date | |
---|---|---|---|
e1cffdedbf | |||
d3aedd2b98 |
@ -1,6 +1,14 @@
|
|||||||
|
local selection_box = {
|
||||||
|
type = "fixed",
|
||||||
|
fixed = { -8/16, -8/16, -8/16, 8/16, -6/16, 8/16 }
|
||||||
|
}
|
||||||
|
|
||||||
local nodebox = {
|
local nodebox = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = {{-8/16, -8/16, -8/16, 8/16, -7/16, 8/16 }},
|
fixed = {
|
||||||
|
{ -8/16, -8/16, -8/16, 8/16, -7/16, 8/16 }, -- bottom slab
|
||||||
|
{ -6/16, -7/16, -6/16, 6/16, -6/16, 6/16 }
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
local function gate_rotate_rules(node, rules)
|
local function gate_rotate_rules(node, rules)
|
||||||
@ -68,7 +76,7 @@ local function register_gate(name, inputnumber, assess, recipe, description)
|
|||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
drop = basename.."_off",
|
drop = basename.."_off",
|
||||||
selection_box = nodebox,
|
selection_box = selection_box,
|
||||||
node_box = nodebox,
|
node_box = nodebox,
|
||||||
walkable = true,
|
walkable = true,
|
||||||
sounds = default.node_sound_stone_defaults(),
|
sounds = default.node_sound_stone_defaults(),
|
||||||
@ -78,8 +86,16 @@ local function register_gate(name, inputnumber, assess, recipe, description)
|
|||||||
inputnumber = inputnumber,
|
inputnumber = inputnumber,
|
||||||
after_dig_node = mesecon.do_cooldown,
|
after_dig_node = mesecon.do_cooldown,
|
||||||
},{
|
},{
|
||||||
tiles = {"jeija_microcontroller_bottom.png^".."jeija_gate_off.png^"..
|
tiles = {
|
||||||
"jeija_gate_"..name..".png"},
|
"jeija_microcontroller_bottom.png^".."jeija_gate_off.png^"..
|
||||||
|
"jeija_gate_output_off.png^".."jeija_gate_"..name..".png",
|
||||||
|
"jeija_microcontroller_bottom.png^".."jeija_gate_output_off.png^"..
|
||||||
|
"[transformFY",
|
||||||
|
"jeija_gate_side.png^".."jeija_gate_side_output_off.png",
|
||||||
|
"jeija_gate_side.png",
|
||||||
|
"jeija_gate_side.png",
|
||||||
|
"jeija_gate_side.png"
|
||||||
|
},
|
||||||
groups = {dig_immediate = 2, overheat = 1},
|
groups = {dig_immediate = 2, overheat = 1},
|
||||||
mesecons = { receptor = {
|
mesecons = { receptor = {
|
||||||
state = "off",
|
state = "off",
|
||||||
@ -89,8 +105,16 @@ local function register_gate(name, inputnumber, assess, recipe, description)
|
|||||||
action_change = update_gate
|
action_change = update_gate
|
||||||
}}
|
}}
|
||||||
},{
|
},{
|
||||||
tiles = {"jeija_microcontroller_bottom.png^".."jeija_gate_on.png^"..
|
tiles = {
|
||||||
"jeija_gate_"..name..".png"},
|
"jeija_microcontroller_bottom.png^".."jeija_gate_on.png^"..
|
||||||
|
"jeija_gate_output_on.png^".."jeija_gate_"..name..".png",
|
||||||
|
"jeija_microcontroller_bottom.png^".."jeija_gate_output_on.png^"..
|
||||||
|
"[transformFY",
|
||||||
|
"jeija_gate_side.png^".."jeija_gate_side_output_on.png",
|
||||||
|
"jeija_gate_side.png",
|
||||||
|
"jeija_gate_side.png",
|
||||||
|
"jeija_gate_side.png"
|
||||||
|
},
|
||||||
groups = {dig_immediate = 2, not_in_creative_inventory = 1, overheat = 1},
|
groups = {dig_immediate = 2, not_in_creative_inventory = 1, overheat = 1},
|
||||||
mesecons = { receptor = {
|
mesecons = { receptor = {
|
||||||
state = "on",
|
state = "on",
|
||||||
|
BIN
mesecons_gates/textures/jeija_gate_output_off.png
Normal file
BIN
mesecons_gates/textures/jeija_gate_output_off.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 98 B |
BIN
mesecons_gates/textures/jeija_gate_output_on.png
Normal file
BIN
mesecons_gates/textures/jeija_gate_output_on.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 99 B |
BIN
mesecons_gates/textures/jeija_gate_side.png
Normal file
BIN
mesecons_gates/textures/jeija_gate_side.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 136 B |
BIN
mesecons_gates/textures/jeija_gate_side_output_off.png
Normal file
BIN
mesecons_gates/textures/jeija_gate_side_output_off.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 109 B |
BIN
mesecons_gates/textures/jeija_gate_side_output_on.png
Normal file
BIN
mesecons_gates/textures/jeija_gate_side_output_on.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 110 B |
@ -285,7 +285,7 @@ function mesecon.mvps_move_objects(pos, dir, nodestack, movefactor)
|
|||||||
end
|
end
|
||||||
movefactor = movefactor or 1
|
movefactor = movefactor or 1
|
||||||
dir = vector.multiply(dir, movefactor)
|
dir = vector.multiply(dir, movefactor)
|
||||||
for id, obj in pairs(minetest.object_refs) do
|
for id, obj in pairs(minetest.get_objects_inside_radius(pos, #nodestack + 1)) do
|
||||||
local obj_pos = obj:get_pos()
|
local obj_pos = obj:get_pos()
|
||||||
local cbox = obj:get_properties().collisionbox
|
local cbox = obj:get_properties().collisionbox
|
||||||
local min_pos = vector.add(obj_pos, vector.new(cbox[1], cbox[2], cbox[3]))
|
local min_pos = vector.add(obj_pos, vector.new(cbox[1], cbox[2], cbox[3]))
|
||||||
|
Reference in New Issue
Block a user