1
0
mirror of https://github.com/sys4-fr/server-nalc.git synced 2024-11-17 07:50:29 +01:00

Upgraded hybrid mesecons

- Upgraded mesecons mod while adding old mesecons_compatibility to provide
  doors' redefinition.

NOTE: Every change in the doors' definition must now be recopied here!
This commit is contained in:
LeMagnesium 2015-04-16 18:25:01 +02:00
parent d1f720e9eb
commit 6705bf008f
53 changed files with 1504 additions and 574 deletions

View File

@ -1 +0,0 @@
*~

View File

@ -31,6 +31,14 @@ mesecon.rules.flat =
{x = 0, y = 0, z = 1},
{x = 0, y = 0, z =-1}}
mesecon.rules.alldirs =
{{x= 1, y= 0, z= 0},
{x=-1, y= 0, z= 0},
{x= 0, y= 1, z= 0},
{x= 0, y=-1, z= 0},
{x= 0, y= 0, z= 1},
{x= 0, y= 0, z=-1}}
mesecon.rules.buttonlike_get = function(node)
local rules = mesecon.rules.buttonlike
if node.param2 == 2 then

View File

@ -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

View File

@ -6,18 +6,6 @@ function mesecon.move_node(pos, newpos)
minetest.get_meta(pos):from_table(meta)
end
--[[ new functions:
mesecon.flattenrules(allrules)
mesecon.rule2bit(findrule, allrules)
mesecon.rule2meta(findrule, allrules)
dec2bin(n)
mesecon.getstate(nodename, states)
mesecon.getbinstate(nodename, states)
mesecon.get_bit(binary, bit)
mesecon.set_bit(binary, bit, value)
mesecon.invertRule(r)
--]]
function mesecon.flattenrules(allrules)
--[[
{
@ -71,7 +59,6 @@ end
function mesecon.rule2metaindex(findrule, allrules)
--get the metarule the rule is in, or allrules
if allrules[1].x then
return nil
end
@ -90,6 +77,8 @@ function mesecon.rule2metaindex(findrule, allrules)
end
function mesecon.rule2meta(findrule, allrules)
if #allrules == 0 then return {} end
local index = mesecon.rule2metaindex(findrule, allrules)
if index == nil then
if allrules[1].x then
@ -101,22 +90,13 @@ function mesecon.rule2meta(findrule, allrules)
return allrules[index]
end
if convert_base then
print(
"base2dec is tonumber(num,base1)\n"..
"commonlib needs dec2base(num,base2)\n"..
"and it needs base2base(num,base1,base2),\n"..
"which is dec2base(tonumber(num,base1),base2)"
)
else
function dec2bin(n)
function mesecon.dec2bin(n)
local x, y = math.floor(n / 2), n % 2
if (n > 1) then
return dec2bin(x)..y
return mesecon.dec2bin(x)..y
else
return ""..y
end
end
end
function mesecon.getstate(nodename, states)
@ -129,7 +109,7 @@ function mesecon.getstate(nodename, states)
end
function mesecon.getbinstate(nodename, states)
return dec2bin(mesecon.getstate(nodename, states)-1)
return mesecon.dec2bin(mesecon.getstate(nodename, states)-1)
end
function mesecon.get_bit(binary,bit)
@ -141,11 +121,11 @@ end
function mesecon.set_bit(binary,bit,value)
if value == "1" then
if not mesecon.get_bit(binary,bit) then
return dec2bin(tonumber(binary,2)+math.pow(2,bit-1))
return mesecon.dec2bin(tonumber(binary,2)+math.pow(2,bit-1))
end
elseif value == "0" then
if mesecon.get_bit(binary,bit) then
return dec2bin(tonumber(binary,2)-math.pow(2,bit-1))
return mesecon.dec2bin(tonumber(binary,2)-math.pow(2,bit-1))
end
end
return binary

View File

@ -47,5 +47,5 @@ minetest.register_craft({
output = "mesecons_blinkyplant:blinky_plant_off 1",
recipe = { {"","group:mesecon_conductor_craftable",""},
{"","group:mesecon_conductor_craftable",""},
{"default:sapling","default:sapling","default:sapling"}}
{"group:sapling","group:sapling","group:sapling"}}
})

View File

@ -135,8 +135,12 @@ end
-- returns true if player was found, false if not
local node_detector_scan = function (pos)
local node = minetest.get_node(pos)
local frontpos = vector.subtract(pos, minetest.facedir_to_dir(node.param2))
if not pos then return end
local node = minetest.get_node_or_nil(pos)
if not node then return end
local scandir = minetest.facedir_to_dir(node.param2)
if not scandir then return end
local frontpos = vector.subtract(pos, scandir)
local frontnode = minetest.get_node(frontpos)
local meta = minetest.get_meta(pos)
return (frontnode.name == meta:get_string("scanname")) or

View File

@ -0,0 +1,2 @@
mesecons
doors

View 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

View File

@ -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,

View File

@ -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,

View File

@ -78,7 +78,7 @@ function register_gate(name, inputnumber, assess, recipe)
},{
tiles = {"jeija_microcontroller_bottom.png^".."jeija_gate_off.png^"..
"jeija_gate_"..name..".png"},
groups = {dig_immediate = 2},
groups = {dig_immediate = 2, overheat = 1},
mesecons = { receptor = {
state = "off",
rules = gate_get_output_rules
@ -89,7 +89,7 @@ function register_gate(name, inputnumber, assess, recipe)
},{
tiles = {"jeija_microcontroller_bottom.png^".."jeija_gate_on.png^"..
"jeija_gate_"..name..".png"},
groups = {dig_immediate = 2, not_in_creative_inventory = 1},
groups = {dig_immediate = 2, not_in_creative_inventory = 1, overheat = 1},
mesecons = { receptor = {
state = "on",
rules = gate_get_output_rules

View File

@ -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 = {

View File

@ -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

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 835 B

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 817 B

After

Width:  |  Height:  |  Size: 2.9 KiB

View File

@ -1 +1,2 @@
mesecons
dye

View File

@ -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")

View File

@ -559,7 +559,6 @@ for d = 0, 1 do
node_box = node_box,
on_construct = reset_meta,
on_receive_fields = on_receive_fields,
on_timer = handle_timer,
sounds = default.node_sound_stone_defaults(),
mesecons = mesecons,
digiline = digiline,
@ -600,7 +599,7 @@ minetest.register_node(BASENAME .. "_burnt", {
groups = {dig_immediate=2, not_in_creative_inventory=1},
drop = BASENAME.."0000",
sunlight_propagates = true,
selection_box = selectionbox,
selection_box = selection_box,
node_box = node_box,
on_construct = reset_meta,
on_receive_fields = on_receive_fields,

View File

@ -14,7 +14,7 @@ minetest.register_craftitem("mesecons_materials:fiber", {
minetest.register_craft({
output = "mesecons_materials:glue 2",
type = "cooking",
recipe = "default:sapling",
recipe = "group:sapling",
cooktime = 2
})
@ -35,7 +35,7 @@ minetest.register_craftitem("mesecons_materials:silicon", {
minetest.register_craft({
output = "mesecons_materials:silicon 4",
recipe = {
{"default:sand", "default:sand"},
{"default:sand", "default:steel_ingot"},
{"group:sand", "group:sand"},
{"group:sand", "default:steel_ingot"},
}
})

View File

@ -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")

View File

@ -1,9 +1,19 @@
--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
@ -19,15 +29,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
@ -46,37 +47,102 @@ function mesecon.mvps_process_stack(stack)
end
end
function mesecon.mvps_get_stack(pos, dir, maximum)
function mesecon.mvps_get_stack(pos, dir, maximum, all_pull_sticky)
-- determine the number of nodes to be pushed
local np = {x = pos.x, y = pos.y, z = pos.z}
local nodes = {}
while true do
local nn = minetest.get_node_or_nil(np)
if not nn or #nodes > maximum then
-- don't push at all, something is in the way (unloaded map or too many nodes)
return nil
local frontiers = {pos}
while #frontiers > 0 do
local np = frontiers[1]
local nn = minetest.get_node(np)
if nn.name ~= "air"
and minetest.registered_nodes[nn.name]
and minetest.registered_nodes[nn.name].liquidtype == "none" then
table.insert(nodes, {node = nn, pos = np})
if #nodes > maximum then return nil end
-- add connected nodes to frontiers, connected is a vector list
-- the vectors must be absolute positions
local connected = {}
if minetest.registered_nodes[nn.name]
and minetest.registered_nodes[nn.name].mvps_sticky then
connected = minetest.registered_nodes[nn.name].mvps_sticky(np, nn)
end
if nn.name == "air"
or (minetest.registered_nodes[nn.name]
and minetest.registered_nodes[nn.name].liquidtype ~= "none") then --is liquid
break
table.insert(connected, vector.add(np, dir))
-- If adjacent node is sticky block and connects add that
-- position to the connected table
for _, r in ipairs(mesecon.rules.alldirs) do
local adjpos = vector.add(np, r)
local adjnode = minetest.get_node(adjpos)
if minetest.registered_nodes[adjnode.name]
and minetest.registered_nodes[adjnode.name].mvps_sticky then
local sticksto = minetest.registered_nodes[adjnode.name]
.mvps_sticky(adjpos, adjnode)
-- connects to this position?
for _, link in ipairs(sticksto) do
if vector.equals(link, np) then
table.insert(connected, adjpos)
end
end
end
end
table.insert (nodes, {node = nn, pos = np})
np = mesecon.addPosRule(np, dir)
if all_pull_sticky then
table.insert(connected, vector.subtract(np, dir))
end
-- Make sure there are no duplicates in frontiers / nodes before
-- adding nodes in "connected" to frontiers
for _, cp in ipairs(connected) do
local duplicate = false
for _, rp in ipairs(nodes) do
if vector.equals(cp, rp.pos) then
duplicate = true
end
end
for _, fp in ipairs(frontiers) do
if vector.equals(cp, fp) then
duplicate = true
end
end
if not duplicate then
table.insert(frontiers, cp)
end
end
end
table.remove(frontiers, 1)
end
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, true)
end
function mesecon.mvps_pull_single(pos, dir, maximum)
return mesecon.mvps_push_or_pull(pos, vector.multiply(dir, -1), dir, maximum)
end
-- pos: pos of mvps; stackdir: direction of building the stack
-- movedir: direction of actual movement
-- maximum: maximum nodes to be pushed
-- all_pull_sticky: All nodes are sticky in the direction that they are pulled from
function mesecon.mvps_push_or_pull(pos, stackdir, movedir, maximum, all_pull_sticky)
local nodes = mesecon.mvps_get_stack(pos, movedir, maximum, all_pull_sticky)
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 +160,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 +171,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
@ -122,73 +189,6 @@ mesecon.register_on_mvps_move(function(moved_nodes)
end
end)
function mesecon.mvps_pull_single(pos, dir) -- pos: pos of mvps; direction: direction of pull (matches push direction for sticky pistons)
local np = mesecon.addPosRule(pos, dir)
local nn = minetest.get_node(np)
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
local meta = minetest.get_meta(np):to_table()
minetest.remove_node(np)
minetest.add_node(pos, nn)
minetest.get_meta(pos):from_table(meta)
nodeupdate(np)
nodeupdate(pos)
mesecon.on_dignode(np, nn)
mesecon.update_autoconnect(np)
on_mvps_move({{pos = pos, oldpos = np, node = nn, meta = meta}})
end
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 +231,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")

View File

@ -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

View File

@ -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
@ -100,9 +100,10 @@ local piston_off = function(pos, node)
piston_remove_pusher(pos, node)
if pistonspec.sticky then
local maxpull = mesecon.setting("piston_max_pull", 15)
local dir = piston_get_direction(pistonspec.dir, node)
local pullpos = mesecon.addPosRule(pos, dir)
local stack = mesecon.mvps_pull_single(pullpos, dir)
local pullpos = vector.add(pos, vector.multiply(dir, 2))
local stack = mesecon.mvps_pull_single(pullpos, vector.multiply(dir, -1), maxpull)
mesecon.mvps_process_stack(pos, dir, stack)
end
end
@ -274,7 +275,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,

View File

@ -26,6 +26,6 @@ minetest.register_craft({
recipe = {
{"group:mesecon_conductor_craftable"},
{"group:mesecon_conductor_craftable"},
{"default:sapling"},
{"group:sapling"},
}
})

View File

@ -22,18 +22,12 @@ pp_on_timer = function (pos, elapsed)
if objs[1] == nil and node.name == basename .. "_on" then
minetest.add_node(pos, {name = basename .. "_off"})
mesecon.receptor_off(pos, mesecon.rules.pplate)
-- force deactivation of mesecon two blocks below (hacky)
if not mesecon.connected_to_receptor(two_below) then
mesecon.turnoff(two_below)
end
else
elseif node.name == basename .. "_off" then
for k, obj in pairs(objs) do
local objpos = obj:getpos()
if objpos.y > pos.y-1 and objpos.y < pos.y then
minetest.add_node(pos, {name = basename .. "_on"})
mesecon.receptor_on(pos, mesecon.rules.pplate )
-- force activation of mesecon two blocks below (hacky)
mesecon.turnon(two_below)
end
end
end

View File

@ -0,0 +1,2 @@
mesecons
mesecons_mvps

View File

@ -0,0 +1,16 @@
-- Sticky blocks can be used together with pistons or movestones to push / pull
-- structures that are "glued" together using sticky blocks
-- All sides sticky block
minetest.register_node("mesecons_stickyblocks:sticky_block_all", {
description = "All-sides sticky block",
tiles = {"default_grass_footsteps.png"},
groups = {dig_immediate=2},
mvps_sticky = function (pos, node)
local connected = {}
for _, r in ipairs(mesecon.rules.alldirs) do
table.insert(connected, vector.add(pos, r))
end
return connected
end
})

View File

@ -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

View 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

View 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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 614 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 582 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 500 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 500 B

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 517 B

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 612 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 575 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 587 B