A crude wooden windmill

This commit is contained in:
Evert Prants 2019-01-28 13:43:07 +02:00
parent ef344daed7
commit 6b1d222d1d
Signed by: evert
GPG Key ID: 1688DA83D222D0B5
12 changed files with 750 additions and 2 deletions

View File

@ -236,7 +236,7 @@ minetest.register_craft({
minetest.register_craft({ minetest.register_craft({
output = "elepower_dynamics:battery 2", output = "elepower_dynamics:battery 2",
recipe = { recipe = {
{"elepower_dynamics:zinc_dust", "elepower_dynamics:wound_copper_coil", "elepower_dynamics:lead_dust"}, {"elepower_dynamics:zinc_dust", "elepower_dynamics:graphite_rod", "elepower_dynamics:lead_dust"},
{"elepower_dynamics:tin_plate", "default:mese_crystal_fragment", "elepower_dynamics:tin_plate"}, {"elepower_dynamics:tin_plate", "default:mese_crystal_fragment", "elepower_dynamics:tin_plate"},
{"elepower_dynamics:tin_plate", "default:mese_crystal_fragment", "elepower_dynamics:tin_plate"}, {"elepower_dynamics:tin_plate", "default:mese_crystal_fragment", "elepower_dynamics:tin_plate"},
} }

View File

@ -425,6 +425,24 @@ minetest.register_craft({
} }
}) })
minetest.register_craft({
output = "elepower_machines:wind_turbine_blade",
recipe = {
{"", "default:wood", "default:wood"},
{"default:stick", "default:wood", "default:wood"},
{"default:stick", "default:stick", ""},
}
})
minetest.register_craft({
output = "elepower_machines:wind_turbine_blades",
recipe = {
{"elepower_machines:wind_turbine_blade", "elepower_machines:wind_turbine_blade", "elepower_machines:wind_turbine_blade"},
{"elepower_machines:wind_turbine_blade", "default:wood", "elepower_machines:wind_turbine_blade"},
{"elepower_machines:wind_turbine_blade", "elepower_machines:wind_turbine_blade", "elepower_machines:wind_turbine_blade"},
}
})
-- Nodes -- Nodes
-- Coal-fired Alloy Furnace -- Coal-fired Alloy Furnace
@ -686,3 +704,13 @@ minetest.register_craft({
{"elepower_dynamics:electrum_plate", "elepower_machines:opaque_duct_roll", "elepower_dynamics:electrum_plate"}, {"elepower_dynamics:electrum_plate", "elepower_machines:opaque_duct_roll", "elepower_dynamics:electrum_plate"},
} }
}) })
-- Wind Turbine
minetest.register_craft({
output = "elepower_machines:wind_turbine",
recipe = {
{"elepower_dynamics:wound_copper_coil", "elepower_machines:turbine_blades", "elepower_dynamics:wound_copper_coil"},
{"elepower_dynamics:steel_plate", "elepower_machines:machine_block", "elepower_dynamics:steel_plate"},
{"elepower_dynamics:invar_gear", "elepower_dynamics:steel_plate", "elepower_dynamics:invar_gear"},
}
})

View File

@ -130,3 +130,10 @@ minetest.register_craftitem("elepower_machines:heavy_filter", {
return itemstack return itemstack
end end
}) })
-- Wind turbine
minetest.register_craftitem("elepower_machines:wind_turbine_blade", {
description = "Wind Turbine Blade (Wooden)",
inventory_image = "elepower_wind_turbine_blade.png",
})

View File

@ -40,6 +40,9 @@ function ele.register_fluid_generator(nodename, nodedef)
ele_provider = 1, ele_provider = 1,
oddly_breakable_by_hand = 1, oddly_breakable_by_hand = 1,
}, },
ele_upgrades = {
capacitor = {"capacity"},
},
tube = false, tube = false,
on_timer = function (pos, elapsed) on_timer = function (pos, elapsed)
local refresh = false local refresh = false

View File

@ -34,6 +34,12 @@ function elepm.register_fuel_generator(nodename, nodedef)
nodedef.get_formspec = nil nodedef.get_formspec = nil
end end
if not nodedef.ele_upgrades then
nodedef.ele_upgrades = {
capacitor = {"capacity"},
}
end
nodedef.on_timer = function (pos, elapsed) nodedef.on_timer = function (pos, elapsed)
local refresh = false local refresh = false
local meta = minetest.get_meta(pos) local meta = minetest.get_meta(pos)

