Updated pipeworks, mesecons, and fixed typo
- Fixing missing comma in building_blocks:sticks' new craft recipe - Updated pipeworks and mesecons : if changed breaks, revert this commit (works well on local server)
|
@ -98,7 +98,7 @@ minetest.register_craft({
|
|||
output = 'building_blocks:sticks',
|
||||
recipe = {
|
||||
{'group:stick', '', 'group:stick'},
|
||||
{'', 'group:stick', ''}
|
||||
{'', 'group:stick', ''},
|
||||
{'group:stick', '', 'group:stick'},
|
||||
}
|
||||
})
|
||||
|
|
|
@ -28,13 +28,11 @@ mesecon.on_placenode = function (pos, node)
|
|||
-- Effectors: Send changesignal and activate or deactivate
|
||||
if mesecon.is_effector(node.name) then
|
||||
local powered_rules = {}
|
||||
local unpowered_rules = {}
|
||||
|
||||
-- for each input rule, check if powered
|
||||
for _, r in ipairs(mesecon.effector_get_rules(node)) do
|
||||
local powered = mesecon.is_powered(pos, r)
|
||||
if powered then table.insert(powered_rules, r)
|
||||
else table.insert(unpowered_rules, r) end
|
||||
if powered then table.insert(powered_rules, r) end
|
||||
|
||||
local state = powered and mesecon.state.on or mesecon.state.off
|
||||
mesecon.changesignal(pos, node, r, state, 1)
|
||||
|
@ -44,10 +42,6 @@ mesecon.on_placenode = function (pos, node)
|
|||
for _, r in ipairs(powered_rules) do
|
||||
mesecon.activate(pos, node, r, 1)
|
||||
end
|
||||
else
|
||||
for _, r in ipairs(unpowered_rules) do
|
||||
mesecon.deactivate(pos, node, r, 1)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,191 +0,0 @@
|
|||
doors = {}
|
||||
|
||||
-- Registers a door - REDEFINITION ONLY | DOORS MOD MUST HAVE BEEN LOADED BEFORE
|
||||
-- name: The name of the door
|
||||
-- def: a table with the folowing fields:
|
||||
-- description
|
||||
-- inventory_image
|
||||
-- groups
|
||||
-- tiles_bottom: the tiles of the bottom part of the door {front, side}
|
||||
-- tiles_top: the tiles of the bottom part of the door {front, side}
|
||||
-- If the following fields are not defined the default values are used
|
||||
-- node_box_bottom
|
||||
-- node_box_top
|
||||
-- selection_box_bottom
|
||||
-- selection_box_top
|
||||
-- only_placer_can_open: if true only the player who placed the door can
|
||||
-- open it
|
||||
local function is_right(pos)
|
||||
local r1 = minetest.get_node({x=pos.x-1, y=pos.y, z=pos.z})
|
||||
local r2 = minetest.get_node({x=pos.x, y=pos.y, z=pos.z-1})
|
||||
if string.find(r1.name, "door_") or string.find(r2.name, "door_") then
|
||||
if string.find(r1.name, "_1") or string.find(r2.name, "_1") then
|
||||
return true
|
||||
else
|
||||
return false
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function doors:register_door(name, def)
|
||||
def.groups.not_in_creative_inventory = 1
|
||||
|
||||
local box = {{-0.5, -0.5, -0.5, 0.5, 0.5, -0.5+1.5/16}}
|
||||
|
||||
if not def.node_box_bottom then
|
||||
def.node_box_bottom = box
|
||||
end
|
||||
if not def.node_box_top then
|
||||
def.node_box_top = box
|
||||
end
|
||||
if not def.selection_box_bottom then
|
||||
def.selection_box_bottom= box
|
||||
end
|
||||
if not def.selection_box_top then
|
||||
def.selection_box_top = box
|
||||
end
|
||||
|
||||
local tt = def.tiles_top
|
||||
local tb = def.tiles_bottom
|
||||
|
||||
local function after_dig_node(pos, name)
|
||||
if minetest.get_node(pos).name == name then
|
||||
minetest.remove_node(pos)
|
||||
end
|
||||
end
|
||||
|
||||
local function on_rightclick(pos, dir, check_name, replace, replace_dir, params)
|
||||
pos.y = pos.y+dir
|
||||
if not minetest.get_node(pos).name == check_name then
|
||||
return
|
||||
end
|
||||
local p2 = minetest.get_node(pos).param2
|
||||
p2 = params[p2+1]
|
||||
|
||||
local meta = minetest.get_meta(pos):to_table()
|
||||
minetest.set_node(pos, {name=replace_dir, param2=p2})
|
||||
minetest.get_meta(pos):from_table(meta)
|
||||
|
||||
pos.y = pos.y-dir
|
||||
meta = minetest.get_meta(pos):to_table()
|
||||
minetest.set_node(pos, {name=replace, param2=p2})
|
||||
minetest.get_meta(pos):from_table(meta)
|
||||
|
||||
local snd_1 = "_close"
|
||||
local snd_2 = "_open"
|
||||
if params[1] == 3 then
|
||||
snd_1 = "_open"
|
||||
snd_2 = "_close"
|
||||
end
|
||||
|
||||
if is_right(pos) then
|
||||
minetest.sound_play("door"..snd_1, {pos = pos, gain = 0.3, max_hear_distance = 10})
|
||||
else
|
||||
minetest.sound_play("door"..snd_2, {pos = pos, gain = 0.3, max_hear_distance = 10})
|
||||
end
|
||||
end
|
||||
|
||||
local function on_mesecons_signal_open (pos, node)
|
||||
on_rightclick(pos, 1, name.."_t_1", name.."_b_2", name.."_t_2", {1,2,3,0})
|
||||
end
|
||||
|
||||
local function on_mesecons_signal_close (pos, node)
|
||||
on_rightclick(pos, 1, name.."_t_2", name.."_b_1", name.."_t_1", {3,0,1,2})
|
||||
end
|
||||
|
||||
local function check_player_priv(pos, player)
|
||||
if not def.only_placer_can_open then
|
||||
return true
|
||||
end
|
||||
local meta = minetest.get_meta(pos)
|
||||
local pn = player:get_player_name()
|
||||
return meta:get_string("doors_owner") == pn
|
||||
end
|
||||
|
||||
minetest.register_node(":"..name.."_b_1", {
|
||||
tiles = {tb[2], tb[2], tb[2], tb[2], tb[1], tb[1].."^[transformfx"},
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
drop = name,
|
||||
drawtype = "nodebox",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = def.node_box_bottom
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = def.selection_box_bottom
|
||||
},
|
||||
groups = def.groups,
|
||||
|
||||
after_dig_node = function(pos, oldnode, oldmetadata, digger)
|
||||
pos.y = pos.y+1
|
||||
after_dig_node(pos, name.."_t_1")
|
||||
end,
|
||||
|
||||
on_rightclick = function(pos, node, puncher)
|
||||
if check_player_priv(pos, puncher) then
|
||||
on_rightclick(pos, 1, name.."_t_1", name.."_b_2", name.."_t_2", {1,2,3,0})
|
||||
end
|
||||
end,
|
||||
|
||||
mesecons = {effector = {
|
||||
action_on = on_mesecons_signal_open
|
||||
}},
|
||||
|
||||
can_dig = check_player_priv,
|
||||
})
|
||||
|
||||
minetest.register_node(":"..name.."_b_2", {
|
||||
tiles = {tb[2], tb[2], tb[2], tb[2], tb[1].."^[transformfx", tb[1]},
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
drop = name,
|
||||
drawtype = "nodebox",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = def.node_box_bottom
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = def.selection_box_bottom
|
||||
},
|
||||
groups = def.groups,
|
||||
|
||||
after_dig_node = function(pos, oldnode, oldmetadata, digger)
|
||||
pos.y = pos.y+1
|
||||
after_dig_node(pos, name.."_t_2")
|
||||
end,
|
||||
|
||||
on_rightclick = function(pos, node, puncher)
|
||||
if check_player_priv(pos, puncher) then
|
||||
on_rightclick(pos, 1, name.."_t_2", name.."_b_1", name.."_t_1", {3,0,1,2})
|
||||
end
|
||||
end,
|
||||
|
||||
mesecons = {effector = {
|
||||
action_off = on_mesecons_signal_close
|
||||
}},
|
||||
|
||||
can_dig = check_player_priv,
|
||||
})
|
||||
end
|
||||
|
||||
doors:register_door("doors:door_wood", {
|
||||
description = "Wooden Door",
|
||||
inventory_image = "door_wood.png",
|
||||
groups = {snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=2,door=1},
|
||||
tiles_bottom = {"door_wood_b.png", "door_brown.png"},
|
||||
tiles_top = {"door_wood_a.png", "door_brown.png"},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
})
|
||||
|
||||
doors:register_door("doors:door_steel", {
|
||||
description = "Steel Door",
|
||||
inventory_image = "door_steel.png",
|
||||
groups = {snappy=1,bendy=2,cracky=1,melty=2,level=2,door=1},
|
||||
tiles_bottom = {"door_steel_b.png", "door_grey.png"},
|
||||
tiles_top = {"door_steel_a.png", "door_grey.png"},
|
||||
only_placer_can_open = true,
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
84
mods/mesecons/mesecons_doors/init.lua
Normal file
|
@ -0,0 +1,84 @@
|
|||
-- Modified, from minetest_game/mods/doors/init.lua
|
||||
local function on_rightclick(pos, dir, check_name, replace, replace_dir, params)
|
||||
pos.y = pos.y + dir
|
||||
if not minetest.get_node(pos).name == check_name then
|
||||
return
|
||||
end
|
||||
local p2 = minetest.get_node(pos).param2
|
||||
p2 = params[p2 + 1]
|
||||
|
||||
minetest.swap_node(pos, {name = replace_dir, param2 = p2})
|
||||
|
||||
pos.y = pos.y - dir
|
||||
minetest.swap_node(pos, {name = replace, param2 = p2})
|
||||
|
||||
if (minetest.get_meta(pos):get_int("right") ~= 0) == (params[1] ~= 3) then
|
||||
minetest.sound_play("door_close", {pos = pos, gain = 0.3, max_hear_distance = 10})
|
||||
else
|
||||
minetest.sound_play("door_open", {pos = pos, gain = 0.3, max_hear_distance = 10})
|
||||
end
|
||||
end
|
||||
|
||||
local function meseconify_door(name)
|
||||
if not minetest.registered_items[name] then return end
|
||||
|
||||
local function toggle_state1 (pos, node)
|
||||
on_rightclick(pos, 1, name.."_t_1", name.."_b_2", name.."_t_2", {1,2,3,0})
|
||||
end
|
||||
|
||||
local function toggle_state2 (pos, node)
|
||||
on_rightclick(pos, 1, name.."_t_2", name.."_b_1", name.."_t_1", {3,0,1,2})
|
||||
end
|
||||
|
||||
minetest.override_item(name.."_b_1", {
|
||||
mesecons = {effector = {
|
||||
action_on = toggle_state1,
|
||||
action_off = toggle_state1,
|
||||
rules = mesecon.rules.pplate
|
||||
}},
|
||||
})
|
||||
|
||||
minetest.override_item(name.."_b_2", {
|
||||
mesecons = {effector = {
|
||||
action_on = toggle_state2,
|
||||
action_off = toggle_state2,
|
||||
rules = mesecon.rules.pplate
|
||||
}},
|
||||
})
|
||||
end
|
||||
|
||||
meseconify_door("doors:door_wood")
|
||||
meseconify_door("doors:door_steel")
|
||||
meseconify_door("doors:door_glass")
|
||||
meseconify_door("doors:door_obsidian_glass")
|
||||
|
||||
-- Trapdoor
|
||||
local function trapdoor_switch(pos, node)
|
||||
local state = minetest.get_meta(pos):get_int("state")
|
||||
|
||||
if state == 1 then
|
||||
minetest.sound_play("doors_door_close", {pos = pos, gain = 0.3, max_hear_distance = 10})
|
||||
minetest.set_node(pos, {name="doors:trapdoor", param2 = node.param2})
|
||||
else
|
||||
minetest.sound_play("doors_door_open", {pos = pos, gain = 0.3, max_hear_distance = 10})
|
||||
minetest.set_node(pos, {name="doors:trapdoor_open", param2 = node.param2})
|
||||
end
|
||||
|
||||
minetest.get_meta(pos):set_int("state", state == 1 and 0 or 1)
|
||||
end
|
||||
|
||||
if minetest.registered_nodes["doors:trapdoor"] then
|
||||
minetest.override_item("doors:trapdoor", {
|
||||
mesecons = {effector = {
|
||||
action_on = trapdoor_switch,
|
||||
action_off = trapdoor_switch
|
||||
}},
|
||||
})
|
||||
|
||||
minetest.override_item("doors:trapdoor_open", {
|
||||
mesecons = {effector = {
|
||||
action_on = trapdoor_switch,
|
||||
action_off = trapdoor_switch
|
||||
}},
|
||||
})
|
||||
end
|
|
@ -41,7 +41,7 @@ minetest.register_node("mesecons_extrawires:crossover_off", {
|
|||
{ -3/32, -17/32, 6/32, 3/32, -13/32, 16/32+0.001 },
|
||||
},
|
||||
},
|
||||
groups = {dig_immediate=3, mesecon=3, mesecon_conductor_craftable=1},
|
||||
groups = {dig_immediate=3, mesecon=3},
|
||||
mesecons = {
|
||||
conductor = {
|
||||
states = crossover_states,
|
||||
|
|
|
@ -65,7 +65,7 @@ minetest.register_node("mesecons_extrawires:tjunction_off", {
|
|||
sunlight_propagates = true,
|
||||
selection_box = tjunction_selectionbox,
|
||||
node_box = tjunction_nodebox,
|
||||
groups = {dig_immediate = 3, mesecon_conductor_craftable=1},
|
||||
groups = {dig_immediate = 3},
|
||||
mesecons = {conductor =
|
||||
{
|
||||
state = mesecon.state.off,
|
||||
|
|
|
@ -4,24 +4,17 @@
|
|||
-- (does not work with other liquids)
|
||||
|
||||
minetest.register_node("mesecons_hydroturbine:hydro_turbine_off", {
|
||||
drawtype = "nodebox",
|
||||
drawtype = "mesh",
|
||||
mesh = "jeija_hydro_turbine.obj",
|
||||
tiles = {"jeija_hydro_turbine_off.png"},
|
||||
inventory_image = "jeija_hydro_turbine_inv.png",
|
||||
wield_scale = {x=0.75, y=0.75, z=0.75},
|
||||
groups = {dig_immediate=2},
|
||||
description="Water Turbine",
|
||||
paramtype = "light",
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {{-0.5, -0.5, -0.5, 0.5, 0.5, 0.5},
|
||||
{-0.15, 0.5, -0.15, 0.15, 1.45, 0.15},
|
||||
{-0.45, 1.15, -0.1, 0.45, 1.45, 0.1},
|
||||
{-0.1, 1.15, -0.45, 0.1, 1.45, 0.45}},
|
||||
},
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {{-0.5, -0.5, -0.5, 0.5, 0.5, 0.5},
|
||||
{-0.15, 0.5, -0.15, 0.15, 1.45, 0.15},
|
||||
{-0.45, 1.15, -0.1, 0.45, 1.45, 0.1},
|
||||
{-0.1, 1.15, -0.45, 0.1, 1.45, 0.45}},
|
||||
fixed = { -0.5, -0.5, -0.5, 0.5, 1.5, 0.5 },
|
||||
},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
mesecons = {receptor = {
|
||||
|
@ -30,25 +23,18 @@ minetest.register_node("mesecons_hydroturbine:hydro_turbine_off", {
|
|||
})
|
||||
|
||||
minetest.register_node("mesecons_hydroturbine:hydro_turbine_on", {
|
||||
drawtype = "nodebox",
|
||||
drawtype = "mesh",
|
||||
mesh = "jeija_hydro_turbine.obj",
|
||||
wield_scale = {x=0.75, y=0.75, z=0.75},
|
||||
tiles = {"jeija_hydro_turbine_on.png"},
|
||||
inventory_image = "jeija_hydro_turbine_inv.png",
|
||||
drop = "mesecons_hydroturbine:hydro_turbine_off 1",
|
||||
groups = {dig_immediate=2,not_in_creative_inventory=1},
|
||||
description="Water Turbine",
|
||||
paramtype = "light",
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {{-0.5, -0.5, -0.5, 0.5, 0.5, 0.5},
|
||||
{-0.15, 0.5, -0.15, 0.15, 1.45, 0.15},
|
||||
{-0.5, 1.15, -0.1, 0.5, 1.45, 0.1},
|
||||
{-0.1, 1.15, -0.5, 0.1, 1.45, 0.5}},
|
||||
},
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {{-0.5, -0.5, -0.5, 0.5, 0.5, 0.5},
|
||||
{-0.15, 0.5, -0.15, 0.15, 1.45, 0.15},
|
||||
{-0.5, 1.15, -0.1, 0.5, 1.45, 0.1},
|
||||
{-0.1, 1.15, -0.5, 0.1, 1.45, 0.5}},
|
||||
fixed = { -0.5, -0.5, -0.5, 0.5, 1.5, 0.5 },
|
||||
},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
mesecons = {receptor = {
|
||||
|
|
|
@ -0,0 +1,416 @@
|
|||
# Blender v2.69 (sub 0) OBJ File: 'mesecons-water-turbine.blend'
|
||||
# www.blender.org
|
||||
o Cylinder.002_Cylinder.003
|
||||
v 0.000000 0.500000 -0.150000
|
||||
v 0.000000 0.562500 -0.150000
|
||||
v 0.106066 0.500000 -0.106066
|
||||
v 0.106066 0.562500 -0.106066
|
||||
v 0.150000 0.500000 0.000000
|
||||
v 0.150000 0.562500 0.000000
|
||||
v 0.106066 0.500000 0.106066
|
||||
v 0.106066 0.562500 0.106066
|
||||
v -0.000000 0.500000 0.150000
|
||||
v -0.000000 0.562500 0.150000
|
||||
v -0.106066 0.500000 0.106066
|
||||
v -0.106066 0.562500 0.106066
|
||||
v -0.150000 0.500000 -0.000000
|
||||
v -0.150000 0.562500 -0.000000
|
||||
v -0.106066 0.500000 -0.106066
|
||||
v -0.106066 0.562500 -0.106066
|
||||
v 0.097545 0.625000 -0.490393
|
||||
v -0.097545 0.625000 -0.490393
|
||||
v -0.277785 0.625000 -0.415735
|
||||
v -0.415735 0.625000 -0.277785
|
||||
v -0.490393 0.625000 -0.097545
|
||||
v -0.490393 0.625000 0.097545
|
||||
v -0.415735 0.625000 0.277785
|
||||
v -0.277785 0.625000 0.415735
|
||||
v -0.097545 0.625000 0.490393
|
||||
v 0.097545 0.625000 0.490393
|
||||
v 0.277785 0.625000 0.415735
|
||||
v 0.415735 0.625000 0.277785
|
||||
v 0.490393 0.625000 0.097545
|
||||
v 0.490393 0.625000 -0.097545
|
||||
v 0.415735 0.625000 -0.277785
|
||||
v 0.277785 0.625000 -0.415735
|
||||
v 0.097545 0.656250 -0.490393
|
||||
v -0.097545 0.656250 -0.490393
|
||||
v -0.277785 0.656250 -0.415735
|
||||
v -0.415735 0.656250 -0.277785
|
||||
v -0.490393 0.656250 -0.097545
|
||||
v -0.490393 0.656250 0.097545
|
||||
v -0.415735 0.656250 0.277785
|
||||
v -0.277785 0.656250 0.415735
|
||||
v -0.097545 0.656250 0.490393
|
||||
v 0.097545 0.656250 0.490393
|
||||
v 0.277785 0.656250 0.415735
|
||||
v 0.415735 0.656250 0.277785
|
||||
v 0.490393 0.656250 0.097545
|
||||
v 0.490393 0.656250 -0.097545
|
||||
v 0.415735 0.656250 -0.277785
|
||||
v 0.277785 0.656250 -0.415735
|
||||
v 0.116233 0.634645 -0.436100
|
||||
v 0.116233 1.482640 -0.436100
|
||||
v 0.299524 0.634645 -0.186124
|
||||
v 0.299524 1.482640 -0.186124
|
||||
v 0.343405 0.634645 0.080186
|
||||
v 0.343405 1.482640 0.080186
|
||||
v 0.186124 0.634645 0.299524
|
||||
v 0.186124 1.482640 0.299524
|
||||
v -0.080186 0.634645 0.343405
|
||||
v -0.080186 1.482640 0.343405
|
||||
v -0.299524 0.634645 0.186124
|
||||
v -0.299524 1.482640 0.186124
|
||||
v -0.343405 0.634645 -0.080186
|
||||
v -0.343405 1.482640 -0.080186
|
||||
v -0.186124 0.634645 -0.299524
|
||||
v -0.186124 1.482640 -0.299524
|
||||
v 0.080186 0.634645 -0.343405
|
||||
v 0.080186 1.482640 -0.343405
|
||||
v 0.390559 1.482640 -0.226180
|
||||
v 0.390559 0.634645 -0.226180
|
||||
v 0.436100 1.482640 0.116233
|
||||
v 0.436100 0.634645 0.116233
|
||||
v 0.226180 1.482640 0.390559
|
||||
v 0.226180 0.634645 0.390559
|
||||
v -0.116233 1.482640 0.436100
|
||||
v -0.116233 0.634645 0.436100
|
||||
v -0.390559 1.482640 0.226180
|
||||
v -0.390559 0.634645 0.226180
|
||||
v -0.436100 1.482640 -0.116233
|
||||
v -0.436100 0.634645 -0.116233
|
||||
v -0.226180 1.482640 -0.390559
|
||||
v -0.226180 0.634645 -0.390559
|
||||
v 0.108975 0.634645 -0.430778
|
||||
v 0.292266 0.634645 -0.180802
|
||||
v 0.292266 1.482640 -0.180802
|
||||
v 0.108975 1.482640 -0.430778
|
||||
v 0.381664 0.634645 -0.227549
|
||||
v 0.334509 0.634645 0.078817
|
||||
v 0.334509 1.482640 0.078817
|
||||
v 0.381664 1.482640 -0.227549
|
||||
v 0.430778 0.634645 0.108975
|
||||
v 0.180802 0.634645 0.292266
|
||||
v 0.180802 1.482640 0.292266
|
||||
v 0.430778 1.482640 0.108975
|
||||
v 0.227549 0.634645 0.381664
|
||||
v -0.078817 0.634645 0.334509
|
||||
v -0.078817 1.482640 0.334509
|
||||
v 0.227549 1.482640 0.381664
|
||||
v -0.108975 0.634645 0.430778
|
||||
v -0.292266 0.634645 0.180802
|
||||
v -0.292266 1.482640 0.180802
|
||||
v -0.108975 1.482640 0.430778
|
||||
v -0.381664 0.634645 0.227549
|
||||
v -0.334509 0.634645 -0.078817
|
||||
v -0.334509 1.482640 -0.078817
|
||||
v -0.381664 1.482640 0.227549
|
||||
v -0.227549 0.634645 -0.381663
|
||||
v 0.078817 0.634645 -0.334509
|
||||
v 0.078817 1.482640 -0.334509
|
||||
v -0.227549 1.482640 -0.381663
|
||||
v -0.430779 0.634645 -0.108975
|
||||
v -0.180802 0.634645 -0.292266
|
||||
v -0.180802 1.482640 -0.292266
|
||||
v -0.430779 1.482640 -0.108975
|
||||
v 0.097545 1.500000 -0.490393
|
||||
v -0.097545 1.500000 -0.490393
|
||||
v -0.277785 1.500000 -0.415735
|
||||
v -0.415735 1.500000 -0.277785
|
||||
v -0.490393 1.500000 -0.097545
|
||||
v -0.490393 1.500000 0.097545
|
||||
v -0.415735 1.500000 0.277785
|
||||
v -0.277785 1.500000 0.415735
|
||||
v -0.097545 1.500000 0.490393
|
||||
v 0.097545 1.500000 0.490393
|
||||
v 0.277785 1.500000 0.415735
|
||||
v 0.415735 1.500000 0.277785
|
||||
v 0.490393 1.500000 0.097545
|
||||
v 0.490393 1.500000 -0.097545
|
||||
v 0.415735 1.500000 -0.277785
|
||||
v 0.277785 1.500000 -0.415735
|
||||
v 0.097545 1.468750 -0.490393
|
||||
v -0.097545 1.468750 -0.490393
|
||||
v -0.277785 1.468750 -0.415735
|
||||
v -0.415735 1.468750 -0.277785
|
||||
v -0.490393 1.468750 -0.097545
|
||||
v -0.490393 1.468750 0.097545
|
||||
v -0.415735 1.468750 0.277785
|
||||
v -0.277785 1.468750 0.415735
|
||||
v -0.097545 1.468750 0.490393
|
||||
v 0.097545 1.468750 0.490393
|
||||
v 0.277785 1.468750 0.415735
|
||||
v 0.415735 1.468750 0.277785
|
||||
v 0.490393 1.468750 0.097545
|
||||
v 0.490393 1.468750 -0.097545
|
||||
v 0.415735 1.468750 -0.277785
|
||||
v 0.277785 1.468750 -0.415735
|
||||
v 0.025624 0.559630 -0.061863
|
||||
v 0.025624 1.481372 -0.061863
|
||||
v 0.061863 0.559630 -0.025624
|
||||
v 0.061863 1.481372 -0.025624
|
||||
v 0.061863 0.559630 0.025624
|
||||
v 0.061863 1.481372 0.025624
|
||||
v 0.025624 0.559630 0.061863
|
||||
v 0.025624 1.481372 0.061863
|
||||
v -0.025624 0.559630 0.061863
|
||||
v -0.025624 1.481372 0.061863
|
||||
v -0.061863 0.559630 0.025624
|
||||
v -0.061863 1.481372 0.025624
|
||||
v -0.061863 0.559630 -0.025624
|
||||
v -0.061863 1.481372 -0.025624
|
||||
v -0.025624 0.559630 -0.061863
|
||||
v -0.025624 1.481372 -0.061863
|
||||
v 0.500000 -0.500000 -0.500000
|
||||
v 0.500000 -0.500000 0.500000
|
||||
v -0.500000 -0.500000 0.500000
|
||||
v -0.500000 -0.500000 -0.500000
|
||||
v 0.500000 0.500000 -0.500000
|
||||
v 0.500000 0.500000 0.500000
|
||||
v -0.500000 0.500000 0.500000
|
||||
v -0.500000 0.500000 -0.500000
|
||||
vt 0.416667 0.625000
|
||||
vt 0.416667 0.645833
|
||||
vt 0.395833 0.645833
|
||||
vt 0.395833 0.625000
|
||||
vt 0.375000 0.645833
|
||||
vt 0.375000 0.625000
|
||||
vt 0.291667 0.625000
|
||||
vt 0.291667 0.645833
|
||||
vt 0.312500 0.645833
|
||||
vt 0.312500 0.625000
|
||||
vt 0.333333 0.645833
|
||||
vt 0.333333 0.625000
|
||||
vt 0.354167 0.645833
|
||||
vt 0.354167 0.625000
|
||||
vt 0.708333 0.645833
|
||||
vt 0.729167 0.625000
|
||||
vt 0.750000 0.625000
|
||||
vt 0.770833 0.645833
|
||||
vt 0.770833 0.666667
|
||||
vt 0.750000 0.687500
|
||||
vt 0.729167 0.687500
|
||||
vt 0.708333 0.666667
|
||||
vt 0.437500 0.625000
|
||||
vt 0.437500 0.645833
|
||||
vt 0.458333 0.625000
|
||||
vt 0.458333 0.645833
|
||||
vt 0.656250 0.953125
|
||||
vt 0.593750 0.980469
|
||||
vt 0.531250 0.980469
|
||||
vt 0.468750 0.953125
|
||||
vt 0.421875 0.906250
|
||||
vt 0.394531 0.843750
|
||||
vt 0.394531 0.781250
|
||||
vt 0.421875 0.718750
|
||||
vt 0.468750 0.671875
|
||||
vt 0.531250 0.644531
|
||||
vt 0.593750 0.644531
|
||||
vt 0.656250 0.671875
|
||||
vt 0.703125 0.718750
|
||||
vt 0.730469 0.781250
|
||||
vt 0.730469 0.843750
|
||||
vt 0.703125 0.906250
|
||||
vt 0.019531 0.843750
|
||||
vt 0.019531 0.781250
|
||||
vt 0.046875 0.718750
|
||||
vt 0.093750 0.671875
|
||||
vt 0.156250 0.644531
|
||||
vt 0.218750 0.644531
|
||||
vt 0.281250 0.671875
|
||||
vt 0.328125 0.718750
|
||||
vt 0.355469 0.781250
|
||||
vt 0.355469 0.843750
|
||||
vt 0.328125 0.906250
|
||||
vt 0.281250 0.953125
|
||||
vt 0.218750 0.980469
|
||||
vt 0.156250 0.980469
|
||||
vt 0.093750 0.953125
|
||||
vt 0.046875 0.906250
|
||||
vt 0.187500 0.041667
|
||||
vt 0.104167 0.041667
|
||||
vt 0.104167 0.020833
|
||||
vt 0.187500 0.020833
|
||||
vt 0.270833 0.041667
|
||||
vt 0.270833 0.020833
|
||||
vt 0.354167 0.041667
|
||||
vt 0.354167 0.020833
|
||||
vt 0.437500 0.041667
|
||||
vt 0.437500 0.020833
|
||||
vt 0.520833 0.041667
|
||||
vt 0.520833 0.020833
|
||||
vt 0.354167 0.104167
|
||||
vt 0.270833 0.104167
|
||||
vt 0.270833 0.083333
|
||||
vt 0.354167 0.083333
|
||||
vt 0.604167 0.041667
|
||||
vt 0.604167 0.020833
|
||||
vt 0.687500 0.041667
|
||||
vt 0.687500 0.020833
|
||||
vt 0.437500 0.104167
|
||||
vt 0.437500 0.083333
|
||||
vt 0.104167 0.104167
|
||||
vt 0.020833 0.104167
|
||||
vt 0.020833 0.083333
|
||||
vt 0.104167 0.083333
|
||||
vt 0.520833 0.104167
|
||||
vt 0.520833 0.083333
|
||||
vt 0.187500 0.104167
|
||||
vt 0.187500 0.083333
|
||||
vt 0.604167 0.104167
|
||||
vt 0.604167 0.083333
|
||||
vt 0.687500 0.104167
|
||||
vt 0.687500 0.083333
|
||||
vt 0.020833 0.041667
|
||||
vt 0.020833 0.020833
|
||||
vt 0.979167 0.020833
|
||||
vt 0.979167 0.270833
|
||||
vt 0.895833 0.270833
|
||||
vt 0.895833 0.020833
|
||||
vt 0.875000 0.020833
|
||||
vt 0.875000 0.270833
|
||||
vt 0.791667 0.270833
|
||||
vt 0.791667 0.020833
|
||||
vt 0.687500 0.208333
|
||||
vt 0.687500 0.229167
|
||||
vt 0.604167 0.229167
|
||||
vt 0.604167 0.208333
|
||||
vt 0.104167 0.145833
|
||||
vt 0.104167 0.166667
|
||||
vt 0.020833 0.166667
|
||||
vt 0.020833 0.145833
|
||||
vt 0.187500 0.145833
|
||||
vt 0.187500 0.166667
|
||||
vt 0.270833 0.145833
|
||||
vt 0.270833 0.166667
|
||||
vt 0.354167 0.145833
|
||||
vt 0.354167 0.166667
|
||||
vt 0.187500 0.208333
|
||||
vt 0.187500 0.229167
|
||||
vt 0.104167 0.229167
|
||||
vt 0.104167 0.208333
|
||||
vt 0.437500 0.145833
|
||||
vt 0.437500 0.166667
|
||||
vt 0.520833 0.145833
|
||||
vt 0.520833 0.166667
|
||||
vt 0.270833 0.208333
|
||||
vt 0.270833 0.229167
|
||||
vt 0.604167 0.145833
|
||||
vt 0.604167 0.166667
|
||||
vt 0.354167 0.208333
|
||||
vt 0.354167 0.229167
|
||||
vt 0.687500 0.145833
|
||||
vt 0.687500 0.166667
|
||||
vt 0.437500 0.208333
|
||||
vt 0.437500 0.229167
|
||||
vt 0.020833 0.229167
|
||||
vt 0.020833 0.208333
|
||||
vt 0.520833 0.208333
|
||||
vt 0.520833 0.229167
|
||||
vt 0.854167 0.645833
|
||||
vt 0.854167 0.979167
|
||||
vt 0.812500 0.979167
|
||||
vt 0.812500 0.645833
|
||||
vt 0.979167 0.312500
|
||||
vt 0.979167 0.645833
|
||||
vt 0.937500 0.645833
|
||||
vt 0.937500 0.312500
|
||||
vt 0.895833 0.645833
|
||||
vt 0.895833 0.312500
|
||||
vt 0.854167 0.312500
|
||||
vt 0.812500 0.312500
|
||||
vt 0.979167 0.979167
|
||||
vt 0.937500 0.979167
|
||||
vt 0.895833 0.979167
|
||||
vt 0.020833 0.604167
|
||||
vt 0.020833 0.270833
|
||||
vt 0.354167 0.270833
|
||||
vt 0.354167 0.604167
|
||||
vt 0.729167 0.270833
|
||||
vt 0.729167 0.604167
|
||||
vt 0.395833 0.604167
|
||||
vt 0.395833 0.270833
|
||||
s off
|
||||
f 1/1 2/2 4/3 3/4
|
||||
f 3/4 4/3 6/5 5/6
|
||||
f 5/7 6/8 8/9 7/10
|
||||
f 7/10 8/9 10/11 9/12
|
||||
f 9/12 10/11 12/13 11/14
|
||||
f 11/14 12/13 14/5 13/6
|
||||
f 4/15 2/16 16/17 14/18 12/19 10/20 8/21 6/22
|
||||
f 15/23 16/24 2/2 1/1
|
||||
f 13/25 14/26 16/24 15/23
|
||||
f 130/27 129/28 144/29 143/30 142/31 141/32 140/33 139/34 138/35 137/36 136/37 135/38 134/39 133/40 132/41 131/42
|
||||
f 18/43 17/44 32/45 31/46 30/47 29/48 28/49 27/50 26/51 25/52 24/53 23/54 22/55 21/56 20/57 19/58
|
||||
f 27/59 28/60 44/61 43/62
|
||||
f 26/63 27/59 43/62 42/64
|
||||
f 25/65 26/63 42/64 41/66
|
||||
f 24/67 25/65 41/66 40/68
|
||||
f 23/69 24/67 40/68 39/70
|
||||
f 17/71 18/72 34/73 33/74
|
||||
f 22/75 23/69 39/70 38/76
|
||||
f 21/77 22/75 38/76 37/78
|
||||
f 32/79 17/71 33/74 48/80
|
||||
f 20/81 21/82 37/83 36/84
|
||||
f 31/85 32/79 48/80 47/86
|
||||
f 19/87 20/81 36/84 35/88
|
||||
f 30/89 31/85 47/86 46/90
|
||||
f 18/72 19/87 35/88 34/73
|
||||
f 29/91 30/89 46/90 45/92
|
||||
f 28/60 29/93 45/94 44/61
|
||||
f 49/95 50/96 52/97 51/98
|
||||
f 68/98 67/95 54/96 53/97
|
||||
f 70/95 69/96 56/97 55/98
|
||||
f 72/96 71/97 58/98 57/95
|
||||
f 74/95 73/96 60/97 59/98
|
||||
f 76/95 75/96 62/97 61/98
|
||||
f 80/96 79/97 66/98 65/95
|
||||
f 78/95 77/96 64/97 63/98
|
||||
f 81/99 82/100 83/101 84/102
|
||||
f 85/100 86/101 87/102 88/99
|
||||
f 89/101 90/102 91/99 92/100
|
||||
f 93/102 94/99 95/100 96/101
|
||||
f 97/102 98/99 99/100 100/101
|
||||
f 101/99 102/100 103/101 104/102
|
||||
f 105/102 106/99 107/100 108/101
|
||||
f 109/101 110/102 111/99 112/100
|
||||
f 75/100 76/99 101/98 104/97
|
||||
f 71/100 72/99 93/98 96/97
|
||||
f 67/98 68/97 85/100 88/99
|
||||
f 79/98 80/97 105/100 108/99
|
||||
f 77/100 78/99 109/98 112/97
|
||||
f 73/100 74/99 97/98 100/97
|
||||
f 69/98 70/97 89/100 92/99
|
||||
f 50/98 49/97 81/100 84/99
|
||||
f 33/51 34/52 35/53 36/54 37/55 38/56 39/57 40/58 41/43 42/44 43/45 44/46 45/47 46/48 47/49 48/50
|
||||
f 123/103 139/104 140/105 124/106
|
||||
f 122/107 138/108 139/109 123/110
|
||||
f 121/111 137/112 138/108 122/107
|
||||
f 120/113 136/114 137/112 121/111
|
||||
f 119/115 135/116 136/114 120/113
|
||||
f 113/117 129/118 130/119 114/120
|
||||
f 118/121 134/122 135/116 119/115
|
||||
f 117/123 133/124 134/122 118/121
|
||||
f 128/125 144/126 129/118 113/117
|
||||
f 116/127 132/128 133/124 117/123
|
||||
f 127/129 143/130 144/126 128/125
|
||||
f 115/131 131/132 132/128 116/127
|
||||
f 126/133 142/134 143/130 127/129
|
||||
f 114/120 130/119 131/135 115/136
|
||||
f 125/137 141/138 142/134 126/133
|
||||
f 124/106 140/105 141/138 125/137
|
||||
f 145/139 146/140 148/141 147/142
|
||||
f 147/143 148/144 150/145 149/146
|
||||
f 149/146 150/145 152/147 151/148
|
||||
f 151/148 152/147 154/139 153/149
|
||||
f 153/149 154/139 156/142 155/150
|
||||
f 155/144 156/151 158/152 157/145
|
||||
f 159/147 160/153 146/140 145/139
|
||||
f 157/145 158/152 160/153 159/147
|
||||
f 161/154 162/155 163/156 164/157
|
||||
f 165/155 168/156 167/157 166/154
|
||||
f 161/158 165/159 166/160 162/161
|
||||
f 162/158 166/159 167/160 163/161
|
||||
f 163/158 167/159 168/160 164/161
|
||||
f 165/160 161/161 164/158 168/159
|
||||
f 113/40 114/41 115/42 116/27 117/28 118/29 119/30 120/31 121/32 122/33 123/34 124/35 125/36 126/37 127/38 128/39
|
After Width: | Height: | Size: 4.8 KiB |
Before Width: | Height: | Size: 835 B After Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 817 B After Width: | Height: | Size: 2.9 KiB |
|
@ -1 +1,2 @@
|
|||
mesecons
|
||||
dye
|
||||
|
|
|
@ -52,9 +52,9 @@ function mesecon.lightstone_add(name, base_item, texture_off, texture_on)
|
|||
end
|
||||
|
||||
|
||||
mesecon.lightstone_add("red", "default:clay_brick", "jeija_lightstone_red_off.png", "jeija_lightstone_red_on.png")
|
||||
mesecon.lightstone_add("green", "default:cactus", "jeija_lightstone_green_off.png", "jeija_lightstone_green_on.png")
|
||||
mesecon.lightstone_add("blue", "mesecons_materials:fiber", "jeija_lightstone_blue_off.png", "jeija_lightstone_blue_on.png")
|
||||
mesecon.lightstone_add("gray", "default:cobble", "jeija_lightstone_gray_off.png", "jeija_lightstone_gray_on.png")
|
||||
mesecon.lightstone_add("darkgray", "default:gravel", "jeija_lightstone_darkgray_off.png", "jeija_lightstone_darkgray_on.png")
|
||||
mesecon.lightstone_add("yellow", "default:mese_crystal_fragment", "jeija_lightstone_yellow_off.png", "jeija_lightstone_yellow_on.png")
|
||||
mesecon.lightstone_add("red", "dye:red", "jeija_lightstone_red_off.png", "jeija_lightstone_red_on.png")
|
||||
mesecon.lightstone_add("green", "dye:green", "jeija_lightstone_green_off.png", "jeija_lightstone_green_on.png")
|
||||
mesecon.lightstone_add("blue", "dye:blue", "jeija_lightstone_blue_off.png", "jeija_lightstone_blue_on.png")
|
||||
mesecon.lightstone_add("gray", "dye:grey", "jeija_lightstone_gray_off.png", "jeija_lightstone_gray_on.png")
|
||||
mesecon.lightstone_add("darkgray", "dye:dark_grey", "jeija_lightstone_darkgray_off.png", "jeija_lightstone_darkgray_on.png")
|
||||
mesecon.lightstone_add("yellow", "dye:yellow", "jeija_lightstone_yellow_off.png", "jeija_lightstone_yellow_on.png")
|
||||
|
|
|
@ -9,9 +9,7 @@
|
|||
-- Pull all blocks in its back
|
||||
|
||||
function mesecon.get_movestone_direction(pos)
|
||||
getactivated = 0
|
||||
local lpos
|
||||
local getactivated = 0
|
||||
local rules = {
|
||||
{x=0, y=1, z=-1},
|
||||
{x=0, y=0, z=-1},
|
||||
|
@ -55,75 +53,78 @@ function mesecon.get_movestone_direction(pos)
|
|||
end
|
||||
end
|
||||
|
||||
minetest.register_node("mesecons_movestones:movestone", {
|
||||
tiles = {"jeija_movestone_side.png", "jeija_movestone_side.png", "jeija_movestone_side.png", "jeija_movestone_side.png", "jeija_movestone_arrows.png", "jeija_movestone_arrows.png"},
|
||||
paramtype2 = "facedir",
|
||||
legacy_facedir_simple = true,
|
||||
groups = {cracky=3},
|
||||
description="Movestone",
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
mesecons = {effector = {
|
||||
action_on = function (pos, node)
|
||||
local direction=mesecon.get_movestone_direction(pos)
|
||||
if not direction then return end
|
||||
function mesecon.register_movestone(name, def, is_sticky)
|
||||
local timer_interval = 1 / mesecon.setting("movestone_speed", 3)
|
||||
local name_active = name.."_active"
|
||||
|
||||
local function movestone_move (pos)
|
||||
if minetest.get_node(pos).name ~= name_active then
|
||||
return
|
||||
end
|
||||
|
||||
local direction = mesecon.get_movestone_direction(pos)
|
||||
if not direction then
|
||||
minetest.set_node(pos, {name = name})
|
||||
return
|
||||
end
|
||||
local frontpos = vector.add(pos, direction)
|
||||
local backpos = vector.subtract(pos, direction)
|
||||
|
||||
-- ### Step 1: Push nodes in front ###
|
||||
local maxpush = mesecon.setting("movestone_max_push", 50)
|
||||
local maxpull = mesecon.setting("movestone_max_pull", 50)
|
||||
local success, stack, oldstack = mesecon.mvps_push(frontpos, direction, maxpush)
|
||||
if success then
|
||||
mesecon.mvps_process_stack(stack)
|
||||
mesecon.mvps_move_objects(frontpos, direction, oldstack)
|
||||
-- Too large stack/stopper in the way: try again very soon
|
||||
else
|
||||
minetest.after(0.05, movestone_move, pos)
|
||||
return
|
||||
end
|
||||
|
||||
-- ### Step 2: Move the movestone ###
|
||||
local node = minetest.get_node(pos)
|
||||
minetest.set_node(frontpos, node)
|
||||
minetest.remove_node(pos)
|
||||
mesecon.on_dignode(pos, node)
|
||||
minetest.add_entity(pos, "mesecons_movestones:movestone_entity")
|
||||
mesecon.on_placenode(frontpos, node)
|
||||
minetest.after(timer_interval, movestone_move, frontpos)
|
||||
|
||||
-- ### Step 3: If sticky, pull stack behind ###
|
||||
if is_sticky then
|
||||
mesecon.mvps_pull_all(backpos, direction, maxpull)
|
||||
end
|
||||
end
|
||||
|
||||
def.mesecons = {effector = {
|
||||
action_on = function (pos)
|
||||
if minetest.get_node(pos).name ~= name_active then
|
||||
minetest.set_node(pos, {name = name_active})
|
||||
movestone_move(pos)
|
||||
end
|
||||
end,
|
||||
action_off = function (pos)
|
||||
minetest.set_node(pos, {name = name})
|
||||
end
|
||||
}}
|
||||
})
|
||||
|
||||
minetest.register_entity("mesecons_movestones:movestone_entity", {
|
||||
physical = false,
|
||||
visual = "sprite",
|
||||
textures = {"jeija_movestone_side.png", "jeija_movestone_side.png", "jeija_movestone_side.png", "jeija_movestone_side.png", "jeija_movestone_arrows.png", "jeija_movestone_arrows.png"},
|
||||
collisionbox = {-0.5,-0.5,-0.5, 0.5, 0.5, 0.5},
|
||||
visual = "cube",
|
||||
lastdir = {x=0, y=0, z=0},
|
||||
def.drop = name
|
||||
|
||||
on_punch = function(self, hitter)
|
||||
self.object:remove()
|
||||
hitter:get_inventory():add_item("main", "mesecons_movestones:movestone")
|
||||
end,
|
||||
minetest.register_node(name, def)
|
||||
|
||||
on_step = function(self, dtime)
|
||||
local pos = self.object:getpos()
|
||||
pos.x, pos.y, pos.z = math.floor(pos.x+0.5), math.floor(pos.y+0.5), math.floor(pos.z+0.5)
|
||||
local direction = mesecon.get_movestone_direction(pos)
|
||||
-- active node only
|
||||
local def_active = table.copy(def)
|
||||
def_active.groups.not_in_creative_inventory = 1
|
||||
minetest.register_node(name_active, def_active)
|
||||
end
|
||||
|
||||
local maxpush = mesecon.setting("movestone_max_push", 50)
|
||||
if not direction then -- no mesecon power
|
||||
--push only solid nodes
|
||||
local name = minetest.get_node(pos).name
|
||||
if name ~= "air" and name ~= "ignore"
|
||||
and ((not minetest.registered_nodes[name])
|
||||
or minetest.registered_nodes[name].liquidtype == "none") then
|
||||
mesecon.mvps_push(pos, self.lastdir, maxpush)
|
||||
end
|
||||
local nn = {name="mesecons_movestones:movestone"}
|
||||
minetest.add_node(pos, nn)
|
||||
self.object:remove()
|
||||
mesecon.on_placenode(pos, nn)
|
||||
return
|
||||
end
|
||||
|
||||
local success, stack, oldstack =
|
||||
mesecon.mvps_push(pos, direction, maxpush)
|
||||
if not success then -- Too large stack/stopper in the way
|
||||
local nn = {name="mesecons_movestones:movestone"}
|
||||
minetest.add_node(pos, nn)
|
||||
self.object:remove()
|
||||
mesecon.on_placenode(pos, nn)
|
||||
return
|
||||
else
|
||||
mesecon.mvps_process_stack (stack)
|
||||
mesecon.mvps_move_objects (pos, direction, oldstack)
|
||||
self.lastdir = direction
|
||||
end
|
||||
|
||||
self.object:setvelocity({x=direction.x*2, y=direction.y*2, z=direction.z*2})
|
||||
end,
|
||||
})
|
||||
mesecon.register_movestone("mesecons_movestones:movestone", {
|
||||
tiles = {"jeija_movestone_side.png", "jeija_movestone_side.png", "jeija_movestone_side.png", "jeija_movestone_side.png", "jeija_movestone_arrows.png", "jeija_movestone_arrows.png"},
|
||||
groups = {cracky=3},
|
||||
description="Movestone",
|
||||
sounds = default.node_sound_stone_defaults()
|
||||
}, false)
|
||||
|
||||
minetest.register_craft({
|
||||
output = "mesecons_movestones:movestone 2",
|
||||
|
@ -134,28 +135,14 @@ minetest.register_craft({
|
|||
}
|
||||
})
|
||||
|
||||
|
||||
|
||||
-- STICKY_MOVESTONE
|
||||
|
||||
minetest.register_node("mesecons_movestones:sticky_movestone", {
|
||||
mesecon.register_movestone("mesecons_movestones:sticky_movestone", {
|
||||
tiles = {"jeija_movestone_side.png", "jeija_movestone_side.png", "jeija_movestone_side.png", "jeija_movestone_side.png", "jeija_sticky_movestone.png", "jeija_sticky_movestone.png"},
|
||||
inventory_image = minetest.inventorycube("jeija_sticky_movestone.png", "jeija_movestone_side.png", "jeija_movestone_side.png"),
|
||||
paramtype2 = "facedir",
|
||||
legacy_facedir_simple = true,
|
||||
groups = {cracky=3},
|
||||
description="Sticky Movestone",
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
mesecons = {effector = {
|
||||
action_on = function (pos, node)
|
||||
local direction=mesecon.get_movestone_direction(pos)
|
||||
if not direction then return end
|
||||
minetest.remove_node(pos)
|
||||
mesecon.on_dignode(pos, node)
|
||||
minetest.add_entity(pos, "mesecons_movestones:sticky_movestone_entity")
|
||||
end
|
||||
}}
|
||||
})
|
||||
}, true)
|
||||
|
||||
minetest.register_craft({
|
||||
output = "mesecons_movestones:sticky_movestone 2",
|
||||
|
@ -164,63 +151,6 @@ minetest.register_craft({
|
|||
}
|
||||
})
|
||||
|
||||
minetest.register_entity("mesecons_movestones:sticky_movestone_entity", {
|
||||
physical = false,
|
||||
visual = "sprite",
|
||||
textures = {"jeija_movestone_side.png", "jeija_movestone_side.png", "jeija_movestone_side.png", "jeija_movestone_side.png", "jeija_sticky_movestone.png", "jeija_sticky_movestone.png"},
|
||||
collisionbox = {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5},
|
||||
visual = "cube",
|
||||
lastdir = {x=0, y=0, z=0},
|
||||
|
||||
on_punch = function(self, hitter)
|
||||
self.object:remove()
|
||||
hitter:get_inventory():add_item("main", 'mesecons_movestones:sticky_movestone')
|
||||
end,
|
||||
|
||||
on_step = function(self, dtime)
|
||||
local pos = self.object:getpos()
|
||||
pos.x, pos.y, pos.z = math.floor(pos.x+0.5), math.floor(pos.y+0.5), math.floor(pos.z+0.5)
|
||||
local direction = mesecon.get_movestone_direction(pos)
|
||||
|
||||
if not direction then -- no mesecon power
|
||||
--push only solid nodes
|
||||
local name = minetest.get_node(pos).name
|
||||
if name ~= "air" and name ~= "ignore"
|
||||
and ((not minetest.registered_nodes[name])
|
||||
or minetest.registered_nodes[name].liquidtype == "none") then
|
||||
mesecon.mvps_push(pos, self.lastdir,
|
||||
mesecon.setting("movestone_max_push", 50))
|
||||
--STICKY
|
||||
mesecon.mvps_pull_all(pos, self.lastdir)
|
||||
end
|
||||
local nn = {name="mesecons_movestones:sticky_movestone"}
|
||||
minetest.add_node(pos, nn)
|
||||
self.object:remove()
|
||||
mesecon.on_placenode(pos, nn)
|
||||
return
|
||||
end
|
||||
|
||||
local success, stack, oldstack =
|
||||
mesecon.mvps_push(pos, direction, mesecon.setting("movestone_max_push", 50))
|
||||
if not success then -- Too large stack/stopper in the way
|
||||
local nn = {name="mesecons_movestones:sticky_movestone"}
|
||||
minetest.add_node(pos, nn)
|
||||
self.object:remove()
|
||||
mesecon.on_placenode(pos, nn)
|
||||
return
|
||||
else
|
||||
mesecon.mvps_process_stack (stack)
|
||||
mesecon.mvps_move_objects (pos, direction, oldstack)
|
||||
self.lastdir = direction
|
||||
end
|
||||
|
||||
self.object:setvelocity({x=direction.x*2, y=direction.y*2, z=direction.z*2})
|
||||
|
||||
--STICKY
|
||||
mesecon.mvps_pull_all(pos, direction)
|
||||
end,
|
||||
})
|
||||
|
||||
|
||||
mesecon.register_mvps_unmov("mesecons_movestones:movestone_entity")
|
||||
mesecon.register_mvps_unmov("mesecons_movestones:sticky_movestone_entity")
|
||||
-- Don't allow pushing movestones while they're active
|
||||
mesecon.register_mvps_stopper("mesecons_movestones:movestone_active")
|
||||
mesecon.register_mvps_stopper("mesecons_movestones:sticky_movestone_active")
|
||||
|
|
|
@ -1,14 +1,25 @@
|
|||
--register stoppers for movestones/pistons
|
||||
|
||||
mesecon.mvps_stoppers = {}
|
||||
mesecon.mvps_unmov = {}
|
||||
mesecon.on_mvps_move = {}
|
||||
mesecon.mvps_unmov = {}
|
||||
|
||||
--- Objects (entities) that cannot be moved
|
||||
function mesecon.register_mvps_unmov(objectname)
|
||||
mesecon.mvps_unmov[objectname] = true;
|
||||
end
|
||||
|
||||
function mesecon.is_mvps_unmov(objectname)
|
||||
return mesecon.mvps_unmov[objectname]
|
||||
end
|
||||
|
||||
-- Nodes that cannot be pushed / pulled by movestones, pistons
|
||||
function mesecon.is_mvps_stopper(node, pushdir, stack, stackid)
|
||||
local get_stopper = mesecon.mvps_stoppers[node.name]
|
||||
if type (get_stopper) == "function" then
|
||||
get_stopper = get_stopper(node, pushdir, stack, stackid)
|
||||
end
|
||||
if (get_stopper) then print(node.name) end
|
||||
return get_stopper
|
||||
end
|
||||
|
||||
|
@ -19,15 +30,6 @@ function mesecon.register_mvps_stopper(nodename, get_stopper)
|
|||
mesecon.mvps_stoppers[nodename] = get_stopper
|
||||
end
|
||||
|
||||
-- Objects that cannot be moved (e.g. movestones)
|
||||
function mesecon.register_mvps_unmov(objectname)
|
||||
mesecon.mvps_unmov[objectname] = true;
|
||||
end
|
||||
|
||||
function mesecon.is_mvps_unmov(objectname)
|
||||
return mesecon.mvps_unmov[objectname]
|
||||
end
|
||||
|
||||
-- Functions to be called on mvps movement
|
||||
function mesecon.register_on_mvps_move(callback)
|
||||
mesecon.on_mvps_move[#mesecon.on_mvps_move+1] = callback
|
||||
|
@ -70,13 +72,21 @@ function mesecon.mvps_get_stack(pos, dir, maximum)
|
|||
return nodes
|
||||
end
|
||||
|
||||
function mesecon.mvps_push(pos, dir, maximum) -- pos: pos of mvps; dir: direction of push; maximum: maximum nodes to be pushed
|
||||
local nodes = mesecon.mvps_get_stack(pos, dir, maximum)
|
||||
function mesecon.mvps_push(pos, dir, maximum)
|
||||
return mesecon.mvps_push_or_pull(pos, dir, dir, maximum)
|
||||
end
|
||||
|
||||
function mesecon.mvps_pull_all(pos, dir, maximum)
|
||||
return mesecon.mvps_push_or_pull(pos, vector.multiply(dir, -1), dir, maximum)
|
||||
end
|
||||
|
||||
function mesecon.mvps_push_or_pull(pos, stackdir, movedir, maximum) -- pos: pos of mvps; stackdir: direction of building the stack; movedir: direction of actual movement; maximum: maximum nodes to be pushed
|
||||
local nodes = mesecon.mvps_get_stack(pos, stackdir, maximum)
|
||||
|
||||
if not nodes then return end
|
||||
-- determine if one of the nodes blocks the push
|
||||
-- determine if one of the nodes blocks the push / pull
|
||||
for id, n in ipairs(nodes) do
|
||||
if mesecon.is_mvps_stopper(n.node, dir, nodes, id) then
|
||||
if mesecon.is_mvps_stopper(n.node, movedir, nodes, id) then
|
||||
return
|
||||
end
|
||||
end
|
||||
|
@ -94,7 +104,8 @@ function mesecon.mvps_push(pos, dir, maximum) -- pos: pos of mvps; dir: directio
|
|||
|
||||
-- add nodes
|
||||
for _, n in ipairs(nodes) do
|
||||
local np = mesecon.addPosRule(n.pos, dir)
|
||||
local np = mesecon.addPosRule(n.pos, movedir)
|
||||
|
||||
minetest.add_node(np, n.node)
|
||||
minetest.get_meta(np):from_table(n.meta)
|
||||
end
|
||||
|
@ -104,7 +115,7 @@ function mesecon.mvps_push(pos, dir, maximum) -- pos: pos of mvps; dir: directio
|
|||
for i in ipairs(nodes) do
|
||||
moved_nodes[i] = {}
|
||||
moved_nodes[i].oldpos = nodes[i].pos
|
||||
nodes[i].pos = mesecon.addPosRule(nodes[i].pos, dir)
|
||||
nodes[i].pos = mesecon.addPosRule(nodes[i].pos, movedir)
|
||||
moved_nodes[i].pos = nodes[i].pos
|
||||
moved_nodes[i].node = nodes[i].node
|
||||
moved_nodes[i].meta = nodes[i].meta
|
||||
|
@ -128,7 +139,7 @@ function mesecon.mvps_pull_single(pos, dir) -- pos: pos of mvps; direction: dire
|
|||
|
||||
if ((not minetest.registered_nodes[nn.name]) --unregistered node
|
||||
or minetest.registered_nodes[nn.name].liquidtype == "none") --non-liquid node
|
||||
and not mesecon.is_mvps_stopper(nn, {x = -dir.x, y = -dir.y, z = -dir.z}, {{pos = np, node = nn}}, 1) then --non-stopper node
|
||||
and not mesecon.is_mvps_stopper(nn, dir, {{pos = np, node = nn}}, 1) then --non-stopper node
|
||||
local meta = minetest.get_meta(np):to_table()
|
||||
minetest.remove_node(np)
|
||||
minetest.add_node(pos, nn)
|
||||
|
@ -143,52 +154,6 @@ function mesecon.mvps_pull_single(pos, dir) -- pos: pos of mvps; direction: dire
|
|||
return {{pos = np, node = {param2 = 0, name = "air"}}, {pos = pos, node = nn}}
|
||||
end
|
||||
|
||||
function mesecon.mvps_pull_all(pos, direction) -- pos: pos of mvps; direction: direction of pull
|
||||
local lpos = {x=pos.x-direction.x, y=pos.y-direction.y, z=pos.z-direction.z} -- 1 away
|
||||
local lnode = minetest.get_node(lpos)
|
||||
local lpos2 = {x=pos.x-direction.x*2, y=pos.y-direction.y*2, z=pos.z-direction.z*2} -- 2 away
|
||||
local lnode2 = minetest.get_node(lpos2)
|
||||
|
||||
--avoid pulling solid nodes
|
||||
if lnode.name ~= "ignore"
|
||||
and lnode.name ~= "air"
|
||||
and ((not minetest.registered_nodes[lnode.name])
|
||||
or minetest.registered_nodes[lnode.name].liquidtype == "none") then
|
||||
return
|
||||
end
|
||||
|
||||
--avoid pulling empty or liquid nodes
|
||||
if lnode2.name == "ignore"
|
||||
or lnode2.name == "air"
|
||||
or (minetest.registered_nodes[lnode2.name]
|
||||
and minetest.registered_nodes[lnode2.name].liquidtype ~= "none") then
|
||||
return
|
||||
end
|
||||
|
||||
local moved_nodes = {}
|
||||
local oldpos = {x=lpos2.x + direction.x, y=lpos2.y + direction.y, z=lpos2.z + direction.z}
|
||||
repeat
|
||||
lnode2 = minetest.get_node(lpos2)
|
||||
local meta = minetest.get_meta(lnode2):to_table()
|
||||
minetest.add_node(oldpos, lnode2)
|
||||
minetest.get_meta(oldpos):from_table(meta)
|
||||
moved_nodes[#moved_nodes+1] = {pos = oldpos, oldpos = lpos2, node = lnode2, meta = meta}
|
||||
nodeupdate(oldpos)
|
||||
oldpos = {x=lpos2.x, y=lpos2.y, z=lpos2.z}
|
||||
lpos2.x = lpos2.x-direction.x
|
||||
lpos2.y = lpos2.y-direction.y
|
||||
lpos2.z = lpos2.z-direction.z
|
||||
lnode = minetest.get_node(lpos2)
|
||||
until lnode.name == "air"
|
||||
or lnode.name == "ignore"
|
||||
or (minetest.registered_nodes[lnode.name]
|
||||
and minetest.registered_nodes[lnode.name].liquidtype ~= "none")
|
||||
minetest.remove_node(oldpos)
|
||||
mesecon.on_dignode(oldpos, lnode2)
|
||||
mesecon.update_autoconnect(oldpos)
|
||||
on_mvps_move(moved_nodes)
|
||||
end
|
||||
|
||||
function mesecon.mvps_move_objects(pos, dir, nodestack)
|
||||
local objects_to_move = {}
|
||||
|
||||
|
@ -231,5 +196,8 @@ function mesecon.mvps_move_objects(pos, dir, nodestack)
|
|||
end
|
||||
end
|
||||
|
||||
mesecon.register_mvps_stopper("doors:door_steel_b_1")
|
||||
mesecon.register_mvps_stopper("doors:door_steel_t_1")
|
||||
mesecon.register_mvps_stopper("doors:door_steel_b_2")
|
||||
mesecon.register_mvps_stopper("doors:door_steel_t_2")
|
||||
mesecon.register_mvps_stopper("default:chest_locked")
|
||||
mesecon.register_mvps_stopper("default:furnace")
|
||||
|
|
|
@ -61,9 +61,15 @@ mesecon.noteblock_play = function (pos, param2)
|
|||
if block_below_name == "default:glass" then
|
||||
soundname="mesecons_noteblock_hihat"
|
||||
end
|
||||
if block_below_name == "default:steelblock" then
|
||||
soundname=soundname.."2" -- Go up an octave.
|
||||
end
|
||||
if block_below_name == "default:stone" then
|
||||
soundname="mesecons_noteblock_kick"
|
||||
end
|
||||
if block_below_name == "default:lava_source" then
|
||||
soundname="fire_large"
|
||||
end
|
||||
if block_below_name == "default:chest" then
|
||||
soundname="mesecons_noteblock_snare"
|
||||
end
|
||||
|
@ -73,6 +79,9 @@ mesecon.noteblock_play = function (pos, param2)
|
|||
if block_below_name == "default:wood" then
|
||||
soundname="mesecons_noteblock_litecrash"
|
||||
end
|
||||
if block_below_name == "default:coalblock" then
|
||||
soundname="tnt_explode"
|
||||
end
|
||||
minetest.sound_play(soundname,
|
||||
{pos = pos, gain = 1.0, max_hear_distance = 32,})
|
||||
end
|
||||
|
|
|
@ -89,8 +89,8 @@ local piston_on = function(pos, node)
|
|||
max_hear_distance = 20,
|
||||
gain = 0.3,
|
||||
})
|
||||
mesecon.mvps_process_stack (stack)
|
||||
mesecon.mvps_move_objects (np, dir, oldstack)
|
||||
mesecon.mvps_process_stack(stack)
|
||||
mesecon.mvps_move_objects(np, dir, oldstack)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -274,7 +274,7 @@ minetest.register_node("mesecons_pistons:piston_sticky_on", {
|
|||
groups = {cracky = 3, not_in_creative_inventory = 1},
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
drop = "mesecons_pistons:piston_normal_off",
|
||||
drop = "mesecons_pistons:piston_sticky_off",
|
||||
after_dig_node = piston_remove_pusher,
|
||||
node_box = piston_on_box,
|
||||
selection_box = piston_on_box,
|
||||
|
|
|
@ -3,9 +3,9 @@
|
|||
-- Powers the block 2 nodes behind (using a receiver)
|
||||
mesecon.register_node("mesecons_walllever:wall_lever", {
|
||||
description="Lever",
|
||||
drawtype = "nodebox",
|
||||
inventory_image = "jeija_wall_lever_off.png",
|
||||
wield_image = "jeija_wall_lever_off.png",
|
||||
drawtype = "mesh",
|
||||
inventory_image = "jeija_wall_lever_inv.png",
|
||||
wield_image = "jeija_wall_lever_inv.png",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
sunlight_propagates = true,
|
||||
|
@ -24,40 +24,16 @@ mesecon.register_node("mesecons_walllever:wall_lever", {
|
|||
minetest.sound_play("mesecons_lever", {pos=pos})
|
||||
end
|
||||
},{
|
||||
tiles = { "jeija_wall_lever_tb.png", "jeija_wall_lever_bottom.png",
|
||||
"jeija_wall_lever_sides.png", "jeija_wall_lever_sides.png",
|
||||
"jeija_wall_lever_back.png", "jeija_wall_lever_off.png",
|
||||
},
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {{ -6/16, -6/16, 6/16, 6/16, 6/16, 8/16 }, -- the base "slab"
|
||||
{ -5/16, -3/16, 5/16, 5/16, 3/16, 6/16 }, -- the lighted ring area
|
||||
{ -4/16, -2/16, 4/16, 4/16, 2/16, 5/16 }, -- the raised bit
|
||||
{ -2/16, -1/16, 3/16, 2/16, 1/16, 4/16 }, -- the lever "hinge"
|
||||
{ -1/16, -8/16, 4/16, 1/16, 0, 6/16 }} -- the lever itself.
|
||||
},
|
||||
tiles = { "jeija_wall_lever_off.png" },
|
||||
mesh="jeija_wall_lever_off.obj",
|
||||
mesecons = {receptor = {
|
||||
rules = mesecon.rules.buttonlike_get,
|
||||
state = mesecon.state.off
|
||||
}},
|
||||
groups = {dig_immediate = 2, mesecon_needs_receiver = 1}
|
||||
},{
|
||||
tiles = {
|
||||
"jeija_wall_lever_top.png",
|
||||
"jeija_wall_lever_tb.png",
|
||||
"jeija_wall_lever_sides.png",
|
||||
"jeija_wall_lever_sides.png",
|
||||
"jeija_wall_lever_back.png",
|
||||
"jeija_wall_lever_on.png",
|
||||
},
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {{ -6/16, -6/16, 6/16, 6/16, 6/16, 8/16 }, -- the base "slab"
|
||||
{ -5/16, -3/16, 5/16, 5/16, 3/16, 6/16 }, -- the lighted ring area
|
||||
{ -4/16, -2/16, 4/16, 4/16, 2/16, 5/16 }, -- the raised bit
|
||||
{ -2/16, -1/16, 3/16, 2/16, 1/16, 4/16 }, -- the lever "hinge"
|
||||
{ -1/16, 0, 4/16, 1/16, 8/16, 6/16 }} -- the lever itself.
|
||||
},
|
||||
tiles = { "jeija_wall_lever_on.png" },
|
||||
mesh="jeija_wall_lever_on.obj",
|
||||
mesecons = {receptor = {
|
||||
rules = mesecon.rules.buttonlike_get,
|
||||
state = mesecon.state.on
|
||||
|
|
263
mods/mesecons/mesecons_walllever/models/jeija_wall_lever_off.obj
Normal file
|
@ -0,0 +1,263 @@
|
|||
# Blender v2.73 (sub 0) OBJ File: 'mesecons-wall-lever-off.blend'
|
||||
# www.blender.org
|
||||
o nodebox-5
|
||||
v 0.289062 0.156250 0.312500
|
||||
v -0.375000 0.375000 0.375000
|
||||
v -0.375000 -0.375000 0.375000
|
||||
v 0.332500 0.207500 0.375000
|
||||
v 0.332500 -0.207500 0.375000
|
||||
v 0.375000 0.375000 0.375000
|
||||
v 0.375000 -0.375000 0.375000
|
||||
v 0.289062 -0.156250 0.312500
|
||||
v -0.062500 -0.036146 0.200392
|
||||
v -0.062500 -0.068498 0.321133
|
||||
v -0.062500 -0.394498 0.233782
|
||||
v -0.062500 -0.362146 0.113041
|
||||
v -0.332500 0.207500 0.375000
|
||||
v 0.062500 -0.036146 0.200392
|
||||
v 0.062500 -0.068498 0.321133
|
||||
v -0.332500 -0.207500 0.375000
|
||||
v 0.332500 0.207500 0.375000
|
||||
v 0.062500 -0.394498 0.233782
|
||||
v 0.062500 -0.362146 0.113041
|
||||
v 0.332500 -0.207500 0.375000
|
||||
v 0.375000 -0.375000 0.375000
|
||||
v 0.375000 -0.375000 0.500000
|
||||
v 0.375000 0.375000 0.500000
|
||||
v 0.375000 0.375000 0.375000
|
||||
v -0.375000 -0.375000 0.375000
|
||||
v -0.375000 -0.375000 0.500000
|
||||
v -0.375000 0.375000 0.500000
|
||||
v -0.375000 0.375000 0.375000
|
||||
v -0.289062 0.156250 0.312500
|
||||
v -0.332500 0.207500 0.375000
|
||||
v -0.332500 -0.207500 0.375000
|
||||
v -0.289062 -0.156250 0.312500
|
||||
v -0.250000 0.125000 0.312500
|
||||
v -0.250000 -0.125000 0.312500
|
||||
v 0.250000 0.125000 0.312500
|
||||
v 0.250000 -0.125000 0.312500
|
||||
v -0.250000 -0.000000 0.250000
|
||||
v -0.000000 -0.125000 0.250000
|
||||
v 0.250000 -0.000000 0.250000
|
||||
v 0.000000 0.125000 0.250000
|
||||
v -0.250000 0.125000 0.250000
|
||||
v -0.250000 0.125000 0.312500
|
||||
v -0.250000 -0.125000 0.312500
|
||||
v -0.250000 -0.125000 0.250000
|
||||
v 0.250000 0.125000 0.250000
|
||||
v 0.250000 0.125000 0.312500
|
||||
v 0.250000 -0.125000 0.312500
|
||||
v 0.250000 -0.125000 0.250000
|
||||
v 0.250000 -0.125000 0.250000
|
||||
v 0.250000 0.125000 0.250000
|
||||
v -0.250000 -0.125000 0.250000
|
||||
v -0.250000 0.125000 0.250000
|
||||
v 0.125000 -0.062500 0.187500
|
||||
v 0.125000 0.062500 0.187500
|
||||
v -0.125000 -0.062500 0.187500
|
||||
v -0.125000 0.062500 0.187500
|
||||
v 0.065000 -0.032500 0.176992
|
||||
v 0.065000 0.032500 0.176992
|
||||
v -0.065000 -0.032500 0.176992
|
||||
v -0.065000 0.032500 0.176992
|
||||
v 0.000000 0.125000 0.250000
|
||||
v 0.250000 -0.000000 0.250000
|
||||
v -0.000000 -0.125000 0.250000
|
||||
v -0.250000 -0.000000 0.250000
|
||||
v 0.000000 0.062500 0.187500
|
||||
v -0.187500 -0.093750 0.208750
|
||||
v 0.125000 -0.000000 0.187500
|
||||
v 0.000000 -0.062500 0.187500
|
||||
v -0.125000 -0.000000 0.187500
|
||||
v 0.187500 0.093750 0.208750
|
||||
v 0.187500 -0.093750 0.208750
|
||||
v -0.187500 0.093750 0.208750
|
||||
v 0.000000 0.093750 0.208750
|
||||
v 0.000000 -0.093750 0.208750
|
||||
v 0.187500 -0.000000 0.208750
|
||||
v -0.187500 -0.000000 0.208750
|
||||
vt 0.416667 0.416667
|
||||
vt 0.083333 0.416667
|
||||
vt 0.055556 0.472222
|
||||
vt 0.444444 0.472222
|
||||
vt 0.083333 0.083333
|
||||
vt 0.055556 0.027778
|
||||
vt 0.444444 0.027778
|
||||
vt 0.416667 0.083333
|
||||
vt 0.472222 0.055556
|
||||
vt 0.472222 0.444444
|
||||
vt 0.027778 0.055556
|
||||
vt 0.027778 0.444444
|
||||
vt 0.250000 0.833333
|
||||
vt 0.250000 0.638889
|
||||
vt 0.305556 0.638889
|
||||
vt 0.305556 0.833333
|
||||
vt 0.388889 0.777778
|
||||
vt 0.333333 0.777778
|
||||
vt 0.333333 0.722222
|
||||
vt 0.388889 0.722222
|
||||
vt 0.944444 0.527778
|
||||
vt 0.944444 0.916667
|
||||
vt 1.000000 0.916667
|
||||
vt 1.000000 0.527778
|
||||
vt 0.500000 0.527778
|
||||
vt 0.555556 0.527778
|
||||
vt 0.555556 0.916667
|
||||
vt 0.500000 0.916667
|
||||
vt 0.138889 0.833333
|
||||
vt 0.194444 0.833333
|
||||
vt 0.194444 0.638889
|
||||
vt 0.138889 0.638889
|
||||
vt 0.944444 0.472222
|
||||
vt 0.555556 0.472222
|
||||
vt 0.555556 0.972222
|
||||
vt 0.944444 0.972222
|
||||
vt 0.888802 0.166753
|
||||
vt 0.555642 0.166753
|
||||
vt 0.527778 0.138889
|
||||
vt 0.916667 0.138889
|
||||
vt 0.888802 0.388802
|
||||
vt 0.916667 0.416667
|
||||
vt 0.527778 0.416667
|
||||
vt 0.555642 0.388802
|
||||
vt 0.361111 0.361111
|
||||
vt 0.250000 0.361111
|
||||
vt 0.138889 0.361111
|
||||
vt 0.138889 0.416667
|
||||
vt 0.361111 0.416667
|
||||
vt 0.361111 0.083333
|
||||
vt 0.361111 0.138889
|
||||
vt 0.138889 0.138889
|
||||
vt 0.138889 0.083333
|
||||
vt 0.250000 0.083333
|
||||
vt 0.416667 0.361111
|
||||
vt 0.416667 0.138889
|
||||
vt 0.416667 0.250000
|
||||
vt 0.138889 0.250000
|
||||
vt 0.083333 0.138889
|
||||
vt 0.083333 0.361111
|
||||
vt 0.083333 0.638889
|
||||
vt 0.083333 0.833333
|
||||
vt 0.444444 0.611111
|
||||
vt 0.055556 0.611111
|
||||
vt 0.027778 0.527778
|
||||
vt 0.472222 0.527778
|
||||
vt 0.444444 0.888889
|
||||
vt 0.472222 0.972222
|
||||
vt 0.055556 0.888889
|
||||
vt 0.027778 0.972222
|
||||
vt 0.722222 0.361111
|
||||
vt 0.583333 0.361111
|
||||
vt 0.722222 0.388802
|
||||
vt 0.833333 0.333333
|
||||
vt 0.777778 0.305556
|
||||
vt 0.777778 0.250000
|
||||
vt 0.833333 0.222222
|
||||
vt 0.833333 0.277778
|
||||
vt 0.722222 0.194444
|
||||
vt 0.722222 0.166753
|
||||
vt 0.861111 0.194444
|
||||
vt 0.583333 0.277778
|
||||
vt 0.583333 0.194444
|
||||
vt 0.555642 0.277778
|
||||
vt 0.861111 0.277778
|
||||
vt 0.888802 0.277778
|
||||
vt 0.861111 0.361111
|
||||
vt 0.666667 0.250000
|
||||
vt 0.666667 0.305556
|
||||
vt 0.611111 0.222222
|
||||
vt 0.722222 0.222222
|
||||
vt 0.611111 0.333333
|
||||
vt 0.611111 0.277778
|
||||
vt 0.722222 0.333333
|
||||
vn 0.000000 0.773300 -0.634100
|
||||
vn 0.000000 -0.773300 -0.634100
|
||||
vn -0.821200 0.000000 -0.570700
|
||||
vn 0.821200 0.000000 -0.570700
|
||||
vn 0.000000 -0.258800 0.965900
|
||||
vn 0.000000 -0.965900 -0.258800
|
||||
vn 1.000000 0.000000 0.000000
|
||||
vn -1.000000 0.000000 0.000000
|
||||
vn 0.000000 0.258800 -0.965900
|
||||
vn 0.000000 -0.000000 1.000000
|
||||
vn 0.000000 -1.000000 0.000000
|
||||
vn 0.000000 1.000000 0.000000
|
||||
vn 0.000000 0.000000 -1.000000
|
||||
vn 0.000000 0.688800 -0.724900
|
||||
vn -0.269900 0.421500 -0.865700
|
||||
vn -0.395600 0.336800 -0.854500
|
||||
vn 0.000000 0.797100 -0.603900
|
||||
vn -0.142400 0.274900 -0.950900
|
||||
vn -0.056900 0.142700 -0.988100
|
||||
vn -0.056900 -0.142700 -0.988100
|
||||
vn -0.142400 -0.274900 -0.950900
|
||||
vn -0.247900 0.000000 -0.968700
|
||||
vn 0.000000 -0.688800 -0.724900
|
||||
vn 0.000000 -0.797100 -0.603900
|
||||
vn -0.395600 -0.336800 -0.854500
|
||||
vn -0.269900 -0.421500 -0.865700
|
||||
vn 0.440000 0.000000 -0.898000
|
||||
vn 0.269900 0.421500 -0.865700
|
||||
vn 0.395600 0.336800 -0.854500
|
||||
vn 0.550800 0.000000 -0.834600
|
||||
vn -0.440000 0.000000 -0.898000
|
||||
vn -0.550800 0.000000 -0.834600
|
||||
vn 0.056900 -0.142700 -0.988100
|
||||
vn 0.056900 0.142700 -0.988100
|
||||
vn 0.142400 -0.274900 -0.950900
|
||||
vn 0.000000 -0.450200 -0.892900
|
||||
vn 0.142400 0.274900 -0.950900
|
||||
vn 0.247900 0.000000 -0.968700
|
||||
vn 0.000000 0.450200 -0.892900
|
||||
vn 0.269900 -0.421500 -0.865700
|
||||
vn 0.395600 -0.336800 -0.854500
|
||||
s off
|
||||
f 1/1/1 29/2/1 30/3/1 4/4/1
|
||||
f 8/5/2 5/6/2 31/7/2 32/8/2
|
||||
f 32/8/3 31/9/3 30/10/3 29/1/3
|
||||
f 8/2/4 1/5/4 4/11/4 5/12/4
|
||||
f 18/13/5 15/14/5 10/15/5 11/16/5
|
||||
f 19/17/6 18/18/6 11/19/6 12/20/6
|
||||
f 21/21/7 24/22/7 23/23/7 22/24/7
|
||||
f 25/25/8 26/26/8 27/27/8 28/28/8
|
||||
f 19/29/9 12/30/9 9/31/9 14/32/9
|
||||
f 22/26/10 23/21/10 27/22/10 26/27/10
|
||||
f 21/33/11 22/21/11 26/26/11 25/34/11
|
||||
f 24/22/12 28/27/12 27/35/12 23/36/12
|
||||
f 34/37/13 36/38/13 8/39/13 32/40/13
|
||||
f 33/41/13 34/37/13 32/40/13 29/42/13
|
||||
f 33/41/13 29/42/13 1/43/13 35/44/13
|
||||
f 35/44/13 1/43/13 8/39/13 36/38/13
|
||||
f 45/45/12 40/46/12 41/47/12 42/48/12 46/49/12
|
||||
f 48/50/11 47/51/11 43/52/11 44/53/11 38/54/11
|
||||
f 44/55/8 43/45/8 42/51/8 41/56/8 37/57/8
|
||||
f 48/47/7 39/58/7 45/52/7 46/59/7 47/60/7
|
||||
f 12/13/8 11/30/8 10/31/8 9/14/8
|
||||
f 19/29/7 14/32/7 15/61/7 18/62/7
|
||||
f 16/63/13 20/64/13 7/65/13 3/66/13
|
||||
f 13/67/13 16/63/13 3/66/13 2/68/13
|
||||
f 17/69/13 6/70/13 7/65/13 20/64/13
|
||||
f 13/67/13 2/68/13 6/70/13 17/69/13
|
||||
s 1
|
||||
f 73/71/14 72/72/15 52/44/16 61/73/17
|
||||
f 56/74/18 60/75/19 59/76/20 55/77/21 69/78/22
|
||||
f 74/79/23 63/80/24 51/37/25 66/81/26
|
||||
f 75/82/27 70/83/28 50/38/29 62/84/30
|
||||
f 76/85/31 64/86/32 52/41/16 72/87/15
|
||||
f 57/88/33 59/76/20 60/75/19 58/89/34
|
||||
f 55/77/21 59/76/20 57/88/33 53/90/35 68/91/36
|
||||
f 53/90/35 57/88/33 58/89/34 54/92/37 67/93/38
|
||||
f 54/92/37 58/89/34 60/75/19 56/74/18 65/94/39
|
||||
f 65/94/39 56/92/18 72/72/15 73/71/14
|
||||
f 54/74/37 65/94/39 73/71/14 70/87/28
|
||||
f 70/87/28 73/71/14 61/73/17 50/41/29
|
||||
f 68/91/36 74/79/23 66/81/26 55/77/21
|
||||
f 53/90/35 71/83/40 74/79/23 68/91/36
|
||||
f 71/83/40 49/38/41 63/80/24 74/79/23
|
||||
f 67/93/38 54/90/37 70/83/28 75/82/27
|
||||
f 53/92/35 67/93/38 75/82/27 71/72/40
|
||||
f 71/72/40 75/82/27 62/84/30 49/44/41
|
||||
f 69/78/22 76/85/31 72/87/15 56/74/18
|
||||
f 55/77/21 66/81/26 76/85/31 69/78/22
|
||||
f 66/81/26 51/37/25 64/86/32 76/85/31
|
263
mods/mesecons/mesecons_walllever/models/jeija_wall_lever_on.obj
Normal file
|
@ -0,0 +1,263 @@
|
|||
# Blender v2.73 (sub 0) OBJ File: 'mesecons-wall-lever.blend'
|
||||
# www.blender.org
|
||||
o nodebox-5
|
||||
v 0.289062 0.156250 0.312500
|
||||
v -0.375000 0.375000 0.375000
|
||||
v -0.375000 -0.375000 0.375000
|
||||
v 0.332500 0.207500 0.375000
|
||||
v 0.332500 -0.207500 0.375000
|
||||
v 0.375000 0.375000 0.375000
|
||||
v 0.375000 -0.375000 0.375000
|
||||
v 0.289062 -0.156250 0.312500
|
||||
v -0.062500 0.075354 0.315617
|
||||
v -0.062500 0.043002 0.194876
|
||||
v -0.062500 0.369002 0.107525
|
||||
v -0.062500 0.401354 0.228266
|
||||
v -0.332500 0.207500 0.375000
|
||||
v 0.062500 0.075354 0.315617
|
||||
v 0.062500 0.043002 0.194876
|
||||
v -0.332500 -0.207500 0.375000
|
||||
v 0.332500 0.207500 0.375000
|
||||
v 0.062500 0.369002 0.107525
|
||||
v 0.062500 0.401354 0.228266
|
||||
v 0.332500 -0.207500 0.375000
|
||||
v 0.375000 -0.375000 0.375000
|
||||
v 0.375000 -0.375000 0.500000
|
||||
v 0.375000 0.375000 0.500000
|
||||
v 0.375000 0.375000 0.375000
|
||||
v -0.375000 -0.375000 0.375000
|
||||
v -0.375000 -0.375000 0.500000
|
||||
v -0.375000 0.375000 0.500000
|
||||
v -0.375000 0.375000 0.375000
|
||||
v -0.289062 0.156250 0.312500
|
||||
v -0.332500 0.207500 0.375000
|
||||
v -0.332500 -0.207500 0.375000
|
||||
v -0.289062 -0.156250 0.312500
|
||||
v -0.250000 0.125000 0.312500
|
||||
v -0.250000 -0.125000 0.312500
|
||||
v 0.250000 0.125000 0.312500
|
||||
v 0.250000 -0.125000 0.312500
|
||||
v -0.250000 -0.000000 0.250000
|
||||
v -0.000000 -0.125000 0.250000
|
||||
v 0.250000 -0.000000 0.250000
|
||||
v 0.000000 0.125000 0.250000
|
||||
v -0.250000 0.125000 0.250000
|
||||
v -0.250000 0.125000 0.312500
|
||||
v -0.250000 -0.125000 0.312500
|
||||
v -0.250000 -0.125000 0.250000
|
||||
v 0.250000 0.125000 0.250000
|
||||
v 0.250000 0.125000 0.312500
|
||||
v 0.250000 -0.125000 0.312500
|
||||
v 0.250000 -0.125000 0.250000
|
||||
v 0.250000 -0.125000 0.250000
|
||||
v 0.250000 0.125000 0.250000
|
||||
v -0.250000 -0.125000 0.250000
|
||||
v -0.250000 0.125000 0.250000
|
||||
v 0.125000 -0.062500 0.187500
|
||||
v 0.125000 0.062500 0.187500
|
||||
v -0.125000 -0.062500 0.187500
|
||||
v -0.125000 0.062500 0.187500
|
||||
v 0.065000 -0.032500 0.176992
|
||||
v 0.065000 0.032500 0.176992
|
||||
v -0.065000 -0.032500 0.176992
|
||||
v -0.065000 0.032500 0.176992
|
||||
v 0.000000 0.125000 0.250000
|
||||
v 0.250000 -0.000000 0.250000
|
||||
v -0.000000 -0.125000 0.250000
|
||||
v -0.250000 -0.000000 0.250000
|
||||
v 0.000000 0.062500 0.187500
|
||||
v -0.187500 -0.093750 0.208750
|
||||
v 0.125000 -0.000000 0.187500
|
||||
v 0.000000 -0.062500 0.187500
|
||||
v -0.125000 -0.000000 0.187500
|
||||
v 0.187500 0.093750 0.208750
|
||||
v 0.187500 -0.093750 0.208750
|
||||
v -0.187500 0.093750 0.208750
|
||||
v 0.000000 0.093750 0.208750
|
||||
v 0.000000 -0.093750 0.208750
|
||||
v 0.187500 -0.000000 0.208750
|
||||
v -0.187500 -0.000000 0.208750
|
||||
vt 0.416667 0.416667
|
||||
vt 0.083333 0.416667
|
||||
vt 0.055556 0.472222
|
||||
vt 0.444444 0.472222
|
||||
vt 0.083333 0.083333
|
||||
vt 0.055556 0.027778
|
||||
vt 0.444444 0.027778
|
||||
vt 0.416667 0.083333
|
||||
vt 0.472222 0.055556
|
||||
vt 0.472222 0.444444
|
||||
vt 0.027778 0.055556
|
||||
vt 0.027778 0.444444
|
||||
vt 0.250000 0.833333
|
||||
vt 0.250000 0.638889
|
||||
vt 0.305556 0.638889
|
||||
vt 0.305556 0.833333
|
||||
vt 0.388889 0.777778
|
||||
vt 0.333333 0.777778
|
||||
vt 0.333333 0.722222
|
||||
vt 0.388889 0.722222
|
||||
vt 0.944444 0.527778
|
||||
vt 0.944444 0.916667
|
||||
vt 1.000000 0.916667
|
||||
vt 1.000000 0.527778
|
||||
vt 0.500000 0.527778
|
||||
vt 0.555556 0.527778
|
||||
vt 0.555556 0.916667
|
||||
vt 0.500000 0.916667
|
||||
vt 0.138889 0.833333
|
||||
vt 0.194444 0.833333
|
||||
vt 0.194444 0.638889
|
||||
vt 0.138889 0.638889
|
||||
vt 0.944444 0.472222
|
||||
vt 0.555556 0.472222
|
||||
vt 0.555556 0.972222
|
||||
vt 0.944444 0.972222
|
||||
vt 0.888802 0.166753
|
||||
vt 0.555642 0.166753
|
||||
vt 0.527778 0.138889
|
||||
vt 0.916667 0.138889
|
||||
vt 0.888802 0.388802
|
||||
vt 0.916667 0.416667
|
||||
vt 0.527778 0.416667
|
||||
vt 0.555642 0.388802
|
||||
vt 0.361111 0.361111
|
||||
vt 0.250000 0.361111
|
||||
vt 0.138889 0.361111
|
||||
vt 0.138889 0.416667
|
||||
vt 0.361111 0.416667
|
||||
vt 0.361111 0.083333
|
||||
vt 0.361111 0.138889
|
||||
vt 0.138889 0.138889
|
||||
vt 0.138889 0.083333
|
||||
vt 0.250000 0.083333
|
||||
vt 0.416667 0.361111
|
||||
vt 0.416667 0.138889
|
||||
vt 0.416667 0.250000
|
||||
vt 0.138889 0.250000
|
||||
vt 0.083333 0.138889
|
||||
vt 0.083333 0.361111
|
||||
vt 0.083333 0.638889
|
||||
vt 0.083333 0.833333
|
||||
vt 0.444444 0.611111
|
||||
vt 0.055556 0.611111
|
||||
vt 0.027778 0.527778
|
||||
vt 0.472222 0.527778
|
||||
vt 0.444444 0.888889
|
||||
vt 0.472222 0.972222
|
||||
vt 0.055556 0.888889
|
||||
vt 0.027778 0.972222
|
||||
vt 0.722222 0.361111
|
||||
vt 0.583333 0.361111
|
||||
vt 0.722222 0.388802
|
||||
vt 0.833333 0.333333
|
||||
vt 0.777778 0.305556
|
||||
vt 0.777778 0.250000
|
||||
vt 0.833333 0.222222
|
||||
vt 0.833333 0.277778
|
||||
vt 0.722222 0.194444
|
||||
vt 0.722222 0.166753
|
||||
vt 0.861111 0.194444
|
||||
vt 0.583333 0.277778
|
||||
vt 0.583333 0.194444
|
||||
vt 0.555642 0.277778
|
||||
vt 0.861111 0.277778
|
||||
vt 0.888802 0.277778
|
||||
vt 0.861111 0.361111
|
||||
vt 0.666667 0.250000
|
||||
vt 0.666667 0.305556
|
||||
vt 0.611111 0.222222
|
||||
vt 0.722222 0.222222
|
||||
vt 0.611111 0.333333
|
||||
vt 0.611111 0.277778
|
||||
vt 0.722222 0.333333
|
||||
vn 0.000000 0.773300 -0.634100
|
||||
vn 0.000000 -0.773300 -0.634100
|
||||
vn -0.821200 0.000000 -0.570700
|
||||
vn 0.821200 0.000000 -0.570700
|
||||
vn 0.000000 -0.258800 -0.965900
|
||||
vn 0.000000 0.965900 -0.258800
|
||||
vn 1.000000 0.000000 0.000000
|
||||
vn -1.000000 0.000000 0.000000
|
||||
vn 0.000000 0.258800 0.965900
|
||||
vn 0.000000 -0.000000 1.000000
|
||||
vn 0.000000 -1.000000 0.000000
|
||||
vn 0.000000 1.000000 0.000000
|
||||
vn 0.000000 0.000000 -1.000000
|
||||
vn 0.000000 0.688800 -0.724900
|
||||
vn -0.269900 0.421500 -0.865700
|
||||
vn -0.395600 0.336800 -0.854500
|
||||
vn 0.000000 0.797100 -0.603900
|
||||
vn -0.142400 0.274900 -0.950900
|
||||
vn -0.056900 0.142700 -0.988100
|
||||
vn -0.056900 -0.142700 -0.988100
|
||||
vn -0.142400 -0.274900 -0.950900
|
||||
vn -0.247900 0.000000 -0.968700
|
||||
vn 0.000000 -0.688800 -0.724900
|
||||
vn 0.000000 -0.797100 -0.603900
|
||||
vn -0.395600 -0.336800 -0.854500
|
||||
vn -0.269900 -0.421500 -0.865700
|
||||
vn 0.440000 0.000000 -0.898000
|
||||
vn 0.269900 0.421500 -0.865700
|
||||
vn 0.395600 0.336800 -0.854500
|
||||
vn 0.550800 0.000000 -0.834600
|
||||
vn -0.440000 0.000000 -0.898000
|
||||
vn -0.550800 0.000000 -0.834600
|
||||
vn 0.056900 -0.142700 -0.988100
|
||||
vn 0.056900 0.142700 -0.988100
|
||||
vn 0.142400 -0.274900 -0.950900
|
||||
vn 0.000000 -0.450200 -0.892900
|
||||
vn 0.142400 0.274900 -0.950900
|
||||
vn 0.247900 0.000000 -0.968700
|
||||
vn 0.000000 0.450200 -0.892900
|
||||
vn 0.269900 -0.421500 -0.865700
|
||||
vn 0.395600 -0.336800 -0.854500
|
||||
s off
|
||||
f 1/1/1 29/2/1 30/3/1 4/4/1
|
||||
f 8/5/2 5/6/2 31/7/2 32/8/2
|
||||
f 32/8/3 31/9/3 30/10/3 29/1/3
|
||||
f 8/2/4 1/5/4 4/11/4 5/12/4
|
||||
f 18/13/5 15/14/5 10/15/5 11/16/5
|
||||
f 19/17/6 18/18/6 11/19/6 12/20/6
|
||||
f 21/21/7 24/22/7 23/23/7 22/24/7
|
||||
f 25/25/8 26/26/8 27/27/8 28/28/8
|
||||
f 19/29/9 12/30/9 9/31/9 14/32/9
|
||||
f 22/26/10 23/21/10 27/22/10 26/27/10
|
||||
f 21/33/11 22/21/11 26/26/11 25/34/11
|
||||
f 24/22/12 28/27/12 27/35/12 23/36/12
|
||||
f 34/37/13 36/38/13 8/39/13 32/40/13
|
||||
f 33/41/13 34/37/13 32/40/13 29/42/13
|
||||
f 33/41/13 29/42/13 1/43/13 35/44/13
|
||||
f 35/44/13 1/43/13 8/39/13 36/38/13
|
||||
f 45/45/12 40/46/12 41/47/12 42/48/12 46/49/12
|
||||
f 48/50/11 47/51/11 43/52/11 44/53/11 38/54/11
|
||||
f 44/55/8 43/45/8 42/51/8 41/56/8 37/57/8
|
||||
f 48/47/7 39/58/7 45/52/7 46/59/7 47/60/7
|
||||
f 12/13/8 11/30/8 10/31/8 9/14/8
|
||||
f 19/29/7 14/32/7 15/61/7 18/62/7
|
||||
f 16/63/13 20/64/13 7/65/13 3/66/13
|
||||
f 13/67/13 16/63/13 3/66/13 2/68/13
|
||||
f 17/69/13 6/70/13 7/65/13 20/64/13
|
||||
f 13/67/13 2/68/13 6/70/13 17/69/13
|
||||
s 1
|
||||
f 73/71/14 72/72/15 52/44/16 61/73/17
|
||||
f 56/74/18 60/75/19 59/76/20 55/77/21 69/78/22
|
||||
f 74/79/23 63/80/24 51/37/25 66/81/26
|
||||
f 75/82/27 70/83/28 50/38/29 62/84/30
|
||||
f 76/85/31 64/86/32 52/41/16 72/87/15
|
||||
f 57/88/33 59/76/20 60/75/19 58/89/34
|
||||
f 55/77/21 59/76/20 57/88/33 53/90/35 68/91/36
|
||||
f 53/90/35 57/88/33 58/89/34 54/92/37 67/93/38
|
||||
f 54/92/37 58/89/34 60/75/19 56/74/18 65/94/39
|
||||
f 65/94/39 56/92/18 72/72/15 73/71/14
|
||||
f 54/74/37 65/94/39 73/71/14 70/87/28
|
||||
f 70/87/28 73/71/14 61/73/17 50/41/29
|
||||
f 68/91/36 74/79/23 66/81/26 55/77/21
|
||||
f 53/90/35 71/83/40 74/79/23 68/91/36
|
||||
f 71/83/40 49/38/41 63/80/24 74/79/23
|
||||
f 67/93/38 54/90/37 70/83/28 75/82/27
|
||||
f 53/92/35 67/93/38 75/82/27 71/72/40
|
||||
f 71/72/40 75/82/27 62/84/30 49/44/41
|
||||
f 69/78/22 76/85/31 72/87/15 56/74/18
|
||||
f 55/77/21 66/81/26 76/85/31 69/78/22
|
||||
f 66/81/26 51/37/25 64/86/32 76/85/31
|
Before Width: | Height: | Size: 614 B |
Before Width: | Height: | Size: 582 B |
After Width: | Height: | Size: 500 B |
Before Width: | Height: | Size: 500 B After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 517 B After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 612 B |
Before Width: | Height: | Size: 575 B |
Before Width: | Height: | Size: 587 B |
|
@ -103,21 +103,13 @@ function pipeworks.scan_for_tube_objects(pos)
|
|||
end
|
||||
end
|
||||
|
||||
minetest.register_on_placenode(function(pos, newnode, placer, oldnode, itemstack)
|
||||
if minetest.registered_items[newnode.name]
|
||||
and minetest.registered_items[newnode.name].tube
|
||||
and minetest.registered_items[newnode.name].tube.connect_sides then
|
||||
function pipeworks.after_place(pos)
|
||||
pipeworks.scan_for_tube_objects(pos)
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
minetest.register_on_dignode(function(pos, oldnode, digger)
|
||||
if minetest.registered_items[oldnode.name]
|
||||
and minetest.registered_items[oldnode.name].tube
|
||||
and minetest.registered_items[oldnode.name].tube.connect_sides then
|
||||
function pipeworks.after_dig(pos)
|
||||
pipeworks.scan_for_tube_objects(pos)
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
if minetest.get_modpath("mesecons_mvps") then
|
||||
mesecon.register_on_mvps_move(function(moved_nodes)
|
||||
|
|
|
@ -33,6 +33,8 @@ minetest.override_item("default:furnace", {
|
|||
input_inventory = "dst",
|
||||
connect_sides = {left = 1, right = 1, back = 1, front = 1, bottom = 1, top = 1}
|
||||
},
|
||||
after_place_node = pipeworks.after_place,
|
||||
after_dig_node = pipeworks.after_dig
|
||||
})
|
||||
|
||||
minetest.override_item("default:furnace_active", {
|
||||
|
@ -76,6 +78,8 @@ minetest.override_item("default:furnace_active", {
|
|||
input_inventory = "dst",
|
||||
connect_sides = {left = 1, right = 1, back = 1, front = 1, bottom = 1, top = 1}
|
||||
},
|
||||
after_place_node = pipeworks.after_place,
|
||||
after_dig_node = pipeworks.after_dig
|
||||
})
|
||||
|
||||
minetest.override_item("default:chest", {
|
||||
|
@ -102,6 +106,8 @@ minetest.override_item("default:chest", {
|
|||
input_inventory = "main",
|
||||
connect_sides = {left = 1, right = 1, back = 1, front = 1, bottom = 1, top = 1}
|
||||
},
|
||||
after_place_node = pipeworks.after_place,
|
||||
after_dig_node = pipeworks.after_dig
|
||||
})
|
||||
|
||||
minetest.override_item("default:chest_locked", {
|
||||
|
@ -127,4 +133,13 @@ minetest.override_item("default:chest_locked", {
|
|||
end,
|
||||
connect_sides = {left = 1, right = 1, back = 1, front = 1, bottom = 1, top = 1}
|
||||
},
|
||||
after_place_node = function (pos, placer)
|
||||
local meta = minetest.get_meta(pos)
|
||||
meta:set_string("owner", placer:get_player_name() or "")
|
||||
meta:set_string("infotext", "Locked Chest (owned by "..
|
||||
meta:get_string("owner")..")")
|
||||
pipeworks.after_place(pos)
|
||||
end,
|
||||
after_dig_node = pipeworks.after_dig
|
||||
})
|
||||
|
||||
|
|
|
@ -22,6 +22,8 @@ minetest.register_node("pipeworks:steel_block_embedded_tube", {
|
|||
return vector.equals(dir, direction) or vector.equals(vector.multiply(dir, -1), direction)
|
||||
end,
|
||||
},
|
||||
after_place_node = pipeworks.after_place,
|
||||
after_dig_node = pipeworks.after_dig,
|
||||
})
|
||||
|
||||
minetest.register_craft( {
|
||||
|
@ -67,6 +69,8 @@ minetest.register_node("pipeworks:steel_pane_embedded_tube", {
|
|||
return vector.equals(dir, direction) or vector.equals(vector.multiply(dir, -1), direction)
|
||||
end,
|
||||
},
|
||||
after_place_node = pipeworks.after_place,
|
||||
after_dig_node = pipeworks.after_dig,
|
||||
})
|
||||
|
||||
minetest.register_craft( {
|
||||
|
|
|
@ -177,7 +177,9 @@ for _, data in ipairs({
|
|||
end,
|
||||
after_place_node = function (pos, placer)
|
||||
minetest.get_meta(pos):set_string("owner", placer:get_player_name())
|
||||
pipeworks.after_place(pos)
|
||||
end,
|
||||
after_dig_node = pipeworks.after_dig,
|
||||
on_receive_fields = function(pos, formname, fields, sender)
|
||||
fs_helpers.on_receive_fields(pos, fields)
|
||||
local meta = minetest.get_meta(pos)
|
||||
|
|
|
@ -105,6 +105,8 @@ if pipeworks.enable_one_way_tube then
|
|||
end,
|
||||
priority = 75 -- Higher than normal tubes, but lower than receivers
|
||||
},
|
||||
after_place_node = pipeworks.after_place,
|
||||
after_dig_node = pipeworks.after_dig,
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = "pipeworks:one_way_tube 2",
|
||||
|
|
|
@ -86,7 +86,7 @@ if pipeworks.enable_conductor_tube then
|
|||
description = "Conducting Pneumatic Tube Segment on (you hacker you)",
|
||||
inventory_image = "pipeworks_conductor_tube_inv.png",
|
||||
short = "pipeworks_conductor_tube_short.png",
|
||||
plain_textures = { "pipeworks_conductor_tube_on_plain.png" },
|
||||
plain = { "pipeworks_conductor_tube_on_plain.png" },
|
||||
noctr = { "pipeworks_conductor_tube_on_noctr.png" },
|
||||
ends = { "pipeworks_conductor_tube_on_end.png" },
|
||||
node_def = {
|
||||
|
|
|
@ -32,12 +32,8 @@ minetest.register_node("pipeworks:trashcan", {
|
|||
meta:set_string("infotext", "Trash Can")
|
||||
meta:get_inventory():set_size("trash", 1)
|
||||
end,
|
||||
after_place_node = function(pos)
|
||||
pipeworks.scan_for_tube_objects(pos)
|
||||
end,
|
||||
after_dig_node = function(pos)
|
||||
pipeworks.scan_for_tube_objects(pos)
|
||||
end,
|
||||
after_place_node = pipeworks.after_place,
|
||||
after_dig_node = pipeworks.after_dig,
|
||||
on_metadata_inventory_put = function(pos, listname, index, stack, player)
|
||||
minetest.get_meta(pos):get_inventory():set_stack(listname, index, ItemStack(""))
|
||||
end,
|
||||
|
|
|
@ -106,18 +106,8 @@ local register_one_tube = function(name, tname, dropname, desc, plain, noctrs, e
|
|||
connect_sides = {front = 1, back = 1, left = 1, right = 1, top = 1, bottom = 1},
|
||||
priority = 50
|
||||
},
|
||||
--[[after_place_node = function(pos)
|
||||
pipeworks.scan_for_tube_objects(pos)
|
||||
if minetest.registered_nodes[rname].after_place_node_ then
|
||||
minetest.registered_nodes[rname].after_place_node_(pos)
|
||||
end
|
||||
end,
|
||||
after_dig_node = function(pos)
|
||||
pipeworks.scan_for_tube_objects(pos)
|
||||
if minetest.registered_nodes[rname].after_dig_node_ then
|
||||
minetest.registered_nodes[rname].after_dig_node_(pos)
|
||||
end
|
||||
end]]
|
||||
after_place_node = pipeworks.after_place,
|
||||
after_dig_node = pipeworks.after_dig
|
||||
}
|
||||
if style == "6d" then
|
||||
nodedef.paramtype2 = "facedir"
|
||||
|
@ -196,12 +186,7 @@ local register_all_tubes = function(name, desc, plain, noctrs, ends, short, inv,
|
|||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
description = "Pneumatic tube segment (legacy)",
|
||||
--[[after_place_node = function(pos)
|
||||
pipeworks.scan_for_tube_objects(pos)
|
||||
if minetest.registered_nodes[name.."_1"].after_place_node_ then
|
||||
minetest.registered_nodes[name.."_1"].after_place_node_(pos)
|
||||
end
|
||||
end,]]
|
||||
after_place_node = pipeworks.after_place,
|
||||
groups = {not_in_creative_inventory = 1, tube_to_update = 1, tube = 1},
|
||||
tube = {connect_sides = {front = 1, back = 1, left = 1, right = 1, top = 1, bottom = 1}},
|
||||
drop = name.."_1",
|
||||
|
|