View File

@ -9,6 +9,7 @@ dofile(mp .. "generator.lua")
dofile(mp .. "lava_generator.lua") dofile(mp .. "lava_generator.lua")
dofile(mp .. "steam_turbine.lua") dofile(mp .. "steam_turbine.lua")
dofile(mp .. "fuel_burner.lua") dofile(mp .. "fuel_burner.lua")
dofile(mp .. "wind_turbine.lua")
-- Storage -- Storage
dofile(mp .. "storage.lua") dofile(mp .. "storage.lua")

View File

@ -0,0 +1,193 @@
local function get_formspec_default(power, state)
return "size[8,8.5]"..
default.gui_bg..
default.gui_bg_img..
default.gui_slots..
ele.formspec.power_meter(power)..
ele.formspec.state_switcher(7, 0, state)..
"list[current_player;main;0,4.25;8,1;]"..
"list[current_player;main;0,5.5;8,3;8]"..
default.get_hotbar_bg(0, 4.25)
end
-- Primitive wind checking function
elepm.wind_height_constant = 100
function elepm.wind_check(pos)
if pos.y < elepm.wind_height_constant then
return 0
end
return math.floor(pos.y / elepm.wind_height_constant)
end
-- A generator that creates power using altitude
function ele.register_wind_generator(nodename, nodedef)
-- Allow for custom formspec
local get_formspec = get_formspec_default
if nodedef.get_formspec then
get_formspec = nodedef.get_formspec
nodedef.get_formspec = nil
end
local defaults = {
groups = {
ele_provider = 1,
oddly_breakable_by_hand = 1,
wind_generator = 1,
},
tube = false,
paramtype2 = 0,
on_timer = function (pos, elapsed)
local refresh = false
local meta = minetest.get_meta(pos)
local capacity = ele.helpers.get_node_property(meta, pos, "capacity")
local generation = ele.helpers.get_node_property(meta, pos, "usage")
local storage = ele.helpers.get_node_property(meta, pos, "storage")
local state = meta:get_int("state")
local is_enabled = ele.helpers.state_enabled(meta, pos, state)
local pow_buffer = {capacity = capacity, storage = storage, usage = 0}
local status = "Idle"
local wind = meta:get_int("wind")
while true do
if not is_enabled then
status = "Off"
wind = 0
break
end
local multiplier = 1
local tentpos = vector.subtract(pos, {x=0,y=0,z=1})
for i, ob in pairs(minetest.get_objects_inside_radius(tentpos, 0.5)) do
if ob:get_luaentity() and ob:get_luaentity().name == "elepower_machines:wind_turbine_blades" then
multiplier = 4
break
end
end
wind = elepm.wind_check(pos) * multiplier
if wind == 0 then
status = "No wind"
break
end
status = "Active"
refresh = true
pow_buffer.usage = wind
pow_buffer.storage = pow_buffer.storage + pow_buffer.usage
break
end
meta:set_string("formspec", get_formspec(pow_buffer, state))
meta:set_string("infotext", ("Wind Turbine %s\n%s"):format(status,
ele.capacity_text(capacity, pow_buffer.storage)))
meta:set_int("storage", pow_buffer.storage)
meta:set_int("wind", wind)
return refresh
end,
on_construct = function (pos)
local meta = minetest.get_meta(pos)
local capacity = ele.helpers.get_node_property(meta, pos, "capacity")
local storage = ele.helpers.get_node_property(meta, pos, "storage")
meta:set_string("formspec", get_formspec({capacity = capacity, storage = storage, usage = 0}, 0))
end
}
for key,val in pairs(defaults) do
if not nodedef[key] then
nodedef[key] = val
end
end
ele.register_machine(nodename, nodedef)
end
ele.register_wind_generator("elepower_machines:wind_turbine", {
description = "Wind Turbine\nRequires Wind Turbine Blades",
tiles = {
"elepower_machine_top.png", "elepower_machine_base.png", "elepower_machine_side.png",
"elepower_machine_side.png", "elepower_machine_side.png", "elepower_wind_turbine_face.png",
},
ele_upgrades = {
capacitor = {"capacity"},
}
})
minetest.register_craftitem("elepower_machines:wind_turbine_blades", {
description = "Wind Turbine Blades (Wooden)\nSneak Right-Click on the Wind Turbine node to place it",
inventory_image = "elepower_wind_turbine_blades.png",
on_place = function (itemstack, clicker, pointed_thing)
local pos = pointed_thing.under
if pointed_thing.type ~= "node" then return itemstack end
local node = minetest.get_node(pos)
if minetest.get_item_group(node.name, "wind_generator") == 0 then
return itemstack
end
local place_at = vector.add(pos, {x = 0, y = 0, z = -1})
local e = minetest.add_entity(place_at, "elepower_machines:wind_turbine_blades")
local ent = e:get_luaentity()
ent.controller = pos
itemstack:take_item(1)
return itemstack
end
})
minetest.register_entity("elepower_machines:wind_turbine_blades", {
initial_properties = {
hp_max = 10,
visual = "mesh",
mesh = "elepower_wind_blades.obj",
physical = true,
textures = {"default_wood.png"},
backface_culling = false,
visual_size = {x = 10, y = 10},
},
timer = 0,
controller = {x = 0, y = 0, z = 0},
wind = false,
on_step = function (self, dt)
if self.wind then
local rot = self.object:get_rotation()
self.object:set_rotation({x = 0, y = 0, z = rot.z + 0.02 * math.pi})
end
-- Wind check timer
self.timer = self.timer + 1
if self.timer < 100 then
return self
end
self.timer = 0
local meta = minetest.get_meta(self.controller)
if meta and meta:get_int("wind") > 0 then
self.wind = true
else
self.wind = false
end
end,
on_punch = function (self, puncher, time_from_last_punch, tool_capabilities, dir)
local itm = ItemStack("elepower_machines:wind_turbine_blades")
if not puncher or puncher == "" or puncher:get_player_name() == "" then return self end
local inv = puncher:get_inventory()
if inv:room_for_item("main", itm) then
inv:add_item("main", itm)
else
minetest.item_drop(itm, puncher, self.object:get_pos())
end
self.object:set_hp(0)
end
})

View File

@ -0,0 +1,507 @@
# Blender v2.79 (sub 6) OBJ File: 'wind turbine blades.blend'
# www.blender.org
o Cube
v -1.000000 -1.000000 1.000000
v -1.000000 1.000000 1.000000
v -1.000000 -1.000000 -1.000000
v -1.000000 1.000000 -1.000000
v 1.000000 -1.000000 1.000000
v 1.000000 1.000000 1.000000
v 1.000000 -1.000000 -1.000000
v 1.000000 1.000000 -1.000000
v -1.414214 0.000000 1.000000
v 0.000000 1.414214 1.000000
v -1.414214 0.000000 -1.000000
v 0.000000 1.414214 -1.000000
v 0.000000 -1.414214 1.000000
v 1.414214 0.000000 1.000000
v 0.000000 -1.414214 -1.000000
v 1.414214 0.000000 -1.000000
v -0.848528 0.565685 -0.200000
v -0.848528 0.565685 0.200000
v -0.565685 0.848528 0.200000
v -0.565685 0.848528 -0.200000
v -0.200000 1.000000 0.200000
v -0.200000 1.000000 -0.200000
v 0.200000 1.000000 -0.200000
v 0.200000 1.000000 0.200000
v -0.200000 -1.000000 -0.200000
v -0.200000 -1.000000 0.200000
v 0.200000 -1.000000 -0.200000
v 0.200000 -1.000000 0.200000
v 0.565685 0.848528 0.200000
v 0.565685 0.848528 -0.200000
v 0.848528 0.565685 -0.200000
v 0.848528 0.565685 0.200000
v -0.848528 -0.565685 -0.200000
v -0.848528 -0.565685 0.200000
v -0.565685 -0.848528 -0.200000
v -0.565685 -0.848528 0.200000
v 0.848528 -0.565685 -0.200000
v 0.565685 -0.848528 -0.200000
v 0.565685 -0.848528 0.200000
v 0.848528 -0.565685 0.200000
v 1.000000 0.200000 -0.200000
v 1.000000 -0.200000 -0.200000
v 1.000000 -0.200000 0.200000
v 1.000000 0.200000 0.200000
v -1.000000 -0.200000 -0.200000
v -1.000000 -0.200000 0.200000
v -1.000000 0.200000 0.200000
v -1.000000 0.200000 -0.200000
v -4.992953 4.906541 0.061102
v -4.906541 4.992953 0.061102
v -4.906541 4.992953 -0.061102
v -4.992953 4.906541 -0.061102
v 0.061102 7.000000 -0.061102
v -0.061102 7.000000 -0.061102
v -0.061102 7.000000 0.061102
v 0.061102 7.000000 0.061102
v -0.061102 -7.000000 -0.061102
v 0.061102 -7.000000 -0.061102
v 0.061102 -7.000000 0.061102
v -0.061102 -7.000000 0.061102
v 4.992953 4.906541 -0.061102
v 4.906541 4.992953 -0.061102
v 4.906541 4.992953 0.061102
v 4.992953 4.906541 0.061102
v -4.992953 -4.906541 -0.061102
v -4.906541 -4.992953 -0.061102
v -4.906541 -4.992953 0.061102
v -4.992953 -4.906541 0.061102
v 4.906541 -4.992953 -0.061102
v 4.992953 -4.906541 -0.061102
v 4.992953 -4.906541 0.061102
v 4.906541 -4.992953 0.061102
v 7.000000 -0.061102 -0.061102
v 7.000000 0.061102 -0.061102
v 7.000000 0.061102 0.061102
v 7.000000 -0.061102 0.061102
v -7.000000 -0.061102 0.061102
v -7.000000 0.061102 0.061102
v -7.000000 0.061102 -0.061102
v -7.000000 -0.061102 -0.061102
v 3.000292 -0.707107 0.707107
v 7.000292 -0.707107 0.707107
v 3.000292 0.707107 -0.707107
v 7.000292 0.707107 -0.707107
v 3.000292 -0.707107 0.707107
v 7.000292 -0.707107 0.707107
v 3.000292 0.707107 -0.707107
v 7.000292 0.707107 -0.707107
v 1.621527 -2.621527 0.707107
v 4.449954 -5.449954 0.707107
v 2.621527 -1.621527 -0.707107
v 5.449954 -4.449954 -0.707107
v -0.707107 -3.000292 0.707107
v -0.707107 -7.000292 0.707107
v 0.707107 -3.000292 -0.707107
v 0.707107 -7.000292 -0.707107
v -2.621527 -1.621527 0.707107
v -5.449954 -4.449954 0.707107
v -1.621527 -2.621527 -0.707107
v -4.449954 -5.449954 -0.707107
v -3.000292 0.707107 0.707107
v -7.000291 0.707107 0.707107
v -3.000292 -0.707107 -0.707107
v -7.000291 -0.707107 -0.707107
v -1.621527 2.621527 0.707107
v -4.449954 5.449954 0.707107
v -2.621527 1.621527 -0.707107
v -5.449954 4.449954 -0.707107
v 0.707107 3.000292 0.707107
v 0.707107 7.000291 0.707107
v -0.707107 3.000292 -0.707107
v -0.707107 7.000291 -0.707107
v 2.621527 1.621527 0.707107
v 5.449954 4.449954 0.707107
v 1.621527 2.621527 -0.707107
v 4.449954 5.449954 -0.707107
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000254 0.399949
vt 0.399441 0.399949
vt 0.399441 0.599543
vt 0.000254 0.599543
vt 0.200356 0.000254
vt 0.599543 0.000254
vt 0.599543 0.199848
vt 0.200356 0.199848
vt 0.399949 0.799136
vt 0.399949 0.399949
vt 0.599543 0.399949
vt 0.599543 0.799136
vt 0.000254 0.399441
vt 0.000254 0.000254
vt 0.199848 0.000254
vt 0.199848 0.399441
vt 0.999238 0.599543
vt 0.600051 0.599543
vt 0.600051 0.399949
vt 0.999238 0.399949
vt 0.799644 0.600051
vt 0.799644 0.999238
vt 0.600051 0.999238
vt 0.600051 0.600051
vt 0.799644 0.000254
vt 0.799644 0.399441
vt 0.600051 0.399441
vt 0.600051 0.000254
vt 0.000254 0.800152
vt 0.399441 0.800152
vt 0.399441 0.999746
vt 0.000254 0.999746
vt 0.000254 0.600051
vt 0.399441 0.600051
vt 0.399441 0.799644
vt 0.000254 0.799644
vn -1.0000 -0.0000 0.0000
vn 0.0000 0.0000 -1.0000
vn 1.0000 0.0000 0.0000
vn 0.0000 0.0000 1.0000
vn 0.0000 -1.0000 0.0000
vn 0.0000 1.0000 0.0000
vn -0.7071 0.7071 -0.0000
vn 0.7071 -0.7071 0.0000
vn -0.7071 -0.7071 0.0000
vn 0.7071 0.7071 0.0000
vn -0.0164 0.0164 0.9997
vn 0.6906 0.7233 0.0000
vn -0.0164 0.0164 -0.9997
vn -0.7233 -0.6906 0.0000
vn 0.0000 0.0231 -0.9997
vn -0.9997 0.0231 0.0000
vn 0.0000 0.0231 0.9997
vn 0.9997 0.0231 0.0000
vn 0.0000 -0.0231 -0.9997
vn 0.9997 -0.0231 0.0000
vn 0.0000 -0.0231 0.9997
vn -0.9997 -0.0231 0.0000
vn 0.0164 0.0164 -0.9997
vn -0.6906 0.7233 0.0000
vn 0.0164 0.0164 0.9997
vn 0.7233 -0.6906 0.0000
vn -0.0164 -0.0164 -0.9997
vn 0.6906 -0.7233 0.0000
vn -0.0164 -0.0164 0.9997
vn -0.7233 0.6906 0.0000
vn 0.0164 -0.0164 -0.9997
vn 0.7233 0.6906 0.0000
vn 0.0164 -0.0164 0.9997
vn -0.6906 -0.7233 0.0000
vn 0.0231 0.0000 -0.9997
vn 0.0231 0.9997 0.0000
vn 0.0231 0.0000 0.9997
vn 0.0231 -0.9997 0.0000
vn -0.0231 0.0000 0.9997
vn -0.0231 0.9997 0.0000
vn -0.0231 0.0000 -0.9997
vn -0.0231 -0.9997 0.0000
vn 0.0000 0.7071 0.7071
vn 0.5000 0.5000 0.7071
vn 0.7071 0.0000 0.7071
vn 0.5000 -0.5000 0.7071
vn 0.0000 -0.7071 0.7071
vn -0.5000 -0.5000 0.7071
vn -0.7071 -0.0000 0.7071
vn -0.5000 0.5000 0.7071
s off
f 2/1/1 4/2/1 48/3/1 47/4/1
f 3/5/2 4/2/2 8/6/2 7/7/2
f 6/8/3 5/9/3 43/10/3 44/11/3
f 5/12/4 6/13/4 2/14/4 1/15/4
f 1/16/5 3/17/5 25/18/5 26/19/5
f 4/20/6 2/21/6 21/22/6 22/23/6
f 9/24/7 10/25/7 19/26/7 18/27/7
f 11/28/2 12/29/2 16/30/2 15/31/2
f 16/32/8 14/33/8 40/34/8 37/35/8
f 13/36/4 14/33/4 10/37/4 9/38/4
f 13/36/9 9/39/9 34/40/9 36/41/9
f 14/42/10 16/43/10 31/44/10 32/45/10
f 10/46/7 12/29/7 20/47/7 19/48/7
f 11/28/7 9/39/7 18/49/7 17/50/7
f 12/51/7 11/52/7 17/53/7 20/54/7
f 2/1/6 6/13/6 24/55/6 21/56/6
f 8/57/6 4/2/6 22/58/6 23/59/6
f 6/8/6 8/60/6 23/61/6 24/62/6
f 7/63/5 5/9/5 28/64/5 27/65/5
f 5/12/5 1/66/5 26/67/5 28/68/5
f 3/5/5 7/69/5 27/70/5 25/71/5
f 12/51/10 10/25/10 29/72/10 30/73/10
f 10/46/10 14/33/10 32/74/10 29/75/10
f 16/32/10 12/29/10 30/76/10 31/77/10
f 11/28/9 15/78/9 35/79/9 33/80/9
f 9/24/9 11/52/9 33/81/9 34/82/9
f 15/83/9 13/84/9 36/85/9 35/86/9
f 15/83/8 16/43/8 37/87/8 38/88/8
f 14/42/8 13/84/8 39/89/8 40/90/8
f 13/36/8 15/78/8 38/91/8 39/92/8
f 5/12/3 7/69/3 42/93/3 43/94/3
f 8/57/3 6/13/3 44/95/3 41/96/3
f 7/63/3 8/60/3 41/97/3 42/98/3
f 3/5/1 1/66/1 46/99/1 45/100/1
f 4/20/1 3/17/1 45/101/1 48/102/1
f 1/16/1 2/21/1 47/103/1 46/104/1
f 49/105/7 50/106/7 51/107/7 52/108/7
f 19/109/11 50/106/11 49/110/11 18/27/11
f 20/111/12 51/112/12 50/113/12 19/48/12
f 17/114/13 52/115/13 51/107/13 20/54/13
f 18/116/14 49/117/14 52/118/14 17/50/14
f 53/119/6 54/120/6 55/121/6 56/122/6
f 22/123/15 54/120/15 53/124/15 23/59/15
f 21/125/16 55/126/16 54/127/16 22/23/16
f 24/128/17 56/129/17 55/121/17 21/56/17
f 23/130/18 53/131/18 56/132/18 24/62/18
f 57/133/5 58/134/5 59/135/5 60/136/5
f 27/137/19 58/134/19 57/138/19 25/71/19
f 28/139/20 59/140/20 58/141/20 27/65/20
f 26/142/21 60/143/21 59/135/21 28/68/21
f 25/144/22 57/145/22 60/146/22 26/19/22
f 61/147/10 62/148/10 63/149/10 64/150/10
f 30/151/23 62/148/23 61/152/23 31/77/23
f 29/153/24 63/154/24 62/155/24 30/73/24
f 32/156/25 64/157/25 63/149/25 29/75/25
f 31/158/26 61/159/26 64/160/26 32/45/26
f 65/161/9 66/162/9 67/163/9 68/164/9
f 35/165/27 66/162/27 65/166/27 33/80/27
f 36/167/28 67/168/28 66/169/28 35/86/28
f 34/170/29 68/171/29 67/163/29 36/41/29
f 33/172/30 65/173/30 68/174/30 34/82/30
f 69/175/8 70/176/8 71/177/8 72/178/8
f 37/179/31 70/176/31 69/180/31 38/88/31
f 40/181/32 71/182/32 70/183/32 37/35/32
f 39/184/33 72/185/33 71/177/33 40/90/33
f 38/186/34 69/187/34 72/188/34 39/92/34
f 73/189/3 74/190/3 75/191/3 76/192/3
f 41/193/35 74/190/35 73/194/35 42/98/35
f 44/195/36 75/196/36 74/197/36 41/96/36
f 43/198/37 76/199/37 75/191/37 44/11/37
f 42/200/38 73/201/38 76/202/38 43/94/38
f 77/203/1 78/204/1 79/205/1 80/206/1
f 47/207/39 78/204/39 77/208/39 46/104/39
f 48/209/40 79/210/40 78/211/40 47/4/40
f 45/212/41 80/213/41 79/205/41 48/102/41
f 46/214/42 77/215/42 80/216/42 45/100/42
f 81/217/43 82/218/43 84/219/43 83/220/43
f 85/221/43 86/222/43 88/223/43 87/224/43
f 89/225/44 90/226/44 92/227/44 91/228/44
f 93/229/45 94/230/45 96/231/45 95/232/45
f 97/233/46 98/234/46 100/235/46 99/236/46
f 101/237/47 102/238/47 104/239/47 103/240/47
f 105/241/48 106/242/48 108/243/48 107/244/48
f 109/245/49 110/246/49 112/247/49 111/248/49
f 113/249/50 114/250/50 116/251/50 115/252/50

Binary file not shown.

After

Width:  |  Height:  |  Size: 717 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 361 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 618 B

View File

@ -486,7 +486,6 @@ function ele.register_machine(nodename, nodedef)
ele_usage = 64, ele_usage = 64,
ele_output = 64, ele_output = 64,
ele_sides = nil, ele_sides = nil,
paramtype2 = "facedir"
} }
-- Ensure everything that's required is present -- Ensure everything that's required is present
@ -496,6 +495,10 @@ function ele.register_machine(nodename, nodedef)
end end
end end
if nodedef.paramtype2 ~= 0 or not nodedef.paramtype2 then
nodedef.paramtype2 = "facedir"
end
-- Ensure machine group is used properly -- Ensure machine group is used properly
if not nodedef.groups["ele_conductor"] and not nodedef.groups["ele_machine"] then if not nodedef.groups["ele_conductor"] and not nodedef.groups["ele_machine"] then
nodedef.groups["ele_machine"] = 1 nodedef.groups["ele_machine"] = 1