Update technic mod... WIP

master
Vaughan Lapsley 2017-08-29 13:01:20 +10:00
parent 41f2f47980
commit d5a9abaf02
889 changed files with 6582 additions and 5169 deletions

View File

@ -25,3 +25,11 @@ RealBadAngel: (WTFPL)
* Everything else.
CC BY-SA 3.0: <http://creativecommons.org/licenses/by-sa/3.0/>
Sound licenses:
veikk0 (Veikko Mäkelä) (CC BY-SA 4.0):
* technic_hv_nuclear_reactor_siren_danger_loop.ogg
* Derived from "Nuclear alarm.wav" by Freesound.org user rene___ from <https://freesound.org/people/rene___/sounds/56778/>. Originally licensed under CC0 1.0 <https://creativecommons.org/publicdomain/zero/1.0/>
CC BY-SA 4.0: <https://creativecommons.org/licenses/by-sa/4.0/>

View File

@ -9,6 +9,10 @@ local defaults = {
enable_wind_mill = "false",
enable_frames = "false",
enable_corium_griefing = "true",
enable_radiation_protection = "true",
enable_entity_radiation_damage = "true",
enable_longterm_radiation_damage = "true",
enable_nuclear_reactor_digiline_selfdestruct = "false",
}
for k, v in pairs(defaults) do

View File

@ -1,39 +1,60 @@
-- check if we have the necessary dependencies to allow actually using these materials in the crafts
local mesecons_materials = minetest.get_modpath("mesecons_materials")
-- Remove some recipes
-- Bronze
minetest.clear_craft({
type = "shapeless",
output = "base:bronze_ingot"
})
-- Accelerator tube
if pipeworks.enable_accelerator_tube then
minetest.clear_craft({
output = "pipeworks:accelerator_tube_1",
})
minetest.register_craft({
output = 'pipeworks:accelerator_tube_1',
recipe = {
{'technic:copper_coil', 'pipeworks:tube_1', 'technic:copper_coil'},
}
})
end
-- Teleport tube
if pipeworks.enable_teleport_tube then
minetest.clear_craft({
output = "pipeworks:teleport_tube_1",
})
minetest.register_craft({
output = 'pipeworks:teleport_tube_1',
recipe = {
{'base:mese_crystal', 'technic:copper_coil', 'base:mese_crystal'},
{'pipeworks:tube_1', 'technic:control_logic_unit', 'pipeworks:tube_1'},
{'base:mese_crystal', 'technic:copper_coil', 'base:mese_crystal'},
}
})
end
-- tubes crafting recipes
minetest.register_craft({
output = 'pipeworks:accelerator_tube_1',
recipe = {
{'technic:copper_coil', 'pipeworks:tube_1', 'technic:copper_coil'},
}
})
minetest.register_craft({
output = 'pipeworks:teleport_tube_1',
recipe = {
{'default:mese_crystal', 'technic:copper_coil', 'default:mese_crystal'},
{'pipeworks:tube_1', 'technic:control_logic_unit', 'pipeworks:tube_1'},
{'default:mese_crystal', 'technic:copper_coil', 'default:mese_crystal'},
}
})
minetest.register_craft({
output = 'technic:diamond_drill_head',
recipe = {
{'technic:stainless_steel_ingot', 'default:diamond', 'technic:stainless_steel_ingot'},
{'default:diamond', '', 'default:diamond'},
{'technic:stainless_steel_ingot', 'default:diamond', 'technic:stainless_steel_ingot'},
{'technic:stainless_steel_ingot', 'base:diamond', 'technic:stainless_steel_ingot'},
{'base:diamond', '', 'base:diamond'},
{'technic:stainless_steel_ingot', 'base:diamond', 'technic:stainless_steel_ingot'},
}
})
minetest.register_craft({
output = 'technic:green_energy_crystal',
recipe = {
{'default:gold_ingot', 'technic:battery', 'dye:green'},
{'base:gold_ingot', 'technic:battery', 'dye:green'},
{'technic:battery', 'technic:red_energy_crystal', 'technic:battery'},
{'dye:green', 'technic:battery', 'default:gold_ingot'},
{'dye:green', 'technic:battery', 'base:gold_ingot'},
}
})
@ -50,7 +71,7 @@ minetest.register_craft({
output = 'technic:red_energy_crystal',
recipe = {
{'moreores:silver_ingot', 'technic:battery', 'dye:red'},
{'technic:battery', 'default:diamondblock', 'technic:battery'},
{'technic:battery', 'base:diamondblock', 'technic:battery'},
{'dye:red', 'technic:battery', 'moreores:silver_ingot'},
}
})
@ -58,18 +79,18 @@ minetest.register_craft({
minetest.register_craft({
output = 'technic:fine_copper_wire 2',
recipe = {
{'', 'default:copper_ingot', ''},
{'', 'default:copper_ingot', ''},
{'', 'default:copper_ingot', ''},
{'', 'base:copper_ingot', ''},
{'', 'base:copper_ingot', ''},
{'', 'base:copper_ingot', ''},
}
})
minetest.register_craft({
output = 'technic:fine_gold_wire 2',
recipe = {
{'', 'default:gold_ingot', ''},
{'', 'default:gold_ingot', ''},
{'', 'default:gold_ingot', ''},
{'', 'base:gold_ingot', ''},
{'', 'base:gold_ingot', ''},
{'', 'base:gold_ingot', ''},
}
})
@ -96,7 +117,7 @@ minetest.register_craft({
recipe = {
{'technic:carbon_steel_ingot', 'technic:copper_coil', 'technic:carbon_steel_ingot'},
{'technic:carbon_steel_ingot', 'technic:copper_coil', 'technic:carbon_steel_ingot'},
{'technic:carbon_steel_ingot', 'default:copper_ingot', 'technic:carbon_steel_ingot'},
{'technic:carbon_steel_ingot', 'base:copper_ingot', 'technic:carbon_steel_ingot'},
}
})
@ -133,7 +154,7 @@ minetest.register_craft({
output = 'technic:control_logic_unit',
recipe = {
{'', 'technic:fine_gold_wire', ''},
{'default:copper_ingot', 'technic:silicon_wafer', 'default:copper_ingot'},
{'base:copper_ingot', 'technic:silicon_wafer', 'base:copper_ingot'},
{'', 'technic:chromium_ingot', ''},
}
})
@ -142,8 +163,8 @@ minetest.register_craft({
output = 'technic:mixed_metal_ingot 9',
recipe = {
{'technic:stainless_steel_ingot', 'technic:stainless_steel_ingot', 'technic:stainless_steel_ingot'},
{'default:bronze_ingot', 'default:bronze_ingot', 'default:bronze_ingot'},
{'moreores:tin_ingot', 'moreores:tin_ingot', 'moreores:tin_ingot'},
{'base:bronze_ingot', 'base:bronze_ingot', 'base:bronze_ingot'},
{'base:tin_ingot', 'base:tin_ingot', 'base:tin_ingot'},
}
})
@ -163,31 +184,15 @@ minetest.register_craft({
},
})
-- Remove some recipes
-- Bronze
minetest.register_craft({
output = "base:dirt 2",
type = "shapeless",
output = "default:bronze_ingot 0",
recipe = {"default:copper_ingot", "default:steel_ingot"}
})
-- Accelerator tube
minetest.register_craft({
output = "pipeworks:accelerator_tube_1 0",
replacements = {{"bucket:bucket_water","bucket:bucket_empty"}},
recipe = {
{ "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", "homedecor:plastic_sheeting" },
{ "default:mese_crystal_fragment", "default:steel_ingot", "default:mese_crystal_fragment" },
{ "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", "homedecor:plastic_sheeting" }
"technic:stone_dust",
"group:leaves",
"bucket:bucket_water",
"group:sand",
},
})
-- Teleport tube
minetest.register_craft({
output = "pipeworks:teleport_tube_1 0",
recipe = {
{ "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", "homedecor:plastic_sheeting" },
{ "default:desert_stone", "default:mese", "default:desert_stone" },
{ "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", "homedecor:plastic_sheeting" }
},
})

View File

@ -1,8 +1,12 @@
default
base
pipeworks
technic_worldgen
bucket?
screwdriver?
mesecons?
mesecons_mvps?
digilines?
digiline_remote?
intllib?
unified_inventory?
vector_extras?

View File

@ -0,0 +1,130 @@
This file is fairly incomplete. Help is welcome.
Tiers
-----
The tier is a string, currently `"LV"`, `"MV"` and `"HV"` are supported.
Network
-------
The network is the cable with the connected machine nodes. Currently the
switching station handles the network activity.
Helper functions
----------------
* `technic.pretty_num(num)`
* Converts the number `num` to a human-readable string.
* Use this function when showing players power values.
* `technic.swap_node(pos, nodename)`
* Same as `mintest.swap_node` but it only changes the nodename.
* It uses `minetest.get_node` before swapping to ensure the new nodename
is not the same as the current one.
* `technic.get_or_load_node(pos)`
* If the mapblock is loaded, it returns the node at pos,
else it loads the chunk and returns `nil`.
* `technic.set_RE_wear(itemstack, item_load, max_charge)`
* If the `wear_represents` field in the item's nodedef is
`"technic_RE_charge"`, this function does nothing.
* `technic.refill_RE_charge(itemstack)`
* This function fully recharges an RE chargeable item.
* If `technic.power_tools[itemstack:get_name()]` is `nil` (or `false`), this
function does nothing, else that value is the maximum charge.
* The itemstack metadata is changed to contain the charge.
* `technic.is_tier_cable(nodename, tier)`
* Tells whether the node `nodename` is the cable of the tier `tier`.
* `technic.get_cable_tier(nodename)`
* Returns the tier of the cable `nodename` or `nil`.
* `technic.trace_node_ray(pos, dir, range)`
* Returns an iteration function (usable in the for loop) to iterate over the
node positions along the specified ray.
* The returned positions will not include the starting position `pos`.
* `technic.trace_node_ray_fat(pos, dir, range)`
* Like `technic.trace_node_ray` but includes extra positions near the ray.
* The node ray functions are used for mining lasers.
* `technic.config:get(name)`
* Some configuration function
* `technic.tube_inject_item(pos, start_pos, velocity, item)`
* Same as `pipeworks.tube_inject_item`
Registration functions
----------------------
* `technic.register_power_tool(itemname, max_charge)`
* Same as `technic.power_tools[itemname] = max_charge`
* This function makes the craftitem `itemname` chargeable.
* `technic.register_machine(tier, nodename, machine_type)`
* Same as `technic.machines[tier][nodename] = machine_type`
* Currently this is requisite to make technic recognize your node.
* See also `Machine types`
* `technic.register_tier(tier)`
* Same as `technic.machines[tier] = {}`
* See also `tiers`
### Specific machines
* `technic.register_solar_array(data)`
* data is a table
Used itemdef fields
-------------------
* groups:
* `technic_<ltier> = 1` ltier is a tier in small letters; this group makes
the node connect to the cable(s) of the right tier.
* `technic_machine = 1` Currently used for
* `connect_sides`
* In addition to the default use (see lua_api.txt), this tells where the
machine can be connected.
#
#
* `technic_run(pos, node)`
* This function is currently used to update the node.
Modders have to manually change the information about supply etc. in the
node metadata.
Machine types
-------------
There are currently following types:
* `technic.receiver = "RE"` e.g. grinder
* `technic.producer = "PR"` e.g. solar panel
* `technic.producer_receiver = "PR_RE"` supply converter
* `technic.battery = "BA"` e.g. LV batbox
Switching Station
-----------------
The switching station is the center of all power distribution on an electric
network.
The station collects power from sources (PR), distributes it to sinks (RE),
and uses the excess/shortfall to charge and discharge batteries (BA).
For now, all supply and demand values are expressed in kW.
It works like this:
All PR,BA,RE nodes are indexed and tagged with the switching station.
The tagging is a workaround to allow more stations to be built without allowing
a cheat with duplicating power.
All the RE nodes are queried for their current EU demand. Those which are off
would require no or a small standby EU demand, while those which are on would
require more.
If the total demand is less than the available power they are all updated with
the demand number.
If any surplus exists from the PR nodes the batteries will be charged evenly
with this.
If the total demand requires draw on the batteries they will be discharged
evenly.
If the total demand is more than the available power all RE nodes will be shut
down. We have a brown-out situation.
Hence for now all the power distribution logic resides in this single node.
### Node meta usage
Nodes connected to the network will have one or more of these parameters as meta
data:
* `<LV|MV|HV>_EU_supply` : Exists for PR and BA node types.
This is the EU value supplied by the node. Output
* `<LV|MV|HV>_EU_demand` : Exists for RE and BA node types.
This is the EU value the node requires to run. Output
* `<LV|MV|HV>_EU_input` : Exists for RE and BA node types.
This is the actual EU value the network can give the node. Input
The reason the LV|MV|HV type is prepended to meta data is because some machine
could require several supplies to work.
This way the supplies are separated per network.

View File

@ -0,0 +1,191 @@
local digit_sep_esc
do
local sep = technic.config:get("digit_separator")
sep = tonumber(sep) and string.char(sep) or sep or " "
-- Escape for gsub
for magic in ("().%+-*?[^$"):gmatch(".") do
if sep == magic then
sep = "%"..sep
end
end
digit_sep_esc = sep
end
function technic.pretty_num(num)
local str, k = tostring(num), nil
repeat
str, k = str:gsub("^(-?%d+)(%d%d%d)", "%1"..digit_sep_esc.."%2")
until k == 0
return str
end
--- Same as minetest.swap_node, but only changes name
-- and doesn't re-set if already set.
function technic.swap_node(pos, name)
local node = minetest.get_node(pos)
if node.name ~= name then
node.name = name
minetest.swap_node(pos, node)
end
end
--- Fully charge RE chargeable item.
-- Must be defined early to reference in item definitions.
function technic.refill_RE_charge(stack)
local max_charge = technic.power_tools[stack:get_name()]
if not max_charge then return stack end
technic.set_RE_wear(stack, max_charge, max_charge)
local meta = minetest.deserialize(stack:get_metadata()) or {}
meta.charge = max_charge
stack:set_metadata(minetest.serialize(meta))
return stack
end
-- If the node is loaded, returns it. If it isn't loaded, load it and return nil.
function technic.get_or_load_node(pos)
local node = minetest.get_node_or_nil(pos)
if node then return node end
local vm = VoxelManip()
local MinEdge, MaxEdge = vm:read_from_map(pos, pos)
return nil
end
technic.tube_inject_item = pipeworks.tube_inject_item or function(pos, start_pos, velocity, item)
local tubed = pipeworks.tube_item(vector.new(pos), item)
tubed:get_luaentity().start_pos = vector.new(start_pos)
tubed:setvelocity(velocity)
tubed:setacceleration(vector.new(0, 0, 0))
end
--- Iterates over the node positions along the specified ray.
-- The returned positions will not include the starting position.
function technic.trace_node_ray(pos, dir, range)
local x_step = dir.x > 0 and 1 or -1
local y_step = dir.y > 0 and 1 or -1
local z_step = dir.z > 0 and 1 or -1
local i = 1
return function(p)
-- Approximation of where we should be if we weren't rounding
-- to nodes. This moves forward a bit faster then we do.
-- A correction is done below.
local real_x = pos.x + (dir.x * i)
local real_y = pos.y + (dir.y * i)
local real_z = pos.z + (dir.z * i)
-- How far off we've gotten from where we should be.
local dx = math.abs(real_x - p.x)
local dy = math.abs(real_y - p.y)
local dz = math.abs(real_z - p.z)
-- If the real position moves ahead too fast, stop it so we
-- can catch up. If it gets too far ahead it will smooth
-- out our movement too much and we won't turn fast enough.
if dx + dy + dz < 2 then
i = i + 1
end
-- Step in whichever direction we're most off course in.
if dx > dy then
if dx > dz then
p.x = p.x + x_step
else
p.z = p.z + z_step
end
elseif dy > dz then
p.y = p.y + y_step
else
p.z = p.z + z_step
end
if vector.distance(pos, p) > range then
return nil
end
return p
end, vector.round(pos)
end
--- Like trace_node_ray, but includes extra positions close to the ray.
function technic.trace_node_ray_fat(pos, dir, range)
local x_step = dir.x > 0 and 1 or -1
local y_step = dir.y > 0 and 1 or -1
local z_step = dir.z > 0 and 1 or -1
local next_poses = {}
local i = 1
return function(p)
local ni, np = next(next_poses)
if np then
next_poses[ni] = nil
return np
end
-- Approximation of where we should be if we weren't rounding
-- to nodes. This moves forward a bit faster then we do.
-- A correction is done below.
local real_x = pos.x + (dir.x * i)
local real_y = pos.y + (dir.y * i)
local real_z = pos.z + (dir.z * i)
-- How far off we've gotten from where we should be.
local dx = math.abs(real_x - p.x)
local dy = math.abs(real_y - p.y)
local dz = math.abs(real_z - p.z)
-- If the real position moves ahead too fast, stop it so we
-- can catch up. If it gets too far ahead it will smooth
-- out our movement too much and we won't turn fast enough.
if dx + dy + dz < 2 then
i = i + 1
end
-- Step in whichever direction we're most off course in.
local sx, sy, sz -- Whether we've already stepped along each axis
if dx > dy then
if dx > dz then
sx = true
p.x = p.x + x_step
else
sz = true
p.z = p.z + z_step
end
elseif dy > dz then
sy = true
p.y = p.y + y_step
else
sz = true
p.z = p.z + z_step
end
if vector.distance(pos, p) > range then
return nil
end
-- Add other positions that we're significantly off on.
-- We can just use fixed integer keys here because the
-- table will be completely cleared before we reach this
-- code block again.
local dlen = math.sqrt(dx*dx + dy*dy + dz*dz)
-- Normalized axis deltas
local dxn, dyn, dzn = dx / dlen, dy / dlen, dz / dlen
if not sx and dxn > 0.5 then
next_poses[1] = vector.new(p.x + x_step, p.y, p.z)
end
if not sy and dyn > 0.5 then
next_poses[2] = vector.new(p.x, p.y + y_step, p.z)
end
if not sz and dzn > 0.5 then
next_poses[3] = vector.new(p.x, p.y, p.z + z_step)
end
return p
end, vector.round(pos)
end

View File

@ -5,7 +5,7 @@
local load_start = os.clock()
technic = rawget(_G, "technic") or {}
technic.creative_mode = minetest.setting_getbool("creative_mode")
technic.creative_mode = minetest.settings:get_bool("creative_mode")
local modpath = minetest.get_modpath("technic")
@ -35,6 +35,9 @@ dofile(modpath.."/crafts.lua")
-- Register functions
dofile(modpath.."/register.lua")
-- Radiation
dofile(modpath.."/radiation.lua")
-- Machines
dofile(modpath.."/machines/init.lua")
@ -44,7 +47,7 @@ dofile(modpath.."/tools/init.lua")
-- Aliases for legacy node/item names
dofile(modpath.."/legacy.lua")
if minetest.setting_getbool("log_mods") then
if minetest.settings:get_bool("log_mods") then
print(S("[Technic] Loaded in %f seconds"):format(os.clock() - load_start))
end

View File

@ -152,7 +152,7 @@ minetest.register_node("technic:machine_casing", {
paramtype = "light",
drawtype = "allfaces",
tiles = {"technic_machine_casing.png"},
sounds = default.node_sound_stone_defaults(),
sounds = base.node_sound_stone_defaults(),
})
for p = 0, 35 do
@ -194,15 +194,17 @@ for p = 0, 35 do
-- a natural (0.7%-fissile) uranium block having the activity of
-- 9 uranium ore blocks (due to 9 ingots per block). The group
-- value is proportional to the square root of the activity, and
-- uranium ore has radioactive=1000. This yields radioactive=2065
-- for a fully-depleted uranium block and radioactive=5286 for
-- uranium ore has radioactive=1. This yields radioactive=1.0
-- for a fully-depleted uranium block and radioactive=2.6 for
-- a 3.5%-fissile uranium block.
local radioactivity = math.floor(math.sqrt((1+5.55*p/35) * 18 / (1+5.55*7/35)) + 0.5);
(ov or minetest.register_node)(block, {
description = string.format(S("%.1f%%-Fissile Uranium Block"), p/10),
tiles = {"technic_uranium_block.png"},
is_ground_content = true,
groups = {uranium_block=1, not_in_creative_inventory=nici, cracky=1, level=2, radioactive=math.floor(1000*math.sqrt((1+5.55*p/35) * 9 / (1+5.55*7/35)) + 0.5)},
sounds = default.node_sound_stone_defaults(),
groups = {uranium_block=1, not_in_creative_inventory=nici,
cracky=1, level=2, radioactive=radioactivity},
sounds = base.node_sound_stone_defaults(),
});
if not ov then
minetest.register_craft({
@ -219,3 +221,4 @@ for p = 0, 35 do
})
end
end

View File

View File

@ -26,8 +26,8 @@ Graphite = Lastra in graffite
Carbon Cloth = Fibra di carbonio
Raw Latex = Latex grezzo
Rubber Fiber = Fibra di gomma
%.1f%%-Fissile Uranium Ingot =
%.1f%%-Fissile Uranium Block =
%.1f%%-Fissile Uranium Ingot = %.1f%%-Lingotto di uranio fissile
%.1f%%-Fissile Uranium Block = %.1f%%-Blocco di uranio fissile
## Machine misc
Machine cannot be removed because it is not empty = La macchina non può essere rimossa perchè non è vuota
@ -36,7 +36,7 @@ Inventory move disallowed due to protection = Impossibile muovere l'inventario a
@1 Active (@2 EU) = @1 Attivo (@2 EU)
%s Active = %s Attivo
%s Disabled = %s Disabilitato
%s Enabled =
%s Enabled = %s Abilitato
%s Idle = %s Inattivo
%s Improperly Placed = %s Piazzato impropiamente
%s Unpowered = %s Non alimentato
@ -46,18 +46,18 @@ Inventory move disallowed due to protection = Impossibile muovere l'inventario a
%s Finished = %s Finito
Enable/Disable = Abilita/Disabilita
Range = Raggio
Upgrade Slots =
Upgrade Slots = Alloggi di aggiornamento
In: = Ingresso:
Out: = Uscita:
Slot %d =
Slot %d = Alloggio %d
Itemwise = Singolo elemento
Stackwise = pila completa
Owner: =
Unlocked =
Locked =
Radius: =
Enabled =
Disabled =
Owner: = Proprietario:
Unlocked = Non chiuso a chiave
Locked = Chiuso a chiave
Radius: = Raggio:
Enabled = Abilitato
Disabled = Disabilitato
## Machine names
# $1: Tier
@ -84,10 +84,10 @@ Self-Contained Injector = Ignettore
Constructor Mk%d = Costruttore Mk%d
Frame = Cornice
Frame Motor = Cornice del motore
Template =
Template (replacing) = Template (rimpiazzato)
Template Motor =
Template Tool =
Template = Sagoma
Template (replacing) = Sagoma (di rimpiazzo)
Template Motor = Motore per sagome
Template Tool = Strumento per sagome
Battery Box = Box batterie
Supply Converter = Trasformatore
Switching Station = Stazione di controllo
@ -96,7 +96,7 @@ Fuel-Fired Furnace = Fornace a carbone
Wind Mill Frame = Pala eolica
Forcefield = Campo di forza
Nuclear Reactor Rod Compartment = Compartimento combustibile nucleare
Administrative World Anchor =
Administrative World Anchor = Ancora-mondo amministrativa
## Machine-specific
# $1: Pruduced EU
@ -111,12 +111,12 @@ Production at %d%% = Produzione a %d%%
Choose Milling Program: = Scegliere un programma di Fresatura
Slim Elements half / normal height: = Metà elementi sottili / altezza normale:
Current track %s = Traccia corrente %s
Stopped =
Keeping %d/%d map blocks loaded =
Digging not started =
Digging finished =
Digging %d m above machine =
Digging %d m below machine =
Stopped = Fermato
Keeping %d/%d map blocks loaded = Mantenimento di %d/%d blocchi mappa caricati
Digging not started = Scavo non iniziato
Digging finished = Scavo finito
Digging %d m above machine = Scavo di %d m sopra la macchina
Digging %d m below machine = Scavo di %d m sotto la macchina
## CNC
Cylinder = Cilindro
@ -174,10 +174,10 @@ Talinite = Talinite
Tin = Stagno
Wrought Iron = Ferro Battuto
Zinc = Zinco
%.1f%%-Fissile Uranium =
%.1f%%-Fissile Uranium = %.1f%%-Uranio fissile
## Tools
RE Battery =
RE Battery = Batteria RE
Water Can = Serbatoio d'acqua
Lava Can = Serbatoio di lava
Chainsaw = Motosega

View File

@ -1,4 +1,5 @@
-- HV battery box
minetest.register_craft({
output = 'technic:hv_battery_box0',
recipe = {

View File

@ -6,16 +6,20 @@
-- How expensive is the generator?
-- Leaves room for upgrades lowering the power drain?
local digilines_path = minetest.get_modpath("digilines")
local forcefield_power_drain = 10
local S = technic.getter
local cable_entry = "^technic_cable_connection_overlay.png"
minetest.register_craft({
output = "technic:forcefield_emitter_off",
recipe = {
{"default:mese", "technic:motor", "default:mese" },
{"technic:deployer_off", "technic:machine_casing", "technic:deployer_off"},
{"default:mese", "technic:hv_cable", "default:mese" },
{"default:mese", "technic:motor", "default:mese" },
{"technic:deployer_off", "technic:machine_casing", "technic:deployer_off"},
{"default:mese", "technic:hv_cable", "default:mese" },
}
})
@ -90,7 +94,14 @@ local function update_forcefield(pos, meta, active, first)
end
local function set_forcefield_formspec(meta)
local formspec = "size[5,2.25]"..
local formspec
if digilines_path then
formspec = "size[5,3.25]"..
"field[0.3,3;5,1;channel;Digiline Channel;"..meta:get_string("channel").."]"
else
formspec = "size[5,2.25]"
end
formspec = formspec..
"field[0.3,0.5;2,1;range;"..S("Range")..";"..meta:get_int("range").."]"
-- The names for these toggle buttons are explicit about which
-- state they'll switch to, so that multiple presses (arising
@ -130,9 +141,10 @@ local forcefield_receive_fields = function(pos, formname, fields, sender)
update_forcefield(pos, meta, false)
end
if range then meta:set_int("range", range) end
if fields.shape0 then meta:set_int("shape", 0) end
if fields.shape1 then meta:set_int("shape", 1) end
if fields.enable then meta:set_int("enabled", 1) end
if fields.channel then meta:set_string("channel", fields.channel) end
if fields.shape0 then meta:set_int("shape", 0) end
if fields.shape1 then meta:set_int("shape", 1) end
if fields.enable then meta:set_int("enabled", 1) end
if fields.disable then meta:set_int("enabled", 0) end
if fields.mesecon_mode_0 then meta:set_int("mesecon_mode", 0) end
if fields.mesecon_mode_1 then meta:set_int("mesecon_mode", 1) end
@ -150,10 +162,89 @@ local mesecons = {
}
}
local digiline_def = {
receptor = {action = function() end},
effector = {
action = function(pos, node, channel, msg)
local meta = minetest.get_meta(pos)
if channel ~= meta:get_string("channel") then
return
end
local msgt = type(msg)
if msgt == "string" then
local smsg = msg:lower()
msg = {}
if smsg == "get" then
msg.command = "get"
elseif smsg == "off" then
msg.command = "off"
elseif smsg == "on" then
msg.command = "on"
elseif smsg == "toggle" then
msg.command = "toggle"
elseif smsg:sub(1, 5) == "range" then
msg.command = "range"
msg.value = tonumber(smsg:sub(7))
elseif smsg:sub(1, 5) == "shape" then
msg.command = "shape"
msg.value = smsg:sub(7):lower()
msg.value = tonumber(msg.value) or msg.value
end
elseif msgt ~= "table" then
return
end
if msg.command == "get" then
digilines.receptor_send(pos, digilines.rules.default, channel, {
enabled = meta:get_int("enabled"),
range = meta:get_int("range"),
shape = meta:get_int("shape")
})
return
elseif msg.command == "off" then
meta:set_int("enabled", 0)
elseif msg.command == "on" then
meta:set_int("enabled", 1)
elseif msg.command == "toggle" then
local onn = meta:get_int("enabled")
onn = 1-onn -- Mirror onn with pivot 0.5, so switch between 1 and 0.
meta:set_int("enabled", onn)
elseif msg.command == "range" then
if type(msg.value) ~= "number" then
return
end
msg.value = math.max(msg.value, 5)
msg.value = math.min(msg.value, 20)
update_forcefield(pos, meta, false)
meta:set_int("range", msg.value)
elseif msg.command == "shape" then
local valuet = type(msg.value)
if valuet == "string" then
if msg.value == "sphere" then
msg.value = 0
elseif msg.value == "cube" then
msg.value = 1
end
elseif valuet ~= "number" then
return
end
if not msg.value then
return
end
update_forcefield(pos, meta, false)
meta:set_int("shape", msg.value)
else
return
end
set_forcefield_formspec(meta)
end
},
}
local function run(pos, node)
local meta = minetest.get_meta(pos)
local eu_input = meta:get_int("HV_EU_input")
local enabled = meta:get_int("enabled") ~= 0 and (meta:get_int("mesecon_mode") == 0 or meta:get_int("mesecon_effect") ~= 0)
local enabled = meta:get_int("enabled") ~= 0 and
(meta:get_int("mesecon_mode") == 0 or meta:get_int("mesecon_effect") ~= 0)
local machine_name = S("%s Forcefield Emitter"):format("HV")
local range = meta:get_int("range")
@ -194,7 +285,14 @@ end
minetest.register_node("technic:forcefield_emitter_off", {
description = S("%s Forcefield Emitter"):format("HV"),
tiles = {"technic_forcefield_emitter_off.png"},
tiles = {
"technic_forcefield_emitter_off.png",
"technic_machine_bottom.png"..cable_entry,
"technic_forcefield_emitter_off.png",
"technic_forcefield_emitter_off.png",
"technic_forcefield_emitter_off.png",
"technic_forcefield_emitter_off.png"
},
groups = {cracky = 1, technic_machine = 1, technic_hv = 1},
on_receive_fields = forcefield_receive_fields,
on_construct = function(pos)
@ -205,16 +303,27 @@ minetest.register_node("technic:forcefield_emitter_off", {
meta:set_int("enabled", 0)
meta:set_int("mesecon_mode", 0)
meta:set_int("mesecon_effect", 0)
if digilines_path then
meta:set_string("channel", "forcefield"..minetest.pos_to_string(pos))
end
meta:set_string("infotext", S("%s Forcefield Emitter"):format("HV"))
set_forcefield_formspec(meta)
end,
mesecons = mesecons,
digiline = digiline_def,
technic_run = run,
})
minetest.register_node("technic:forcefield_emitter_on", {
description = S("%s Forcefield Emitter"):format("HV"),
tiles = {"technic_forcefield_emitter_on.png"},
tiles = {
"technic_forcefield_emitter_on.png",
"technic_machine_bottom.png"..cable_entry,
"technic_forcefield_emitter_on.png",
"technic_forcefield_emitter_on.png",
"technic_forcefield_emitter_on.png",
"technic_forcefield_emitter_on.png"
},
groups = {cracky = 1, technic_machine = 1, technic_hv = 1,
not_in_creative_inventory=1},
drop = "technic:forcefield_emitter_off",
@ -224,12 +333,17 @@ minetest.register_node("technic:forcefield_emitter_on", {
update_forcefield(pos, meta, false)
end,
mesecons = mesecons,
digiline = digiline_def,
technic_run = run,
technic_on_disable = function (pos, node)
local meta = minetest.get_meta(pos)
update_forcefield(pos, meta, false)
technic.swap_node(pos, "technic:forcefield_emitter_off")
end,
on_blast = function(pos, intensity)
minetest.dig_node(pos)
return {"technic:forcefield_emitter_off"}
end,
})
minetest.register_node("technic:forcefield", {
@ -238,7 +352,7 @@ minetest.register_node("technic:forcefield", {
drawtype = "glasslike",
groups = {not_in_creative_inventory=1},
paramtype = "light",
light_source = 15,
light_source = default.LIGHT_MAX,
diggable = false,
drop = '',
tiles = {{
@ -250,6 +364,8 @@ minetest.register_node("technic:forcefield", {
length = 1.0,
},
}},
on_blast = function(pos, intensity)
end,
})

View File

@ -0,0 +1,484 @@
--[[
The enriched uranium rod driven EU generator.
A very large and advanced machine providing vast amounts of power.
Very efficient but also expensive to run as it needs uranium.
Provides 10000 HV EUs for one week (only counted when loaded).
The nuclear reactor core requires a casing of water and a protective
shield to work. This is checked now and then and if the casing is not
intact the reactor will melt down!
--]]
local burn_ticks = 7 * 24 * 60 * 60 -- Seconds
local power_supply = 100000 -- EUs
local fuel_type = "technic:uranium_fuel" -- The reactor burns this
local digiline_meltdown = technic.config:get_bool("enable_nuclear_reactor_digiline_selfdestruct")
local digiline_remote_path = minetest.get_modpath("digiline_remote")
local S = technic.getter
local reactor_desc = S("@1 Nuclear Reactor Core", S("HV"))
local cable_entry = "^technic_cable_connection_overlay.png"
-- FIXME: Recipe should make more sense like a rod recepticle, steam chamber, HV generator?
minetest.register_craft({
output = 'technic:hv_nuclear_reactor_core',
recipe = {
{'technic:carbon_plate', 'default:obsidian_glass', 'technic:carbon_plate'},
{'technic:composite_plate', 'technic:machine_casing', 'technic:composite_plate'},
{'technic:stainless_steel_ingot', 'technic:hv_cable', 'technic:stainless_steel_ingot'},
}
})
local function make_reactor_formspec(meta)
local f = "size[8,9]"..
"label[0,0;"..S("Nuclear Reactor Rod Compartment").."]"..
"list[current_name;src;2,1;3,2;]"..
"list[current_player;main;0,5;8,4;]"..
"listring[]"..
"button[5.5,1.5;2,1;start;Start]"..
"checkbox[5.5,2.5;autostart;automatic Start;"..meta:get_string("autostart").."]"
if not digiline_remote_path then
return f
end
local digiline_enabled = meta:get_string("enable_digiline")
f = f.."checkbox[0.5,2.8;enable_digiline;Enable Digiline;"..digiline_enabled.."]"
if digiline_enabled ~= "true" then
return f
end
return f..
"button_exit[4.6,3.69;2,1;save;Save]"..
"field[1,4;4,1;remote_channel;Digiline Remote Channel;${remote_channel}]"
end
local SS_OFF = 0
local SS_DANGER = 1
local SS_CLEAR = 2
local reactor_siren = {}
local function siren_set_state(pos, state)
local hpos = minetest.hash_node_position(pos)
local siren = reactor_siren[hpos]
if not siren then
if state == SS_OFF then return end
siren = {state=SS_OFF}
reactor_siren[hpos] = siren
end
if state == SS_DANGER and siren.state ~= SS_DANGER then
if siren.handle then minetest.sound_stop(siren.handle) end
siren.handle = minetest.sound_play("technic_hv_nuclear_reactor_siren_danger_loop",
{pos=pos, gain=1.5, loop=true, max_hear_distance=48})
siren.state = SS_DANGER
elseif state == SS_CLEAR then
if siren.handle then minetest.sound_stop(siren.handle) end
local clear_handle = minetest.sound_play("technic_hv_nuclear_reactor_siren_clear",
{pos=pos, gain=1.5, loop=false, max_hear_distance=48})
siren.handle = clear_handle
siren.state = SS_CLEAR
minetest.after(10, function()
if siren.handle ~= clear_handle then return end
minetest.sound_stop(clear_handle)
if reactor_siren[hpos] == siren then
reactor_siren[hpos] = nil
end
end)
elseif state == SS_OFF and siren.state ~= SS_OFF then
if siren.handle then minetest.sound_stop(siren.handle) end
reactor_siren[hpos] = nil
end
end
local function siren_danger(pos, meta)
meta:set_int("siren", 1)
siren_set_state(pos, SS_DANGER)
end
local function siren_clear(pos, meta)
if meta:get_int("siren") ~= 0 then
siren_set_state(pos, SS_CLEAR)
meta:set_int("siren", 0)
end
end
--[[
The standard reactor structure consists of a 9x9x9 cube. A cross
section through the middle:
CCCC CCCC
CBBB BBBC
CBLL LLBC
CBLWWWLBC
CBLW#WLBC
CBLW|WLBC
CBLL|LLBC
CBBB|BBBC
CCCC|CCCC
C = Concrete, B = Blast-resistant concrete, L = Lead,
W = water node, # = reactor core, | = HV cable
The man-hole is optional (but necessary for refueling).
For the reactor to operate and not melt down, it insists on the inner
7x7x7 portion (from the core out to the blast-resistant concrete)
being intact. Intactness only depends on the number of nodes of the
right type in each layer. The water layer must have water in all but
at most one node; the steel and blast-resistant concrete layers must
have the right material in all but at most two nodes. The permitted
gaps are meant for the cable and man-hole, but can actually be anywhere
and contain anything. For the reactor to be useful, a cable must
connect to the core, but it can go in any direction.
The outer concrete layer of the standard structure is not required
for the reactor to operate. It is noted here because it used to
be mandatory, and for historical reasons (that it predates the
implementation of radiation) it needs to continue being adequate
shielding of legacy reactors. If it ever ceases to be adequate
shielding for new reactors, legacy ones should be grandfathered.
For legacy reasons, if the reactor has a stainless steel layer instead
of a lead layer it will be converted to a lead layer.
--]]
local function reactor_structure_badness(pos)
local vm = VoxelManip()
local pos1 = vector.subtract(pos, 3)
local pos2 = vector.add(pos, 3)
local MinEdge, MaxEdge = vm:read_from_map(pos1, pos2)
local data = vm:get_data()
local area = VoxelArea:new({MinEdge=MinEdge, MaxEdge=MaxEdge})
local c_blast_concrete = minetest.get_content_id("technic:blast_resistant_concrete")
local c_lead = minetest.get_content_id("technic:lead_block")
local c_steel = minetest.get_content_id("technic:stainless_steel_block")
local c_water_source = minetest.get_content_id("default:water_source")
local c_water_flowing = minetest.get_content_id("default:water_flowing")
local blast_layer, steel_layer, lead_layer, water_layer = 0, 0, 0, 0
for z = pos1.z, pos2.z do
for y = pos1.y, pos2.y do
for x = pos1.x, pos2.x do
local cid = data[area:index(x, y, z)]
if x == pos1.x or x == pos2.x or
y == pos1.y or y == pos2.y or
z == pos1.z or z == pos2.z then
if cid == c_blast_concrete then
blast_layer = blast_layer + 1
end
elseif x == pos1.x+1 or x == pos2.x-1 or
y == pos1.y+1 or y == pos2.y-1 or
z == pos1.z+1 or z == pos2.z-1 then
if cid == c_lead then
lead_layer = lead_layer + 1
elseif cid == c_steel then
steel_layer = steel_layer + 1
end
elseif x == pos1.x+2 or x == pos2.x-2 or
y == pos1.y+2 or y == pos2.y-2 or
z == pos1.z+2 or z == pos2.z-2 then
if cid == c_water_source or cid == c_water_flowing then
water_layer = water_layer + 1
end
end
end
end
end
if steel_layer >= 96 then
for z = pos1.z+1, pos2.z-1 do
for y = pos1.y+1, pos2.y-1 do
for x = pos1.x+1, pos2.x-1 do
local vi = area:index(x, y, z)
if x == pos1.x+1 or x == pos2.x-1 or
y == pos1.y+1 or y == pos2.y-1 or
z == pos1.z+1 or z == pos2.z-1 then
if data[vi] == c_steel then
data[vi] = c_lead
end
end
end
end
end
vm:set_data(data)
vm:write_to_map()
lead_layer = steel_layer
end
if water_layer > 25 then water_layer = 25 end
if lead_layer > 96 then lead_layer = 96 end
if blast_layer > 216 then blast_layer = 216 end
return (25 - water_layer) + (96 - lead_layer) + (216 - blast_layer)
end
local function melt_down_reactor(pos)
minetest.log("action", "A reactor melted down at "..minetest.pos_to_string(pos))
minetest.set_node(pos, {name = "technic:corium_source"})
end
local function start_reactor(pos, meta)
if minetest.get_node(pos).name ~= "technic:hv_nuclear_reactor_core" then
return false
end
local inv = meta:get_inventory()
if inv:is_empty("src") then
return false
end
local src_list = inv:get_list("src")
local correct_fuel_count = 0
for _, src_stack in pairs(src_list) do
if src_stack and src_stack:get_name() == fuel_type then
correct_fuel_count = correct_fuel_count + 1
end
end
-- Check that the reactor is complete and has the correct fuel
if correct_fuel_count ~= 6 or reactor_structure_badness(pos) ~= 0 then
return false
end
meta:set_int("burn_time", 1)
technic.swap_node(pos, "technic:hv_nuclear_reactor_core_active")
meta:set_int("HV_EU_supply", power_supply)
for idx, src_stack in pairs(src_list) do
src_stack:take_item()
inv:set_stack("src", idx, src_stack)
end
return true
end
minetest.register_abm({
label = "Machines: reactor melt-down check",
nodenames = {"technic:hv_nuclear_reactor_core_active"},
interval = 4,
chance = 1,
action = function (pos, node)
local meta = minetest.get_meta(pos)
local badness = reactor_structure_badness(pos)
local accum_badness = meta:get_int("structure_accumulated_badness")
if badness == 0 then
if accum_badness ~= 0 then
meta:set_int("structure_accumulated_badness", accum_badness - 4)
siren_clear(pos, meta)
end
else
siren_danger(pos, meta)
accum_badness = accum_badness + badness
if accum_badness >= 25 then
melt_down_reactor(pos)
else
meta:set_int("structure_accumulated_badness", accum_badness)
end
end
end,
})
local function run(pos, node)
local meta = minetest.get_meta(pos)
local burn_time = meta:get_int("burn_time") or 0
if burn_time >= burn_ticks or burn_time == 0 then
if digiline_remote_path and meta:get_int("HV_EU_supply") == power_supply then
digiline_remote.send_to_node(pos, meta:get_string("remote_channel"),
"fuel used", 6, true)
end
if meta:get_string("autostart") == "true" then
if start_reactor(pos, meta) then
return
end
end
meta:set_int("HV_EU_supply", 0)
meta:set_int("burn_time", 0)
meta:set_string("infotext", S("%s Idle"):format(reactor_desc))
technic.swap_node(pos, "technic:hv_nuclear_reactor_core")
meta:set_int("structure_accumulated_badness", 0)
siren_clear(pos, meta)
elseif burn_time > 0 then
burn_time = burn_time + 1
meta:set_int("burn_time", burn_time)
local percent = math.floor(burn_time / burn_ticks * 100)
meta:set_string("infotext", reactor_desc.." ("..percent.."%)")
meta:set_int("HV_EU_supply", power_supply)
end
end
local nuclear_reactor_receive_fields = function(pos, formname, fields, sender)
local player_name = sender:get_player_name()
if minetest.is_protected(pos, player_name) then
minetest.chat_send_player(player_name, "You are not allowed to edit this!")
minetest.record_protection_violation(pos, player_name)
return
end
local meta = minetest.get_meta(pos)
local update_formspec = false
if fields.remote_channel then
meta:set_string("remote_channel", fields.remote_channel)
end
if fields.start then
local b = start_reactor(pos, meta)
if b then
minetest.chat_send_player(player_name, "Start successful")
else
minetest.chat_send_player(player_name, "Error")
end
end
if fields.autostart then
meta:set_string("autostart", fields.autostart)
update_formspec = true
end
if fields.enable_digiline then
meta:set_string("enable_digiline", fields.enable_digiline)
update_formspec = true
end
if update_formspec then
meta:set_string("formspec", make_reactor_formspec(meta))
end
end
local digiline_remote_def = function(pos, channel, msg)
local meta = minetest.get_meta(pos)
if meta:get_string("enable_digiline") ~= "true" or
channel ~= meta:get_string("remote_channel") then
return
end
-- Convert string messages to tables:
local msgt = type(msg)
if msgt == "string" then
local smsg = msg:lower()
msg = {}
if smsg == "get" then
msg.command = "get"
elseif smsg:sub(1, 13) == "self_destruct" then
msg.command = "self_destruct"
msg.timer = tonumber(smsg:sub(15)) or 0
elseif smsg == "start" then
msg.command = "start"
end
elseif msgt ~= "table" then
return
end
if msg.command == "get" then
local inv = meta:get_inventory()
local invtable = {}
for i = 1, 6 do
local stack = inv:get_stack("src", i)
if stack:is_empty() then
invtable[i] = 0
elseif stack:get_name() == fuel_type then
invtable[i] = stack:get_count()
else
invtable[i] = -stack:get_count()
end
end
digiline_remote.send_to_node(pos, channel, {
burn_time = meta:get_int("burn_time"),
enabled = meta:get_int("HV_EU_supply") == power_supply,
siren = meta:get_int("siren") == 1,
structure_accumulated_badness = meta:get_int("structure_accumulated_badness"),
rods = invtable
}, 6, true)
elseif digiline_meltdown and msg.command == "self_destruct" and
minetest.get_node(pos).name == "technic:hv_nuclear_reactor_core_active" then
if msg.timer ~= 0 and type(msg.timer) == "number" then
siren_danger(pos, meta)
minetest.after(msg.timer, melt_down_reactor, pos)
else
melt_down_reactor(pos)
end
elseif msg.command == "start" then
local b = start_reactor(pos, meta)
if b then
digiline_remote.send_to_node(pos, channel, "Start successful", 6, true)
else
digiline_remote.send_to_node(pos, channel, "Error", 6, true)
end
end
end
minetest.register_node("technic:hv_nuclear_reactor_core", {
description = reactor_desc,
tiles = {
"technic_hv_nuclear_reactor_core.png",
"technic_hv_nuclear_reactor_core.png"..cable_entry
},
drawtype = "mesh",
mesh = "technic_reactor.obj",
groups = {cracky = 1, technic_machine = 1, technic_hv = 1, digiline_remote_receive = 1},
legacy_facedir_simple = true,
sounds = default.node_sound_wood_defaults(),
paramtype = "light",
paramtype2 = "facedir",
stack_max = 1,
on_receive_fields = nuclear_reactor_receive_fields,
on_construct = function(pos)
local meta = minetest.get_meta(pos)
meta:set_string("infotext", reactor_desc)
meta:set_string("formspec", make_reactor_formspec(meta))
if digiline_remote_path then
meta:set_string("remote_channel",
"nucelear_reactor"..minetest.pos_to_string(pos))
end
local inv = meta:get_inventory()
inv:set_size("src", 6)
end,
_on_digiline_remote_receive = digiline_remote_def,
can_dig = technic.machine_can_dig,
on_destruct = function(pos) siren_set_state(pos, SS_OFF) end,
allow_metadata_inventory_put = technic.machine_inventory_put,
allow_metadata_inventory_take = technic.machine_inventory_take,
allow_metadata_inventory_move = technic.machine_inventory_move,
technic_run = run,
})
minetest.register_node("technic:hv_nuclear_reactor_core_active", {
tiles = {
"technic_hv_nuclear_reactor_core.png",
"technic_hv_nuclear_reactor_core.png"..cable_entry
},
drawtype = "mesh",
mesh = "technic_reactor.obj",
groups = {cracky = 1, technic_machine = 1, technic_hv = 1, radioactive = 4,
not_in_creative_inventory = 1, digiline_remote_receive = 1},
legacy_facedir_simple = true,
sounds = default.node_sound_wood_defaults(),
drop = "technic:hv_nuclear_reactor_core",
light_source = 14,
paramtype = "light",
paramtype2 = "facedir",
on_receive_fields = nuclear_reactor_receive_fields,
_on_digiline_remote_receive = digiline_remote_def,
can_dig = technic.machine_can_dig,
after_dig_node = melt_down_reactor,
on_destruct = function(pos) siren_set_state(pos, SS_OFF) end,
allow_metadata_inventory_put = technic.machine_inventory_put,
allow_metadata_inventory_take = technic.machine_inventory_take,
allow_metadata_inventory_move = technic.machine_inventory_move,
technic_run = run,
technic_on_disable = function(pos, node)
local timer = minetest.get_node_timer(pos)
timer:start(1)
end,
on_timer = function(pos, node)
local meta = minetest.get_meta(pos)
-- Connected back?
if meta:get_int("HV_EU_timeout") > 0 then return false end
local burn_time = meta:get_int("burn_time") or 0
if burn_time >= burn_ticks or burn_time == 0 then
meta:set_int("HV_EU_supply", 0)
meta:set_int("burn_time", 0)
technic.swap_node(pos, "technic:hv_nuclear_reactor_core")
meta:set_int("structure_accumulated_badness", 0)
siren_clear(pos, meta)
return false
end
meta:set_int("burn_time", burn_time + 1)
return true
end,
})
technic.register_machine("HV", "technic:hv_nuclear_reactor_core", technic.producer)
technic.register_machine("HV", "technic:hv_nuclear_reactor_core_active", technic.producer)

View File

@ -1,6 +1,9 @@
local S = technic.getter
local tube_entry = "^pipeworks_tube_connection_metallic.png"
local cable_entry = "^technic_cable_connection_overlay.png"
minetest.register_craft({
recipe = {
{"technic:carbon_plate", "pipeworks:filter", "technic:composite_plate"},
@ -12,6 +15,7 @@ minetest.register_craft({
local quarry_dig_above_nodes = 3 -- How far above the quarry we will dig nodes
local quarry_max_depth = 100
local quarry_demand = 10000
local quarry_eject_dir = vector.new(0, 1, 0)
local function set_quarry_formspec(meta)
local radius = meta:get_int("size")
@ -83,7 +87,7 @@ local function quarry_handle_purge(pos)
if stack then
local item = stack:to_table()
if item then
technic.tube_inject_item(pos, pos, vector.new(0, 1, 0), item)
technic.tube_inject_item(pos, pos, quarry_eject_dir, item)
stack:clear()
inv:set_stack("cache", i, stack)
break
@ -206,17 +210,29 @@ end
minetest.register_node("technic:quarry", {
description = S("%s Quarry"):format("HV"),
tiles = {"technic_carbon_steel_block.png", "technic_carbon_steel_block.png",
"technic_carbon_steel_block.png", "technic_carbon_steel_block.png",
"technic_carbon_steel_block.png^default_tool_mesepick.png", "technic_carbon_steel_block.png"},
inventory_image = minetest.inventorycube("technic_carbon_steel_block.png",
"technic_carbon_steel_block.png^default_tool_mesepick.png",
"technic_carbon_steel_block.png"),
tiles = {
"technic_carbon_steel_block.png"..tube_entry,
"technic_carbon_steel_block.png"..cable_entry,
"technic_carbon_steel_block.png"..cable_entry,
"technic_carbon_steel_block.png"..cable_entry,
"technic_carbon_steel_block.png^default_tool_mesepick.png",
"technic_carbon_steel_block.png"..cable_entry
},
paramtype2 = "facedir",
groups = {cracky=2, tubedevice=1, technic_machine=1, technic_hv=1},
connect_sides = {"bottom", "front", "left", "right"},
tube = {
connect_sides = {top = 1},
-- lower priority than other tubes, so that quarries will prefer any
-- other tube to another quarry, which could lead to server freezes
-- in certain quarry placements (2x2 for example would never eject)
priority = 10,
can_go = function(pos, node, velocity, stack)
-- always eject the same, even if items came in another way
-- this further mitigates loops and generally avoids random sideway movement
-- that can be expected in certain quarry placements
return { quarry_eject_dir }
end
},
on_construct = function(pos)
local meta = minetest.get_meta(pos)

View File

@ -1,3 +1,4 @@
-- LV Battery box
minetest.register_craft({
output = 'technic:lv_battery_box0',

View File

@ -4,6 +4,8 @@
local S = technic.getter
local cable_entry = "^technic_cable_connection_overlay.png"
minetest.register_alias("water_mill", "technic:water_mill")
minetest.register_craft({
@ -17,19 +19,21 @@ minetest.register_craft({
local function check_node_around_mill(pos)
local node = minetest.get_node(pos)
if node.name == "default:water_flowing" or
node.name == "default:water_source" then
return true
if node.name == "default:water_flowing"
or node.name == "default:river_water_flowing" then
return node.param2 -- returns approx. water flow, if any
end
return false
end
local run = function(pos, node)
local meta = minetest.get_meta(pos)
local water_nodes = 0
local water_flow = 0
local lava_nodes = 0
local production_level = 0
local eu_supply = 0
local max_output = 35 * 45 -- four param2's at 15 makes 60, cap it lower for "overload protection"
-- (plus we want the gen to report 100% if three sides have full flow)
local positions = {
{x=pos.x+1, y=pos.y, z=pos.z},
@ -41,16 +45,14 @@ local run = function(pos, node)
for _, p in pairs(positions) do
local check = check_node_around_mill(p)
if check then
water_nodes = water_nodes + 1
water_flow = water_flow + check
end
end
production_level = 25 * water_nodes
eu_supply = 30 * water_nodes
eu_supply = math.min(35 * water_flow, max_output)
production_level = math.floor(100 * eu_supply / max_output)
if production_level > 0 then
meta:set_int("LV_EU_supply", eu_supply)
end
meta:set_int("LV_EU_supply", eu_supply)
meta:set_string("infotext",
S("Hydro %s Generator"):format("LV").." ("..production_level.."%)")
@ -68,9 +70,14 @@ end
minetest.register_node("technic:water_mill", {
description = S("Hydro %s Generator"):format("LV"),
tiles = {"technic_water_mill_top.png", "technic_machine_bottom.png",
"technic_water_mill_side.png", "technic_water_mill_side.png",
"technic_water_mill_side.png", "technic_water_mill_side.png"},
tiles = {
"technic_water_mill_top.png",
"technic_machine_bottom.png"..cable_entry,
"technic_water_mill_side.png",
"technic_water_mill_side.png",
"technic_water_mill_side.png",
"technic_water_mill_side.png"
},
paramtype2 = "facedir",
groups = {snappy=2, choppy=2, oddly_breakable_by_hand=2,
technic_machine=1, technic_lv=1},

View File

@ -146,6 +146,7 @@ minetest.register_node("technic:power_radiator", {
})
minetest.register_abm({
label = "Machines: run power radiator",
nodenames = {"technic:power_radiator"},
interval = 1,
chance = 1,

View File

@ -5,6 +5,8 @@ minetest.register_alias("tool_workshop", "technic:tool_workshop")
local S = technic.getter
local tube_entry = "^pipeworks_tube_connection_wooden.png"
minetest.register_craft({
output = 'technic:tool_workshop',
recipe = {
@ -83,8 +85,14 @@ end
minetest.register_node("technic:tool_workshop", {
description = S("%s Tool Workshop"):format("MV"),
paramtype2 = "facedir",
tiles = {"technic_workshop_top.png", "technic_machine_bottom.png", "technic_workshop_side.png",
"technic_workshop_side.png", "technic_workshop_side.png", "technic_workshop_side.png"},
tiles = {
"technic_workshop_top.png"..tube_entry,
"technic_machine_bottom.png"..tube_entry,
"technic_workshop_side.png"..tube_entry,
"technic_workshop_side.png"..tube_entry,
"technic_workshop_side.png"..tube_entry,
"technic_workshop_side.png"
},
groups = {snappy=2, choppy=2, oddly_breakable_by_hand=2,
technic_machine=1, technic_mv=1, tubedevice=1, tubedevice_receiver=1},
connect_sides = {"bottom", "back", "left", "right"},

View File

@ -33,8 +33,15 @@ local function check_wind_mill(pos)
if pos.y < 30 then
return false
end
pos = {x=pos.x, y=pos.y, z=pos.z}
for i = 1, 20 do
local node = minetest.get_node({x=pos.x, y=pos.y-i, z=pos.z})
pos.y = pos.y - 1
local node = minetest.get_node_or_nil(pos)
if not node then
-- we reached CONTENT_IGNORE, we can assume, that nothing changed
-- as the user will have to load the block to change it
return
end
if node.name ~= "technic:wind_mill_frame" then
return false
end
@ -45,17 +52,17 @@ end
local run = function(pos, node)
local meta = minetest.get_meta(pos)
local machine_name = S("Wind %s Generator"):format("MV")
local power = math.min(pos.y * 100, 5000)
if not check_wind_mill(pos) then
local check = check_wind_mill(pos)
if check == false then
meta:set_int("MV_EU_supply", 0)
meta:set_string("infotext", S("%s Improperly Placed"):format(machine_name))
return
else
elseif check == true then
local power = math.min(pos.y * 100, 5000)
meta:set_int("MV_EU_supply", power)
meta:set_string("infotext", S("@1 (@2 EU)", machine_name, technic.pretty_num(power)))
end
meta:set_string("infotext", S("@1 (@2 EU)", machine_name, technic.pretty_num(power)))
-- check == nil: assume nothing has changed
end
minetest.register_node("technic:wind_mill", {

View File

@ -8,6 +8,7 @@ dofile(path.."/MV/init.lua")
dofile(path.."/HV/init.lua")
dofile(path.."/switching_station.lua")
dofile(path.."/power_monitor.lua")
dofile(path.."/supply_converter.lua")
dofile(path.."/other/init.lua")

View File

@ -70,6 +70,7 @@ minetest.register_node("technic:coal_alloy_furnace_active", {
})
minetest.register_abm({
label = "Machines: run coal alloy furnace",
nodenames = {"technic:coal_alloy_furnace", "technic:coal_alloy_furnace_active"},
interval = 1,
chance = 1,

View File

@ -2,6 +2,7 @@
local S = technic.getter
local function deploy_node(inv, slot_name, pos, node, machine_node)
if node.param2 > 3 then return end
if node.name ~= "air" then
if node.name == "ignore" or
node.name == "default:lava_source" or
@ -21,7 +22,7 @@ local function deploy_node(inv, slot_name, pos, node, machine_node)
end
if remove_to then
for i = 1, remove_to do
inv:remove_item(drops[i])
inv:remove_item(slot_name, drops[i])
end
else
minetest.remove_node(pos)
@ -162,6 +163,7 @@ local function make_constructor(mark, length)
allow_metadata_inventory_put = technic.machine_inventory_put,
allow_metadata_inventory_take = technic.machine_inventory_take,
allow_metadata_inventory_move = technic.machine_inventory_move,
on_rotate = screwdriver.rotate_simple
})
minetest.register_node("technic:constructor_mk"..mark.."_on", {
@ -180,6 +182,7 @@ local function make_constructor(mark, length)
allow_metadata_inventory_put = technic.machine_inventory_put,
allow_metadata_inventory_take = technic.machine_inventory_take,
allow_metadata_inventory_move = technic.machine_inventory_move,
on_rotate = false
})
end

View File

@ -3,7 +3,7 @@ local S = technic.getter
frames = {}
local infinite_stacks = minetest.setting_getbool("creative_mode") and minetest.get_modpath("unified_inventory") == nil
local infinite_stacks = minetest.settings:get_bool("creative_mode") and minetest.get_modpath("unified_inventory") == nil
local frames_pos = {}

View File

@ -1,6 +1,10 @@
local S = technic.getter
local fs_helpers = pipeworks.fs_helpers
local tube_entry = "^pipeworks_tube_connection_metallic.png"
local function inject_items (pos)
local meta=minetest.get_meta(pos)
local inv = meta:get_inventory()
@ -51,37 +55,59 @@ minetest.register_craft({
local function set_injector_formspec(meta)
local is_stack = meta:get_string("mode") == "whole stacks"
meta:set_string("formspec",
"invsize[8,9;]"..
"item_image[0,0;1,1;technic:injector]"..
"label[1,0;"..S("Self-Contained Injector").."]"..
(is_stack and
"button[0,1;2,1;mode_item;"..S("Stackwise").."]" or
"button[0,1;2,1;mode_stack;"..S("Itemwise").."]")..
"list[current_name;main;0,2;8,2;]"..
"list[current_player;main;0,5;8,4;]"..
"listring[]")
"invsize[8,9;]"..
"item_image[0,0;1,1;technic:injector]"..
"label[1,0;"..S("Self-Contained Injector").."]"..
(is_stack and
"button[0,1;2,1;mode_item;"..S("Stackwise").."]" or
"button[0,1;2,1;mode_stack;"..S("Itemwise").."]")..
"list[current_name;main;0,2;8,2;]"..
"list[current_player;main;0,5;8,4;]"..
"listring[]"..
fs_helpers.cycling_button(
meta,
pipeworks.button_base,
"splitstacks",
{
pipeworks.button_off,
pipeworks.button_on
}
)..pipeworks.button_label
)
end
minetest.register_node("technic:injector", {
description = S("Self-Contained Injector"),
tiles = {"technic_injector_top.png", "technic_injector_bottom.png", "technic_injector_side.png",
"technic_injector_side.png", "technic_injector_side.png", "technic_injector_side.png"},
tiles = {
"technic_injector_top.png"..tube_entry,
"technic_injector_bottom.png",
"technic_injector_side.png"..tube_entry,
"technic_injector_side.png"..tube_entry,
"technic_injector_side.png"..tube_entry,
"technic_injector_side.png"
},
paramtype2 = "facedir",
groups = {snappy=2, choppy=2, oddly_breakable_by_hand=2, tubedevice=1, tubedevice_receiver=1},
tube = {
can_insert = function(pos, node, stack, direction)
return minetest.get_meta(pos):get_inventory():room_for_item("main",stack)
local meta = minetest.get_meta(pos)
local inv = meta:get_inventory()
if meta:get_int("splitstacks") == 1 then
stack = stack:peek_item(1)
end
return meta:get_inventory():room_for_item("main", stack)
end,
insert_object = function(pos, node, stack, direction)
return minetest.get_meta(pos):get_inventory():add_item("main",stack)
return minetest.get_meta(pos):get_inventory():add_item("main", stack)
end,
connect_sides = {left=1, right=1, front=1, back=1, top=1, bottom=1},
connect_sides = {left=1, right=1, back=1, top=1, bottom=1},
},
sounds = default.node_sound_wood_defaults(),
on_construct = function(pos)
local meta = minetest.get_meta(pos)
meta:set_string("infotext", S("Self-Contained Injector"))
local inv = meta:get_inventory()
inv:set_size("main", 8*4)
inv:set_size("main", 8*2)
meta:set_string("mode","single items")
set_injector_formspec(meta)
end,
@ -94,6 +120,12 @@ minetest.register_node("technic:injector", {
local meta = minetest.get_meta(pos)
if fields.mode_item then meta:set_string("mode", "single items") end
if fields.mode_stack then meta:set_string("mode", "whole stacks") end
if fields["fs_helpers_cycling:0:splitstacks"]
or fields["fs_helpers_cycling:1:splitstacks"] then
if not pipeworks.may_configure(pos, sender) then return end
fs_helpers.on_receive_fields(pos, fields)
end
set_injector_formspec(meta)
end,
allow_metadata_inventory_put = technic.machine_inventory_put,
@ -104,6 +136,7 @@ minetest.register_node("technic:injector", {
})
minetest.register_abm({
label = "Machines: run injector",
nodenames = {"technic:injector"},
interval = 1,
chance = 1,

View File

@ -0,0 +1,69 @@
-- POWER MONITOR
-- The power monitor can be used to monitor how much power is available on a network,
-- similarly to the old "slave" switching stations.
local S = technic.getter
local cable_entry = "^technic_cable_connection_overlay.png"
minetest.register_craft({
output = "technic:power_monitor",
recipe = {
{"", "", ""},
{"", "technic:machine_casing", "default:copper_ingot"},
{"technic:lv_cable", "technic:lv_cable", "technic:lv_cable"}
}
})
minetest.register_node("technic:power_monitor",{
description = S("Power Monitor"),
tiles = {
"technic_power_monitor_sides.png",
"technic_power_monitor_sides.png"..cable_entry,
"technic_power_monitor_sides.png",
"technic_power_monitor_sides.png",
"technic_power_monitor_sides.png"..cable_entry,
"technic_power_monitor_front.png"
},
paramtype2 = "facedir",
groups = {snappy=2, choppy=2, oddly_breakable_by_hand=2, technic_all_tiers=1, technic_machine=1},
connect_sides = {"bottom", "back"},
sounds = default.node_sound_wood_defaults(),
on_construct = function(pos)
local meta = minetest.get_meta(pos)
meta:set_string("infotext", S("Power Monitor"))
end,
})
minetest.register_abm({
nodenames = {"technic:power_monitor"},
label = "Machines: run power monitor",
interval = 1,
chance = 1,
action = function(pos, node, active_object_count, active_object_count_wider)
local meta = minetest.get_meta(pos)
local network_hash = technic.cables[minetest.hash_node_position(pos)]
local network = network_hash and minetest.get_position_from_hash(network_hash)
local sw_pos = network and {x=network.x,y=network.y+1,z=network.z}
local timeout = 0
for tier in pairs(technic.machines) do
timeout = math.max(meta:get_int(tier.."_EU_timeout"),timeout)
end
if timeout > 0 and sw_pos and minetest.get_node(sw_pos).name == "technic:switching_station" then
local sw_meta = minetest.get_meta(sw_pos)
local supply = sw_meta:get_int("supply")
local demand = sw_meta:get_int("demand")
meta:set_string("infotext",
S("Power Monitor. Supply: @1 Demand: @2",
technic.pretty_num(supply), technic.pretty_num(demand)))
else
meta:set_string("infotext",S("Power Monitor Has No Network"))
end
end,
})
for tier in pairs(technic.machines) do
-- RE in order to use the "timeout" functions, although it consumes 0 power
technic.register_machine(tier, "technic:power_monitor", "RE")
end

View File

@ -1,17 +1,70 @@
local digilines_path = minetest.get_modpath("digilines")
local S = technic.getter
local tube_entry = "^pipeworks_tube_connection_metallic.png"
local cable_entry = "^technic_cable_connection_overlay.png"
local fs_helpers = pipeworks.fs_helpers
technic.register_power_tool("technic:battery", 10000)
technic.register_power_tool("technic:red_energy_crystal", 50000)
technic.register_power_tool("technic:green_energy_crystal", 150000)
technic.register_power_tool("technic:blue_energy_crystal", 450000)
-- Battery recipes:
-- Tin-copper recipe:
minetest.register_craft({
output = 'technic:battery',
output = "technic:battery",
recipe = {
{'group:wood', 'default:copper_ingot', 'group:wood'},
{'group:wood', 'moreores:tin_ingot', 'group:wood'},
{'group:wood', 'default:copper_ingot', 'group:wood'},
{"group:wood", "default:copper_ingot", "group:wood"},
{"group:wood", "moreores:tin_ingot", "group:wood"},
{"group:wood", "default:copper_ingot", "group:wood"},
}
})
-- Sulfur-lead-water recipes:
-- With sulfur lumps:
-- With water:
minetest.register_craft({
output = "technic:battery",
recipe = {
{"group:wood", "technic:sulfur_lump", "group:wood"},
{"technic:lead_ingot", "bucket:bucket_water", "technic:lead_ingot"},
{"group:wood", "technic:sulfur_lump", "group:wood"},
},
replacements = {
{"bucket:bucket_water", "bucket:bucket_empty"}
}
})
-- With oil extract:
minetest.register_craft({
output = "technic:battery",
recipe = {
{"group:wood", "technic:sulfur_lump", "group:wood"},
{"technic:lead_ingot", "homedecor:oil_extract", "technic:lead_ingot"},
{"group:wood", "technic:sulfur_lump", "group:wood"},
}
})
-- With sulfur dust:
-- With water:
minetest.register_craft({
output = "technic:battery",
recipe = {
{"group:wood", "technic:sulfur_dust", "group:wood"},
{"technic:lead_ingot", "bucket:bucket_water", "technic:lead_ingot"},
{"group:wood", "technic:sulfur_dust", "group:wood"},
},
replacements = {
{"bucket:bucket_water", "bucket:bucket_empty"}
}
})
-- With oil extract:
minetest.register_craft({
output = "technic:battery",
recipe = {
{"group:wood", "technic:sulfur_dust", "group:wood"},
{"technic:lead_ingot", "homedecor:oil_extract", "technic:lead_ingot"},
{"group:wood", "technic:sulfur_dust", "group:wood"},
}
})
@ -29,67 +82,124 @@ minetest.register_tool("technic:battery", {
}
})
-- x+2 + (z+2)*2
local dirtab = {
[4] = 2,
[5] = 3,
[7] = 1,
[8] = 0
}
local tube = {
insert_object = function(pos, node, stack, direction)
if direction.y == 0 then
print(minetest.pos_to_string(direction), dirtab[direction.x+2+(direction.z+2)*2], node.param2)
if direction.y == 1
or (direction.y == 0 and dirtab[direction.x+2+(direction.z+2)*2] == node.param2) then
return stack
end
local meta = minetest.get_meta(pos)
local inv = meta:get_inventory()
if direction.y > 0 then
if direction.y == 0 then
return inv:add_item("src", stack)
else
return inv:add_item("dst", stack)
end
end,
can_insert = function(pos, node, stack, direction)
if direction.y == 0 then
print(minetest.pos_to_string(direction), dirtab[direction.x+2+(direction.z+2)*2], node.param2)
if direction.y == 1
or (direction.y == 0 and dirtab[direction.x+2+(direction.z+2)*2] == node.param2) then
return false
end
local meta = minetest.get_meta(pos)
local inv = meta:get_inventory()
if direction.y > 0 then
if direction.y == 0 then
if meta:get_int("split_src_stacks") == 1 then
stack = stack:peek_item(1)
end
return inv:room_for_item("src", stack)
else
if meta:get_int("split_dst_stacks") == 1 then
stack = stack:peek_item(1)
end
return inv:room_for_item("dst", stack)
end
end,
connect_sides = {left=1, right=1, back=1, top=1, bottom=1},
connect_sides = {left=1, right=1, back=1, top=1},
}
local function add_on_off_buttons(meta, ltier, charge_percent)
local formspec = ""
if ltier == "mv" or ltier == "hv" then
formspec = "image[1,1;1,2;technic_power_meter_bg.png"
.."^[lowpart:"..charge_percent
..":technic_power_meter_fg.png]"..
fs_helpers.cycling_button(
meta,
"image_button[3,2.0;1,0.6",
"split_src_stacks",
{
pipeworks.button_off,
pipeworks.button_on
}
).."label[3.9,2.01;Allow splitting incoming 'charge' stacks from tubes]"..
fs_helpers.cycling_button(
meta,
"image_button[3,2.5;1,0.6",
"split_dst_stacks",
{
pipeworks.button_off,
pipeworks.button_on
}
).."label[3.9,2.51;Allow splitting incoming 'discharge' stacks]"
end
return formspec
end
function technic.register_battery_box(data)
local tier = data.tier
local ltier = string.lower(tier)
local formspec =
"invsize[8,9;]"..
"size[8,9]"..
"image[1,1;1,2;technic_power_meter_bg.png]"..
"list[current_name;src;3,1;1,1;]"..
"list[context;src;3,1;1,1;]"..
"image[4,1;1,1;technic_battery_reload.png]"..
"list[current_name;dst;5,1;1,1;]"..
"list[context;dst;5,1;1,1;]"..
"label[0,0;"..S("%s Battery Box"):format(tier).."]"..
"label[3,0;"..S("Charge").."]"..
"label[5,0;"..S("Discharge").."]"..
"label[1,3;"..S("Power level").."]"..
"list[current_player;main;0,5;8,4;]"..
"listring[current_name;dst]"..
"listring[context;dst]"..
"listring[current_player;main]"..
"listring[current_name;src]"..
"listring[context;src]"..
"listring[current_player;main]"
if digilines_path then
formspec = formspec.."button[0.6,3.7;2,1;edit_channel;edit Channel]"
end
if data.upgrade then
formspec = formspec..
"list[current_name;upgrade1;3.5,3;1,1;]"..
"list[current_name;upgrade2;4.5,3;1,1;]"..
"list[context;upgrade1;3.5,3;1,1;]"..
"list[context;upgrade2;4.5,3;1,1;]"..
"label[3.5,4;"..S("Upgrade Slots").."]"..
"listring[current_name;upgrade1]"..
"listring[context;upgrade1]"..
"listring[current_player;main]"..
"listring[current_name;upgrade2]"..
"listring[context;upgrade2]"..
"listring[current_player;main]"
end
local run = function(pos, node)
local below = minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z})
local meta = minetest.get_meta(pos)
if not technic.is_tier_cable(below.name, tier) then
meta:set_string("infotext", S("%s Battery Box Has No Network"):format(tier))
return
end
local eu_input = meta:get_int(tier.."_EU_input")
local current_charge = meta:get_int("internal_EU_charge")
@ -98,7 +208,7 @@ function technic.register_battery_box(data)
EU_upgrade, tube_upgrade = technic.handle_machine_upgrades(meta)
end
local max_charge = data.max_charge * (1 + EU_upgrade / 10)
-- Charge/discharge the battery with the input EUs
if eu_input >= 0 then
current_charge = math.min(current_charge + eu_input, max_charge)
@ -113,7 +223,7 @@ function technic.register_battery_box(data)
current_charge, tool_empty = technic.discharge_tools(meta,
current_charge, data.discharge_step,
max_charge)
if data.tube then
local inv = meta:get_inventory()
technic.handle_machine_pipeworks(pos, tube_upgrade,
@ -144,12 +254,7 @@ function technic.register_battery_box(data)
end
local charge_percent = math.floor(current_charge / max_charge * 100)
meta:set_string("formspec",
formspec..
"image[1,1;1,2;technic_power_meter_bg.png"
.."^[lowpart:"..charge_percent
..":technic_power_meter_fg.png]")
meta:set_string("formspec", formspec..add_on_off_buttons(meta, ltier, charge_percent))
local infotext = S("@1 Battery Box: @2/@3", tier,
technic.pretty_num(current_charge), technic.pretty_num(max_charge))
if eu_input == 0 then
@ -157,27 +262,39 @@ function technic.register_battery_box(data)
end
meta:set_string("infotext", infotext)
end
for i = 0, 8 do
local groups = {snappy=2, choppy=2, oddly_breakable_by_hand=2,
technic_machine=1, ["technic_"..ltier]=1}
if i ~= 0 then
groups.not_in_creative_inventory = 1
end
if data.tube then
groups.tubedevice = 1
groups.tubedevice_receiver = 1
end
local top_tex = "technic_"..ltier.."_battery_box_top.png"..tube_entry
local front_tex = "technic_"..ltier.."_battery_box_front.png^technic_power_meter"..i..".png"
local side_tex = "technic_"..ltier.."_battery_box_side.png"..tube_entry
local bottom_tex = "technic_"..ltier.."_battery_box_bottom.png"..cable_entry
if ltier == "lv" then
top_tex = "technic_"..ltier.."_battery_box_top.png"
front_tex = "technic_"..ltier.."_battery_box_side.png^technic_power_meter"..i..".png"
side_tex = "technic_"..ltier.."_battery_box_side.png^technic_power_meter"..i..".png"
end
minetest.register_node("technic:"..ltier.."_battery_box"..i, {
description = S("%s Battery Box"):format(tier),
tiles = {"technic_"..ltier.."_battery_box_top.png",
"technic_"..ltier.."_battery_box_bottom.png",
"technic_"..ltier.."_battery_box_side.png^technic_power_meter"..i..".png",
"technic_"..ltier.."_battery_box_side.png^technic_power_meter"..i..".png",
"technic_"..ltier.."_battery_box_side.png^technic_power_meter"..i..".png",
"technic_"..ltier.."_battery_box_side.png^technic_power_meter"..i..".png"},
tiles = {
top_tex,
bottom_tex,
side_tex,
side_tex,
side_tex,
front_tex},
groups = groups,
connect_sides = {"bottom"},
tube = data.tube and tube or nil,
@ -186,11 +303,18 @@ function technic.register_battery_box(data)
drop = "technic:"..ltier.."_battery_box0",
on_construct = function(pos)
local meta = minetest.get_meta(pos)
local EU_upgrade, tube_upgrade = 0, 0
if data.upgrade then
EU_upgrade, tube_upgrade = technic.handle_machine_upgrades(meta)
end
local max_charge = data.max_charge * (1 + EU_upgrade / 10)
local charge = meta:get_int("internal_EU_charge")
local cpercent = math.floor(charge / max_charge * 100)
local inv = meta:get_inventory()
local node = minetest.get_node(pos)
meta:set_string("infotext", S("%s Battery Box"):format(tier))
meta:set_string("formspec", formspec)
meta:set_string("formspec", formspec..add_on_off_buttons(meta, ltier, cpercent))
meta:set_string("channel", ltier.."_battery_box"..minetest.pos_to_string(pos))
meta:set_int(tier.."_EU_demand", 0)
meta:set_int(tier.."_EU_supply", 0)
meta:set_int(tier.."_EU_input", 0)
@ -205,8 +329,59 @@ function technic.register_battery_box(data)
allow_metadata_inventory_take = technic.machine_inventory_take,
allow_metadata_inventory_move = technic.machine_inventory_move,
technic_run = run,
on_rotate = screwdriver.rotate_simple,
after_place_node = data.tube and pipeworks.after_place,
after_dig_node = technic.machine_after_dig_node
after_dig_node = technic.machine_after_dig_node,
on_receive_fields = function(pos, formname, fields, sender)
local meta = minetest.get_meta(pos)
local nodename = minetest.get_node(pos).name
if fields.edit_channel then
minetest.show_formspec(sender:get_player_name(),
"technic:battery_box_edit_channel"..minetest.pos_to_string(pos),
"field[channel;Digiline Channel;"..meta:get_string("channel").."]")
elseif fields["fs_helpers_cycling:0:split_src_stacks"]
or fields["fs_helpers_cycling:0:split_dst_stacks"]
or fields["fs_helpers_cycling:1:split_src_stacks"]
or fields["fs_helpers_cycling:1:split_dst_stacks"] then
local meta = minetest.get_meta(pos)
if not pipeworks.may_configure(pos, sender) then return end
fs_helpers.on_receive_fields(pos, fields)
local EU_upgrade, tube_upgrade = 0, 0
if data.upgrade then
EU_upgrade, tube_upgrade = technic.handle_machine_upgrades(meta)
end
local max_charge = data.max_charge * (1 + EU_upgrade / 10)
local charge = meta:get_int("internal_EU_charge")
local cpercent = math.floor(charge / max_charge * 100)
meta:set_string("formspec", formspec..add_on_off_buttons(meta, ltier, cpercent))
end
end,
digiline = {
receptor = {action = function() end},
effector = {
action = function(pos, node, channel, msg)
if msg ~= "GET" and msg ~= "get" then
return
end
local meta = minetest.get_meta(pos)
if channel ~= meta:get_string("channel") then
return
end
local inv = meta:get_inventory()
digilines.receptor_send(pos, digilines.rules.default, channel, {
demand = meta:get_int(tier.."_EU_demand"),
supply = meta:get_int(tier.."_EU_supply"),
input = meta:get_int(tier.."_EU_input"),
charge = meta:get_int("internal_EU_charge"),
max_charge = data.max_charge * (1 + technic.handle_machine_upgrades(meta) / 10),
src = inv:get_stack("src", 1):to_table(),
dst = inv:get_stack("dst", 1):to_table(),
upgrade1 = inv:get_stack("upgrade1", 1):to_table(),
upgrade2 = inv:get_stack("upgrade2", 1):to_table()
})
end
},
},
})
end
@ -218,6 +393,22 @@ function technic.register_battery_box(data)
end -- End registration
minetest.register_on_player_receive_fields(
function(player, formname, fields)
if formname:sub(1, 32) ~= "technic:battery_box_edit_channel" or
not fields.channel then
return
end
local pos = minetest.string_to_pos(formname:sub(33))
local plname = player:get_player_name()
if minetest.is_protected(pos, plname) then
minetest.record_protection_violation(pos, plname)
return
end
local meta = minetest.get_meta(pos)
meta:set_string("channel", fields.channel)
end
)
function technic.charge_tools(meta, batt_charge, charge_step)
local inv = meta:get_inventory()

View File

@ -0,0 +1,286 @@
local S = technic.getter
local cable_tier = {}
function technic.is_tier_cable(name, tier)
return cable_tier[name] == tier
end
function technic.get_cable_tier(name)
return cable_tier[name]
end
local function check_connections(pos)
-- Build a table of all machines
local machines = {}
for tier,list in pairs(technic.machines) do
for k,v in pairs(list) do
machines[k] = v
end
end
local connections = {}
local positions = {
{x=pos.x+1, y=pos.y, z=pos.z},
{x=pos.x-1, y=pos.y, z=pos.z},
{x=pos.x, y=pos.y+1, z=pos.z},
{x=pos.x, y=pos.y-1, z=pos.z},
{x=pos.x, y=pos.y, z=pos.z+1},
{x=pos.x, y=pos.y, z=pos.z-1}}
for _,connected_pos in pairs(positions) do
local name = minetest.get_node(connected_pos).name
if machines[name] or technic.get_cable_tier(name) then
table.insert(connections,connected_pos)
end
end
return connections
end
local function clear_networks(pos)
local node = minetest.get_node(pos)
local meta = minetest.get_meta(pos)
local placed = node.name ~= "air"
local positions = check_connections(pos)
if #positions < 1 then return end
local dead_end = #positions == 1
for _,connected_pos in pairs(positions) do
local net = technic.cables[minetest.hash_node_position(connected_pos)]
if net and technic.networks[net] then
if dead_end and placed then
-- Dead end placed, add it to the network
-- Get the network
local network_id = technic.cables[minetest.hash_node_position(positions[1])]
if not network_id then
-- We're evidently not on a network, nothing to add ourselves to
return
end
local sw_pos = minetest.get_position_from_hash(network_id)
sw_pos.y = sw_pos.y + 1
local network = technic.networks[network_id]
local tier = network.tier
-- Actually add it to the (cached) network
-- This is similar to check_node_subp
technic.cables[minetest.hash_node_position(pos)] = network_id
pos.visited = 1
if technic.is_tier_cable(name, tier) then
table.insert(network.all_nodes,pos)
elseif technic.machines[tier][node.name] then
meta:set_string(tier.."_network",minetest.pos_to_string(sw_pos))
if technic.machines[tier][node.name] == technic.producer then
table.insert(network.PR_nodes,pos)
elseif technic.machines[tier][node.name] == technic.receiver then
table.insert(network.RE_nodes,pos)
elseif technic.machines[tier][node.name] == technic.producer_receiver then
table.insert(network.PR_nodes,pos)
table.insert(network.RE_nodes,pos)
elseif technic.machines[tier][node.name] == "SPECIAL" and
(pos.x ~= sw_pos.x or pos.y ~= sw_pos.y or pos.z ~= sw_pos.z) and
from_below then
table.insert(network.SP_nodes,pos)
elseif technic.machines[tier][node.name] == technic.battery then
table.insert(network.BA_nodes,pos)
end
end
elseif dead_end and not placed then
-- Dead end removed, remove it from the network
-- Get the network
local network_id = technic.cables[minetest.hash_node_position(positions[1])]
if not network_id then
-- We're evidently not on a network, nothing to add ourselves to
return
end
local network = technic.networks[network_id]
-- Search for and remove machine
technic.cables[minetest.hash_node_position(pos)] = nil
for tblname,table in pairs(network) do
if tblname ~= "tier" then
for machinenum,machine in pairs(table) do
if machine.x == pos.x
and machine.y == pos.y
and machine.z == pos.z then
table[machinenum] = nil
end
end
end
end
else
-- Not a dead end, so the whole network needs to be recalculated
for _,v in pairs(technic.networks[net].all_nodes) do
local pos1 = minetest.hash_node_position(v)
technic.cables[pos1] = nil
end
technic.networks[net] = nil
end
end
end
end
function technic.register_cable(tier, size)
local ltier = string.lower(tier)
cable_tier["technic:"..ltier.."_cable"] = tier
local groups = {snappy=2, choppy=2, oddly_breakable_by_hand=2,
["technic_"..ltier.."_cable"] = 1}
local node_box = {
type = "connected",
fixed = {-size, -size, -size, size, size, size},
connect_top = {-size, -size, -size, size, 0.5, size}, -- y+
connect_bottom = {-size, -0.5, -size, size, size, size}, -- y-
connect_front = {-size, -size, -0.5, size, size, size}, -- z-
connect_back = {-size, -size, size, size, size, 0.5 }, -- z+
connect_left = {-0.5, -size, -size, size, size, size}, -- x-
connect_right = {-size, -size, -size, 0.5, size, size}, -- x+
}
minetest.register_node("technic:"..ltier.."_cable", {
description = S("%s Cable"):format(tier),
tiles = {"technic_"..ltier.."_cable.png"},
inventory_image = "technic_"..ltier.."_cable_wield.png",
wield_image = "technic_"..ltier.."_cable_wield.png",
groups = groups,
sounds = default.node_sound_wood_defaults(),
drop = "technic:"..ltier.."_cable",
paramtype = "light",
sunlight_propagates = true,
drawtype = "nodebox",
node_box = node_box,
connects_to = {"group:technic_"..ltier.."_cable",
"group:technic_"..ltier, "group:technic_all_tiers"},
on_construct = clear_networks,
on_destruct = clear_networks,
})
local xyz = {
["-x"] = 1,
["-y"] = 2,
["-z"] = 3,
["x"] = 4,
["y"] = 5,
["z"] = 6,
}
local notconnects = {
[1] = "left",
[2] = "bottom",
[3] = "front",
[4] = "right",
[5] = "top",
[6] = "back",
}
local function s(p)
if p:find("-") then
return p:sub(2)
else
return "-"..p
end
end
for p, i in pairs(xyz) do
local def = {
description = S("%s Cable Plate"):format(tier),
tiles = {"technic_"..ltier.."_cable.png"},
groups = table.copy(groups),
sounds = default.node_sound_wood_defaults(),
drop = "technic:"..ltier.."_cable_plate_1",
paramtype = "light",
sunlight_propagates = true,
drawtype = "nodebox",
node_box = table.copy(node_box),
connects_to = {"group:technic_"..ltier.."_cable",
"group:technic_"..ltier, "group:technic_all_tiers"},
on_construct = clear_networks,
on_destruct = clear_networks,
}
def.node_box.fixed = {
{-size, -size, -size, size, size, size},
{-0.5, -0.5, -0.5, 0.5, 0.5, 0.5}
}
def.node_box.fixed[1][xyz[p]] = 7/16 * (i-3.5)/math.abs(i-3.5)
def.node_box.fixed[2][xyz[s(p)]] = 3/8 * (i-3.5)/math.abs(i-3.5)
def.node_box["connect_"..notconnects[i]] = nil
if i == 1 then
def.on_place = function(itemstack, placer, pointed_thing)
local pointed_thing_diff = vector.subtract(pointed_thing.above, pointed_thing.under)
local num
local changed
for k, v in pairs(pointed_thing_diff) do
if v ~= 0 then
changed = k
num = xyz[s(tostring(v):sub(-2, -2)..k)]
break
end
end
local crtl = placer:get_player_control()
if (crtl.aux1 or crtl.sneak) and not (crtl.aux1 and crtl.sneak) then
local fine_pointed = minetest.pointed_thing_to_face_pos(placer, pointed_thing)
fine_pointed = vector.subtract(fine_pointed, pointed_thing.above)
fine_pointed[changed] = nil
local ps = {}
for p, _ in pairs(fine_pointed) do
ps[#ps+1] = p
end
local bigger = (math.abs(fine_pointed[ps[1]]) > math.abs(fine_pointed[ps[2]]) and ps[1]) or ps[2]
if math.abs(fine_pointed[bigger]) < 0.3 then
num = num + 3
num = (num <= 6 and num) or num - 6
else
num = xyz[((fine_pointed[bigger] < 0 and "-") or "") .. bigger]
end
end
minetest.set_node(pointed_thing.above, {name = "technic:"..ltier.."_cable_plate_"..num})
if not (creative and creative.is_enabled_for(placer)) then
itemstack:take_item()
end
return itemstack
end
else
def.groups.not_in_creative_inventory = 1
end
def.on_rotate = function(pos, node, user, mode, new_param2)
local dir = 0
if mode == screwdriver.ROTATE_FACE then -- left-click
dir = 1
elseif mode == screwdriver.ROTATE_AXIS then -- right-click
dir = -1
end
local num = tonumber(node.name:sub(-1))
num = num + dir
num = (num >= 1 and num) or num + 6
num = (num <= 6 and num) or num - 6
minetest.swap_node(pos, {name = "technic:"..ltier.."_cable_plate_"..num})
end
minetest.register_node("technic:"..ltier.."_cable_plate_"..i, def)
cable_tier["technic:"..ltier.."_cable_plate_"..i] = tier
end
local c = "technic:"..ltier.."_cable"
minetest.register_craft({
output = "technic:"..ltier.."_cable_plate_1 5",
recipe = {
{"", "", c},
{c , c , c},
{"", "", c},
}
})
minetest.register_craft({
output = c,
recipe = {
{"technic:"..ltier.."_cable_plate_1"},
}
})
end
local function clear_nets_if_machine(pos, node)
for tier, machine_list in pairs(technic.machines) do
if machine_list[node.name] ~= nil then
return clear_networks(pos)
end
end
end
minetest.register_on_placenode(clear_nets_if_machine)
minetest.register_on_dignode(clear_nets_if_machine)

View File

@ -14,6 +14,8 @@ local recipes = {
{ "technic:bronze_dust 4", "technic:copper_dust 3", "technic:tin_dust" },
{ "technic:stainless_steel_dust 4", "technic:wrought_iron_dust 3", "technic:chromium_dust" },
{ "technic:brass_dust 3", "technic:copper_dust 2", "technic:zinc_dust" },
{ "technic:chernobylite_dust", "default:sand", "technic:uranium3_dust" },
{ "default:dirt 4", "default:sand", "default:gravel", "default:clay_lump 2" },
}
local function uranium_dust(p)
@ -34,5 +36,5 @@ if minetest.get_modpath("farming") then
end
for _, data in pairs(recipes) do
technic.register_separating_recipe({ input = { data[1] }, output = { data[2], data[3] } })
technic.register_separating_recipe({ input = { data[1] }, output = { data[2], data[3], data[4] } })
end

View File

@ -20,11 +20,11 @@ local recipes = {
}
-- defuse the default sandstone recipe, since we have the compressor to take over in a more realistic manner
minetest.register_craft({
output = "default:sand 0",
minetest.clear_craft({
output = "default:sandstone",
recipe = {
{'group:sand', 'group:sand'},
{'group:sand', 'group:sand'}
{'group:sand', 'group:sand'}
},
})

View File

@ -1,5 +1,8 @@
local S = technic.getter
local fs_helpers = pipeworks.fs_helpers
local tube_entry = "^pipeworks_tube_connection_metallic.png"
local tube = {
insert_object = function(pos, node, stack, direction)
local meta = minetest.get_meta(pos)
@ -9,12 +12,16 @@ local tube = {
can_insert = function(pos, node, stack, direction)
local meta = minetest.get_meta(pos)
local inv = meta:get_inventory()
if meta:get_int("splitstacks") == 1 then
stack = stack:peek_item(1)
end
return inv:room_for_item("src", stack)
end,
connect_sides = {left=1, right=1, back=1, top=1, bottom=1},
}
function technic.register_generator(data)
function technic.register_generator(data)
local tier = data.tier
local ltier = string.lower(tier)
@ -76,21 +83,44 @@ function technic.register_generator(data)
if burn_totaltime == 0 then burn_totaltime = 1 end
local percent = math.floor((burn_time / burn_totaltime) * 100)
meta:set_string("infotext", desc.." ("..percent.."%)")
meta:set_string("formspec",
"size[8, 9]"..
"label[0, 0;"..minetest.formspec_escape(desc).."]"..
"list[current_name;src;3, 1;1, 1;]"..
"image[4, 1;1, 1;default_furnace_fire_bg.png^[lowpart:"..
(percent)..":default_furnace_fire_fg.png]"..
"list[current_player;main;0, 5;8, 4;]"..
"listring[]")
local form_buttons = ""
if ltier ~= "lv" then
form_buttons = fs_helpers.cycling_button(
meta,
pipeworks.button_base,
"splitstacks",
{
pipeworks.button_off,
pipeworks.button_on
}
)..pipeworks.button_label
end
meta:set_string("formspec",
"size[8, 9]"..
"label[0, 0;"..minetest.formspec_escape(desc).."]"..
"list[current_name;src;3, 1;1, 1;]"..
"image[4, 1;1, 1;default_furnace_fire_bg.png^[lowpart:"..
(percent)..":default_furnace_fire_fg.png]"..
"list[current_player;main;0, 5;8, 4;]"..
"listring[]"..
form_buttons
)
end
local tentry = tube_entry
if ltier == "lv" then tentry = "" end
minetest.register_node("technic:"..ltier.."_generator", {
description = desc,
tiles = {"technic_"..ltier.."_generator_top.png", "technic_machine_bottom.png",
"technic_"..ltier.."_generator_side.png", "technic_"..ltier.."_generator_side.png",
"technic_"..ltier.."_generator_side.png", "technic_"..ltier.."_generator_front.png"},
tiles = {
"technic_"..ltier.."_generator_top.png"..tentry,
"technic_machine_bottom.png"..tentry,
"technic_"..ltier.."_generator_side.png"..tentry,
"technic_"..ltier.."_generator_side.png"..tentry,
"technic_"..ltier.."_generator_side.png"..tentry,
"technic_"..ltier.."_generator_front.png"
},
paramtype2 = "facedir",
groups = groups,
connect_sides = {"bottom", "back", "left", "right"},
@ -99,11 +129,24 @@ function technic.register_generator(data)
tube = data.tube and tube or nil,
on_construct = function(pos)
local meta = minetest.get_meta(pos)
local node = minetest.get_node(pos)
meta:set_string("infotext", desc)
meta:set_int(data.tier.."_EU_supply", 0)
meta:set_int("burn_time", 0)
meta:set_int("tube_time", 0)
meta:set_string("formspec", generator_formspec)
local form_buttons = ""
if not string.find(node.name, ":lv_") then
form_buttons = fs_helpers.cycling_button(
meta,
pipeworks.button_base,
"splitstacks",
{
pipeworks.button_off,
pipeworks.button_on
}
)..pipeworks.button_label
end
meta:set_string("formspec", generator_formspec..form_buttons)
local inv = meta:get_inventory()
inv:set_size("src", 1)
end,
@ -113,14 +156,39 @@ function technic.register_generator(data)
allow_metadata_inventory_move = technic.machine_inventory_move,
technic_run = run,
after_place_node = data.tube and pipeworks.after_place,
after_dig_node = technic.machine_after_dig_node
after_dig_node = technic.machine_after_dig_node,
on_receive_fields = function(pos, formname, fields, sender)
if not pipeworks.may_configure(pos, sender) then return end
fs_helpers.on_receive_fields(pos, fields)
local meta = minetest.get_meta(pos)
local node = minetest.get_node(pos)
local form = generator_formspec
local form_buttons = ""
if not string.find(node.name, ":lv_") then
form_buttons = fs_helpers.cycling_button(
meta,
pipeworks.button_base,
"splitstacks",
{
pipeworks.button_off,
pipeworks.button_on
}
)..pipeworks.button_label
end
meta:set_string("formspec", generator_formspec..form_buttons)
end,
})
minetest.register_node("technic:"..ltier.."_generator_active", {
description = desc,
tiles = {"technic_"..ltier.."_generator_top.png", "technic_machine_bottom.png",
"technic_"..ltier.."_generator_side.png", "technic_"..ltier.."_generator_side.png",
"technic_"..ltier.."_generator_side.png", "technic_"..ltier.."_generator_front_active.png"},
tiles = {
"technic_"..ltier.."_generator_top.png"..tube_entry,
"technic_machine_bottom.png"..tube_entry,
"technic_"..ltier.."_generator_side.png"..tube_entry,
"technic_"..ltier.."_generator_side.png"..tube_entry,
"technic_"..ltier.."_generator_side.png"..tube_entry,
"technic_"..ltier.."_generator_front_active.png"
},
paramtype2 = "facedir",
groups = active_groups,
connect_sides = {"bottom"},
@ -129,6 +197,7 @@ function technic.register_generator(data)
tube = data.tube and tube or nil,
drop = "technic:"..ltier.."_generator",
can_dig = technic.machine_can_dig,
after_dig_node = technic.machine_after_dig_node,
allow_metadata_inventory_put = technic.machine_inventory_put,
allow_metadata_inventory_take = technic.machine_inventory_take,
allow_metadata_inventory_move = technic.machine_inventory_move,
@ -139,7 +208,8 @@ function technic.register_generator(data)
end,
on_timer = function(pos, node)
local meta = minetest.get_meta(pos)
local node = minetest.get_node(pos)
-- Connected back?
if meta:get_int(tier.."_EU_timeout") > 0 then return false end
@ -157,6 +227,19 @@ function technic.register_generator(data)
burn_time = burn_time - 1
meta:set_int("burn_time", burn_time)
local percent = math.floor(burn_time / burn_totaltime * 100)
local form_buttons = ""
if not string.find(node.name, ":lv_") then
form_buttons = fs_helpers.cycling_button(
meta,
pipeworks.button_base,
"splitstacks",
{
pipeworks.button_off,
pipeworks.button_on
}
)..pipeworks.button_label
end
meta:set_string("formspec",
"size[8, 9]"..
"label[0, 0;"..minetest.formspec_escape(desc).."]"..
@ -164,9 +247,44 @@ function technic.register_generator(data)
"image[4, 1;1, 1;default_furnace_fire_bg.png^[lowpart:"..
(percent)..":default_furnace_fire_fg.png]"..
"list[current_player;main;0, 5;8, 4;]"..
"listring[]")
"listring[]"..
form_buttons
)
return true
end,
on_receive_fields = function(pos, formname, fields, sender)
if not pipeworks.may_configure(pos, sender) then return end
fs_helpers.on_receive_fields(pos, fields)
local meta = minetest.get_meta(pos)
local node = minetest.get_node(pos)
local form_buttons = ""
if not string.find(node.name, ":lv_") then
form_buttons = fs_helpers.cycling_button(
meta,
pipeworks.button_base,
"splitstacks",
{
pipeworks.button_off,
pipeworks.button_on
}
)..pipeworks.button_label
end
local burn_totaltime = meta:get_int("burn_totaltime") or 0
local burn_time = meta:get_int("burn_time")
local percent = math.floor(burn_time / burn_totaltime * 100)
meta:set_string("formspec",
"size[8, 9]"..
"label[0, 0;"..minetest.formspec_escape(desc).."]"..
"list[current_name;src;3, 1;1, 1;]"..
"image[4, 1;1, 1;default_furnace_fire_bg.png^[lowpart:"..
(percent)..":default_furnace_fire_fg.png]"..
"list[current_player;main;0, 5;8, 4;]"..
"listring[]"..
form_buttons
)
end,
})
technic.register_machine(tier, "technic:"..ltier.."_generator", technic.producer)

View File

@ -10,27 +10,27 @@ end
local recipes = {
-- Dusts
{"default:coal_lump", "technic:coal_dust 2"},
{"default:copper_lump", "technic:copper_dust 2"},
{"default:desert_stone", "default:desert_sand"},
{"default:gold_lump", "technic:gold_dust 2"},
{"default:iron_lump", "technic:wrought_iron_dust 2"},
{"technic:chromium_lump", "technic:chromium_dust 2"},
{"technic:uranium_lump", "technic:uranium_dust 2"},
{"technic:zinc_lump", "technic:zinc_dust 2"},
{"technic:lead_lump", "technic:lead_dust 2"},
{"technic:sulfur_lump", "technic:sulfur_dust 2"},
{"default:coal_lump", "technic:coal_dust 2"},
{"default:copper_lump", "technic:copper_dust 2"},
{"default:desert_stone", "default:desert_sand"},
{"default:gold_lump", "technic:gold_dust 2"},
{"default:iron_lump", "technic:wrought_iron_dust 2"},
{"technic:chromium_lump", "technic:chromium_dust 2"},
{"technic:uranium_lump", "technic:uranium_dust 2"},
{"technic:zinc_lump", "technic:zinc_dust 2"},
{"technic:lead_lump", "technic:lead_dust 2"},
{"technic:sulfur_lump", "technic:sulfur_dust 2"},
{"default:stone", "technic:stone_dust"},
{"default:sand", "technic:stone_dust"},
-- Other
{"default:cobble", "default:gravel"},
{"default:gravel", "default:dirt"},
{"default:stone", "default:sand"},
{"default:gravel", "default:sand"},
{"default:sandstone", "default:sand 2"}, -- reverse recipe can be found in the compressor
}
-- defuse the sandstone -> 4 sand recipe to avoid infinite sand bugs (also consult the inverse compressor recipe)
minetest.register_craft({
output = "default:sandstone 0",
minetest.clear_craft({
recipe = {
{'default:sandstone'}
},
@ -62,12 +62,6 @@ for _, data in pairs(recipes) do
technic.register_grinder_recipe({input = {data[1]}, output = data[2]})
end
-- defuse common grinder unfriendly recipes
if minetest.get_modpath("fake_fire") then -- from homedecor_modpack
minetest.register_craft({ output='default:cobble 0', recipe={{'default:cobble'}}})
minetest.register_craft({ output='default:gravel 0', recipe={{'default:gravel'}}})
end
-- dusts
local function register_dust(name, ingot)
local lname = string.lower(name)
@ -91,6 +85,7 @@ register_dust("Brass", "technic:brass_ingot")
register_dust("Bronze", "default:bronze_ingot")
register_dust("Carbon Steel", "technic:carbon_steel_ingot")
register_dust("Cast Iron", "technic:cast_iron_ingot")
register_dust("Chernobylite", "technic:chernobylite_block")
register_dust("Chromium", "technic:chromium_ingot")
register_dust("Coal", nil)
register_dust("Copper", "default:copper_ingot")
@ -99,6 +94,7 @@ register_dust("Gold", "default:gold_ingot")
register_dust("Mithril", "moreores:mithril_ingot")
register_dust("Silver", "moreores:silver_ingot")
register_dust("Stainless Steel", "technic:stainless_steel_ingot")
register_dust("Stone", "default:stone")
register_dust("Sulfur", nil)
register_dust("Tin", "moreores:tin_ingot")
register_dust("Wrought Iron", "technic:wrought_iron_ingot")

View File

@ -1,6 +1,9 @@
local S = technic.getter
local fs_helpers = pipeworks.fs_helpers
local tube_entry = "^pipeworks_tube_connection_metallic.png"
local tube = {
insert_object = function(pos, node, stack, direction)
local meta = minetest.get_meta(pos)
@ -10,6 +13,9 @@ local tube = {
can_insert = function(pos, node, stack, direction)
local meta = minetest.get_meta(pos)
local inv = meta:get_inventory()
if meta:get_int("splitstacks") == 1 then
stack = stack:peek_item(1)
end
return inv:room_for_item("src", stack)
end,
connect_sides = {left = 1, right = 1, back = 1, top = 1, bottom = 1},
@ -133,15 +139,21 @@ function technic.register_base_machine(data)
inv:set_list("dst", inv:get_list("dst_tmp"))
end
end
local tentry = tube_entry
if ltier == "lv" then
tentry = ""
end
minetest.register_node("technic:"..ltier.."_"..machine_name, {
description = machine_desc:format(tier),
tiles = {"technic_"..ltier.."_"..machine_name.."_top.png",
"technic_"..ltier.."_"..machine_name.."_bottom.png",
"technic_"..ltier.."_"..machine_name.."_side.png",
"technic_"..ltier.."_"..machine_name.."_side.png",
"technic_"..ltier.."_"..machine_name.."_side.png",
"technic_"..ltier.."_"..machine_name.."_front.png"},
tiles = {
"technic_"..ltier.."_"..machine_name.."_top.png"..tentry,
"technic_"..ltier.."_"..machine_name.."_bottom.png"..tentry,
"technic_"..ltier.."_"..machine_name.."_side.png"..tentry,
"technic_"..ltier.."_"..machine_name.."_side.png"..tentry,
"technic_"..ltier.."_"..machine_name.."_side.png"..tentry,
"technic_"..ltier.."_"..machine_name.."_front.png"
},
paramtype2 = "facedir",
groups = groups,
tube = data.tube and tube or nil,
@ -151,9 +163,23 @@ function technic.register_base_machine(data)
on_construct = function(pos)
local node = minetest.get_node(pos)
local meta = minetest.get_meta(pos)
local form_buttons = ""
if not string.find(node.name, ":lv_") then
form_buttons = fs_helpers.cycling_button(
meta,
pipeworks.button_base,
"splitstacks",
{
pipeworks.button_off,
pipeworks.button_on
}
)..pipeworks.button_label
end
meta:set_string("infotext", machine_desc:format(tier))
meta:set_int("tube_time", 0)
meta:set_string("formspec", formspec)
meta:set_string("formspec", formspec..form_buttons)
local inv = meta:get_inventory()
inv:set_size("src", input_size)
inv:set_size("dst", 4)
@ -166,17 +192,38 @@ function technic.register_base_machine(data)
allow_metadata_inventory_move = technic.machine_inventory_move,
technic_run = run,
after_place_node = data.tube and pipeworks.after_place,
after_dig_node = technic.machine_after_dig_node
after_dig_node = technic.machine_after_dig_node,
on_receive_fields = function(pos, formname, fields, sender)
local node = minetest.get_node(pos)
if not pipeworks.may_configure(pos, sender) then return end
fs_helpers.on_receive_fields(pos, fields)
local meta = minetest.get_meta(pos)
local form_buttons = ""
if not string.find(node.name, ":lv_") then
form_buttons = fs_helpers.cycling_button(
meta,
pipeworks.button_base,
"splitstacks",
{
pipeworks.button_off,
pipeworks.button_on
}
)..pipeworks.button_label
end
meta:set_string("formspec", formspec..form_buttons)
end,
})
minetest.register_node("technic:"..ltier.."_"..machine_name.."_active",{
description = machine_desc:format(tier),
tiles = {"technic_"..ltier.."_"..machine_name.."_top.png",
"technic_"..ltier.."_"..machine_name.."_bottom.png",
"technic_"..ltier.."_"..machine_name.."_side.png",
"technic_"..ltier.."_"..machine_name.."_side.png",
"technic_"..ltier.."_"..machine_name.."_side.png",
"technic_"..ltier.."_"..machine_name.."_front_active.png"},
tiles = {
"technic_"..ltier.."_"..machine_name.."_top.png"..tentry,
"technic_"..ltier.."_"..machine_name.."_bottom.png"..tentry,
"technic_"..ltier.."_"..machine_name.."_side.png"..tentry,
"technic_"..ltier.."_"..machine_name.."_side.png"..tentry,
"technic_"..ltier.."_"..machine_name.."_side.png"..tentry,
"technic_"..ltier.."_"..machine_name.."_front_active.png"
},
paramtype2 = "facedir",
drop = "technic:"..ltier.."_"..machine_name,
groups = active_groups,
@ -190,6 +237,25 @@ function technic.register_base_machine(data)
allow_metadata_inventory_move = technic.machine_inventory_move,
technic_run = run,
technic_disabled_machine_name = "technic:"..ltier.."_"..machine_name,
on_receive_fields = function(pos, formname, fields, sender)
local node = minetest.get_node(pos)
if not pipeworks.may_configure(pos, sender) then return end
fs_helpers.on_receive_fields(pos, fields)
local meta = minetest.get_meta(pos)
local form_buttons = ""
if not string.find(node.name, ":lv_") then
form_buttons = fs_helpers.cycling_button(
meta,
pipeworks.button_base,
"splitstacks",
{
pipeworks.button_off,
pipeworks.button_on
}
)..pipeworks.button_label
end
meta:set_string("formspec", formspec..form_buttons)
end,
})
technic.register_machine(tier, "technic:"..ltier.."_"..machine_name, technic.receiver)

View File

@ -51,7 +51,7 @@ local function register_recipe(typename, data)
end
technic.recipes[typename].recipes[index] = recipe
if have_ui and technic.recipes[typename].output_size == 1 then
if unified_inventory and technic.recipes[typename].output_size == 1 then
unified_inventory.register_craft({
type = typename,
output = data.output,

View File

@ -0,0 +1,206 @@
-- The supply converter is a generic device which can convert from
-- LV to MV and back, and HV to MV and back.
-- The machine is configured by the wiring below and above it.
--
-- It works like this:
-- The top side is setup as the receiver side, the bottom as the producer side.
-- Once the receiver side is powered it will deliver power to the other side.
-- Unused power is wasted just like any other producer!
local digilines_path = minetest.get_modpath("digilines")
local S = technic.getter
local cable_entry = "^technic_cable_connection_overlay.png"
local function set_supply_converter_formspec(meta)
local formspec = "size[5,2.25]"..
"field[0.3,0.5;2,1;power;"..S("Input Power")..";"..meta:get_int("power").."]"
if digilines_path then
formspec = formspec..
"field[2.3,0.5;3,1;channel;Digiline Channel;"..meta:get_string("channel").."]"
end
-- The names for these toggle buttons are explicit about which
-- state they'll switch to, so that multiple presses (arising
-- from the ambiguity between lag and a missed press) only make
-- the single change that the user expects.
if meta:get_int("mesecon_mode") == 0 then
formspec = formspec.."button[0,1;5,1;mesecon_mode_1;"..S("Ignoring Mesecon Signal").."]"
else
formspec = formspec.."button[0,1;5,1;mesecon_mode_0;"..S("Controlled by Mesecon Signal").."]"
end
if meta:get_int("enabled") == 0 then
formspec = formspec.."button[0,1.75;5,1;enable;"..S("%s Disabled"):format(S("Supply Converter")).."]"
else
formspec = formspec.."button[0,1.75;5,1;disable;"..S("%s Enabled"):format(S("Supply Converter")).."]"
end
meta:set_string("formspec", formspec)
end
local supply_converter_receive_fields = function(pos, formname, fields, sender)
local meta = minetest.get_meta(pos)
local power = nil
if fields.power then
power = tonumber(fields.power) or 0
power = math.max(power, 0)
power = math.min(power, 10000)
power = 100 * math.floor(power / 100)
if power == meta:get_int("power") then power = nil end
end
if power then meta:set_int("power", power) end
if fields.channel then meta:set_string("channel", fields.channel) end
if fields.enable then meta:set_int("enabled", 1) end
if fields.disable then meta:set_int("enabled", 0) end
if fields.mesecon_mode_0 then meta:set_int("mesecon_mode", 0) end
if fields.mesecon_mode_1 then meta:set_int("mesecon_mode", 1) end
set_supply_converter_formspec(meta)
end
local mesecons = {
effector = {
action_on = function(pos, node)
minetest.get_meta(pos):set_int("mesecon_effect", 1)
end,
action_off = function(pos, node)
minetest.get_meta(pos):set_int("mesecon_effect", 0)
end
}
}
local digiline_def = {
receptor = {action = function() end},
effector = {
action = function(pos, node, channel, msg)
local meta = minetest.get_meta(pos)
if channel ~= meta:get_string("channel") then
return
end
msg = msg:lower()
if msg == "get" then
digilines.receptor_send(pos, digilines.rules.default, channel, {
enabled = meta:get_int("enabled"),
power = meta:get_int("power"),
mesecon_mode = meta:get_int("mesecon_mode")
})
return
elseif msg == "off" then
meta:set_int("enabled", 0)
elseif msg == "on" then
meta:set_int("enabled", 1)
elseif msg == "toggle" then
local onn = meta:get_int("enabled")
onn = -(onn-1) -- Mirror onn with pivot 0.5, so switch between 1 and 0.
meta:set_int("enabled", onn)
elseif msg:sub(1, 5) == "power" then
local power = tonumber(msg:sub(7))
if not power then
return
end
power = math.max(power, 0)
power = math.min(power, 10000)
power = 100 * math.floor(power / 100)
meta:set_int("power", power)
elseif msg:sub(1, 12) == "mesecon_mode" then
meta:set_int("mesecon_mode", tonumber(msg:sub(14)))
end
set_supply_converter_formspec(meta)
end
},
}
local run = function(pos, node, run_stage)
-- run only in producer stage.
if run_stage == technic.receiver then
return
end
local remain = 0.9
-- Machine information
local machine_name = S("Supply Converter")
local meta = minetest.get_meta(pos)
local enabled = meta:get_string("enabled")
if enabled == "" then
-- Backwards compatibility
minetest.registered_nodes["technic:supply_converter"].on_construct(pos)
enabled = true
else
enabled = enabled == "1"
end
enabled = enabled and (meta:get_int("mesecon_mode") == 0 or meta:get_int("mesecon_effect") ~= 0)
local demand = enabled and meta:get_int("power") or 0
local pos_up = {x=pos.x, y=pos.y+1, z=pos.z}
local pos_down = {x=pos.x, y=pos.y-1, z=pos.z}
local name_up = minetest.get_node(pos_up).name
local name_down = minetest.get_node(pos_down).name
local from = technic.get_cable_tier(name_up)
local to = technic.get_cable_tier(name_down)
if from and to then
local input = meta:get_int(from.."_EU_input")
meta:set_int(from.."_EU_demand", demand)
meta:set_int(from.."_EU_supply", 0)
meta:set_int(to.."_EU_demand", 0)
meta:set_int(to.."_EU_supply", input * remain)
meta:set_string("infotext", S("@1 (@2 @3 -> @4 @5)", machine_name, technic.pretty_num(input), from, technic.pretty_num(input * remain), to))
else
meta:set_string("infotext", S("%s Has Bad Cabling"):format(machine_name))
if to then
meta:set_int(to.."_EU_supply", 0)
end
if from then
meta:set_int(from.."_EU_demand", 0)
end
return
end
end
minetest.register_node("technic:supply_converter", {
description = S("Supply Converter"),
tiles = {
"technic_supply_converter_tb.png"..cable_entry,
"technic_supply_converter_tb.png"..cable_entry,
"technic_supply_converter_side.png",
"technic_supply_converter_side.png",
"technic_supply_converter_side.png",
"technic_supply_converter_side.png"
},
groups = {snappy=2, choppy=2, oddly_breakable_by_hand=2,
technic_machine=1, technic_all_tiers=1},
connect_sides = {"top", "bottom"},
sounds = default.node_sound_wood_defaults(),
on_receive_fields = supply_converter_receive_fields,
on_construct = function(pos)
local meta = minetest.get_meta(pos)
meta:set_string("infotext", S("Supply Converter"))
if digilines_path then
meta:set_string("channel", "supply_converter"..minetest.pos_to_string(pos))
end
meta:set_int("power", 10000)
meta:set_int("enabled", 1)
meta:set_int("mesecon_mode", 0)
meta:set_int("mesecon_effect", 0)
set_supply_converter_formspec(meta)
end,
mesecons = mesecons,
digiline = digiline_def,
technic_run = run,
technic_on_disable = run,
})
minetest.register_craft({
output = 'technic:supply_converter 1',
recipe = {
{'technic:fine_gold_wire', 'technic:rubber', 'technic:doped_silicon_wafer'},
{'technic:mv_transformer', 'technic:machine_casing', 'technic:lv_transformer'},
{'technic:mv_cable', 'technic:rubber', 'technic:lv_cable'},
}
})
for tier, machines in pairs(technic.machines) do
technic.register_machine(tier, "technic:supply_converter", technic.producer_receiver)
end

View File

@ -1,40 +1,16 @@
-- SWITCHING STATION
-- The switching station is the center of all power distribution on an electric network.
--
-- The station collects power from sources (PR), distributes it to sinks (RE),
-- and uses the excess/shortfall to charge and discharge batteries (BA).
--
-- For now, all supply and demand values are expressed in kW.
--
-- It works like this:
-- All PR,BA,RE nodes are indexed and tagged with the switching station.
-- The tagging is to allow more stations to be built without allowing a cheat
-- with duplicating power.
-- All the RE nodes are queried for their current EU demand. Those which are off
-- would require no or a small standby EU demand, while those which are on would
-- require more.
-- If the total demand is less than the available power they are all updated with the
-- demand number.
-- If any surplus exists from the PR nodes the batteries will be charged evenly with this.
-- If the total demand requires draw on the batteries they will be discharged evenly.
--
-- If the total demand is more than the available power all RE nodes will be shut down.
-- We have a brown-out situation.
--
-- Hence all the power distribution logic resides in this single node.
--
-- Nodes connected to the network will have one or more of these parameters as meta data:
-- <LV|MV|HV>_EU_supply : Exists for PR and BA node types. This is the EU value supplied by the node. Output
-- <LV|MV|HV>_EU_demand : Exists for RE and BA node types. This is the EU value the node requires to run. Output
-- <LV|MV|HV>_EU_input : Exists for RE and BA node types. This is the actual EU value the network can give the node. Input
--
-- The reason the LV|MV|HV type is prepended toe meta data is because some machine could require several supplies to work.
-- This way the supplies are separated per network.
-- See also technic/doc/api.md
technic.networks = {}
technic.cables = {}
technic.redundant_warn = {}
local mesecons_path = minetest.get_modpath("mesecons")
local digilines_path = minetest.get_modpath("digilines")
local S = technic.getter
local cable_entry = "^technic_cable_connection_overlay.png"
minetest.register_craft({
output = "technic:switching_station",
recipe = {
@ -44,11 +20,22 @@ minetest.register_craft({
}
})
local mesecon_def
if mesecons_path then
mesecon_def = {effector = {
rules = mesecon.rules.default,
}}
end
minetest.register_node("technic:switching_station",{
description = S("Switching Station"),
tiles = {"technic_water_mill_top_active.png", "technic_water_mill_top_active.png",
"technic_water_mill_top_active.png", "technic_water_mill_top_active.png",
"technic_water_mill_top_active.png", "technic_water_mill_top_active.png"},
tiles = {
"technic_water_mill_top_active.png",
"technic_water_mill_top_active.png"..cable_entry,
"technic_water_mill_top_active.png",
"technic_water_mill_top_active.png",
"technic_water_mill_top_active.png",
"technic_water_mill_top_active.png"},
groups = {snappy=2, choppy=2, oddly_breakable_by_hand=2, technic_all_tiers=1},
connect_sides = {"bottom"},
sounds = default.node_sound_wood_defaults(),
@ -56,7 +43,49 @@ minetest.register_node("technic:switching_station",{
local meta = minetest.get_meta(pos)
meta:set_string("infotext", S("Switching Station"))
meta:set_string("active", 1)
meta:set_string("channel", "switching_station"..minetest.pos_to_string(pos))
meta:set_string("formspec", "field[channel;Channel;${channel}]")
local poshash = minetest.hash_node_position(pos)
technic.redundant_warn.poshash = nil
end,
after_dig_node = function(pos)
minetest.forceload_free_block(pos)
pos.y = pos.y - 1
minetest.forceload_free_block(pos)
local poshash = minetest.hash_node_position(pos)
technic.redundant_warn.poshash = nil
end,
on_receive_fields = function(pos, formname, fields, sender)
if not fields.channel then
return
end
local plname = sender:get_player_name()
if minetest.is_protected(pos, plname) then
minetest.record_protection_violation(pos, plname)
return
end
local meta = minetest.get_meta(pos)
meta:set_string("channel", fields.channel)
end,
mesecons = mesecon_def,
digiline = {
receptor = {action = function() end},
effector = {
action = function(pos, node, channel, msg)
if msg ~= "GET" and msg ~= "get" then
return
end
local meta = minetest.get_meta(pos)
if channel ~= meta:get_string("channel") then
return
end
digilines.receptor_send(pos, digilines.rules.default, channel, {
supply = meta:get_int("supply"),
demand = meta:get_int("demand")
})
end
},
},
})
--------------------------------------------------
@ -64,7 +93,8 @@ minetest.register_node("technic:switching_station",{
--------------------------------------------------
-- Add a wire node to the LV/MV/HV network
local add_new_cable_node = function(nodes, pos)
local add_new_cable_node = function(nodes, pos, network_id)
technic.cables[minetest.hash_node_position(pos)] = network_id
-- Ignore if the node has already been added
for i = 1, #nodes do
if pos.x == nodes[i].x and
@ -78,31 +108,31 @@ local add_new_cable_node = function(nodes, pos)
end
-- Generic function to add found connected nodes to the right classification array
local check_node_subp = function(PR_nodes, RE_nodes, BA_nodes, SP_nodes, all_nodes, pos, machines, tier, sw_pos, from_below)
local check_node_subp = function(PR_nodes, RE_nodes, BA_nodes, SP_nodes, all_nodes, pos, machines, tier, sw_pos, from_below, network_id)
technic.get_or_load_node(pos)
local meta = minetest.get_meta(pos)
local name = minetest.get_node(pos).name
if technic.is_tier_cable(name, tier) then
add_new_cable_node(all_nodes, pos)
add_new_cable_node(all_nodes, pos,network_id)
elseif machines[name] then
--dprint(name.." is a "..machines[name])
meta:set_string(tier.."_network",minetest.pos_to_string(sw_pos))
if machines[name] == technic.producer then
add_new_cable_node(PR_nodes, pos)
add_new_cable_node(PR_nodes, pos, network_id)
elseif machines[name] == technic.receiver then
add_new_cable_node(RE_nodes, pos)
add_new_cable_node(RE_nodes, pos, network_id)
elseif machines[name] == technic.producer_receiver then
add_new_cable_node(PR_nodes, pos)
add_new_cable_node(RE_nodes, pos)
add_new_cable_node(PR_nodes, pos, network_id)
add_new_cable_node(RE_nodes, pos, network_id)
elseif machines[name] == "SPECIAL" and
(pos.x ~= sw_pos.x or pos.y ~= sw_pos.y or pos.z ~= sw_pos.z) and
from_below then
-- Another switching station -> disable it
add_new_cable_node(SP_nodes, pos)
add_new_cable_node(SP_nodes, pos, network_id)
meta:set_int("active", 0)
meta:set_string("active_pos", minetest.serialize(sw_pos))
elseif machines[name] == technic.battery then
add_new_cable_node(BA_nodes, pos)
add_new_cable_node(BA_nodes, pos, network_id)
end
meta:set_int(tier.."_EU_timeout", 2) -- Touch node
@ -110,7 +140,7 @@ local check_node_subp = function(PR_nodes, RE_nodes, BA_nodes, SP_nodes, all_nod
end
-- Traverse a network given a list of machines and a cable type name
local traverse_network = function(PR_nodes, RE_nodes, BA_nodes, SP_nodes, all_nodes, i, machines, tier, sw_pos)
local traverse_network = function(PR_nodes, RE_nodes, BA_nodes, SP_nodes, all_nodes, i, machines, tier, sw_pos, network_id)
local pos = all_nodes[i]
local positions = {
{x=pos.x+1, y=pos.y, z=pos.z},
@ -121,7 +151,7 @@ local traverse_network = function(PR_nodes, RE_nodes, BA_nodes, SP_nodes, all_no
{x=pos.x, y=pos.y, z=pos.z-1}}
--print("ON")
for i, cur_pos in pairs(positions) do
check_node_subp(PR_nodes, RE_nodes, BA_nodes, SP_nodes, all_nodes, cur_pos, machines, tier, sw_pos, i == 3)
check_node_subp(PR_nodes, RE_nodes, BA_nodes, SP_nodes, all_nodes, cur_pos, machines, tier, sw_pos, i == 3, network_id)
end
end
@ -153,23 +183,40 @@ local get_network = function(sw_pos, pos1, tier)
local all_nodes = {pos1}
repeat
traverse_network(PR_nodes, RE_nodes, BA_nodes, SP_nodes, all_nodes,
i, technic.machines[tier], tier, sw_pos)
i, technic.machines[tier], tier, sw_pos, minetest.hash_node_position(pos1))
i = i + 1
until all_nodes[i] == nil
technic.networks[minetest.hash_node_position(pos1)] = {tier = tier, PR_nodes = PR_nodes,
RE_nodes = RE_nodes, BA_nodes = BA_nodes, SP_nodes = SP_nodes}
RE_nodes = RE_nodes, BA_nodes = BA_nodes, SP_nodes = SP_nodes, all_nodes = all_nodes}
return PR_nodes, BA_nodes, RE_nodes
end
-----------------------------------------------
-- The action code for the switching station --
-----------------------------------------------
technic.powerctrl_state = true
minetest.register_chatcommand("powerctrl", {
params = "state",
description = "Enables or disables technic's switching station ABM",
privs = { basic_privs = true },
func = function(name, state)
if state == "on" then
technic.powerctrl_state = true
else
technic.powerctrl_state = false
end
end
})
minetest.register_abm({
nodenames = {"technic:switching_station"},
label = "Switching Station", -- allows the mtt profiler to profile this abm individually
interval = 1,
chance = 1,
action = function(pos, node, active_object_count, active_object_count_wider)
if not technic.powerctrl_state then return end
local meta = minetest.get_meta(pos)
local meta1 = nil
local pos1 = {}
@ -184,31 +231,41 @@ minetest.register_abm({
local RE_nodes
local machine_name = S("Switching Station")
-- Which kind of network are we on:
pos1 = {x=pos.x, y=pos.y-1, z=pos.z}
--Disable if necessary
if meta:get_int("active") ~= 1 then
meta:set_int("active", 1)
local active_pos = minetest.deserialize(meta:get_string("active_pos"))
if active_pos then
local meta1 = minetest.get_meta(active_pos)
meta:set_string("infotext", S("%s (Slave)"):format(meta1:get_string("infotext")))
minetest.forceload_free_block(pos)
minetest.forceload_free_block(pos1)
meta:set_string("infotext",S("%s Already Present"):format(machine_name))
local poshash = minetest.hash_node_position(pos)
if not technic.redundant_warn.poshash then
technic.redundant_warn.poshash = true
print("[TECHNIC] Warning: redundant switching station found near "..minetest.pos_to_string(pos))
end
return
end
-- Which kind of network are we on:
pos1 = {x=pos.x, y=pos.y-1, z=pos.z}
local name = minetest.get_node(pos1).name
local tier = technic.get_cable_tier(name)
if tier then
-- Forceload switching station
minetest.forceload_block(pos)
minetest.forceload_block(pos1)
PR_nodes, BA_nodes, RE_nodes = get_network(pos, pos1, tier)
else
--dprint("Not connected to a network")
meta:set_string("infotext", S("%s Has No Network"):format(machine_name))
minetest.forceload_free_block(pos)
minetest.forceload_free_block(pos1)
return
end
-- Run all the nodes
local function run_nodes(list)
local function run_nodes(list, run_stage)
for _, pos2 in ipairs(list) do
technic.get_or_load_node(pos2)
local node2 = minetest.get_node(pos2)
@ -217,14 +274,14 @@ minetest.register_abm({
nodedef = minetest.registered_nodes[node2.name]
end
if nodedef and nodedef.technic_run then
nodedef.technic_run(pos2, node2)
nodedef.technic_run(pos2, node2, run_stage)
end
end
end
run_nodes(PR_nodes)
run_nodes(RE_nodes)
run_nodes(BA_nodes)
run_nodes(PR_nodes, technic.producer)
run_nodes(RE_nodes, technic.receiver)
run_nodes(BA_nodes, technic.battery)
-- Strings for the meta data
local eu_demand_str = tier.."_EU_demand"
@ -291,6 +348,23 @@ minetest.register_abm({
S("@1. Supply: @2 Demand: @3",
machine_name, technic.pretty_num(PR_eu_supply), technic.pretty_num(RE_eu_demand)))
-- If mesecon signal and power supply or demand changed then
-- send them via digilines.
if mesecons_path and digilines_path and mesecon.is_powered(pos) then
if PR_eu_supply ~= meta:get_int("supply") or
RE_eu_demand ~= meta:get_int("demand") then
local channel = meta:get_string("channel")
digilines.receptor_send(pos, digilines.rules.default, channel, {
supply = PR_eu_supply,
demand = RE_eu_demand
})
end
end
-- Data that will be used by the power monitor
meta:set_int("supply",PR_eu_supply)
meta:set_int("demand",RE_eu_demand)
-- If the PR supply is enough for the RE demand supply them all
if PR_eu_supply >= RE_eu_demand then
--dprint("PR_eu_supply"..PR_eu_supply.." >= RE_eu_demand"..RE_eu_demand)
@ -352,6 +426,7 @@ minetest.register_abm({
meta1 = minetest.get_meta(pos1)
meta1:set_int(eu_input_str, 0)
end
end,
})
@ -370,10 +445,12 @@ local function switching_station_timeout_count(pos, tier)
end
end
minetest.register_abm({
label = "Machines: timeout check",
nodenames = {"group:technic_machine"},
interval = 1,
chance = 1,
action = function(pos, node, active_object_count, active_object_count_wider)
local meta = minetest.get_meta(pos)
for tier, machines in pairs(technic.machines) do
if machines[node.name] and switching_station_timeout_count(pos, tier) then
local nodedef = minetest.registered_nodes[node.name]
@ -392,6 +469,24 @@ minetest.register_abm({
end,
})
--Re-enable disabled switching station if necessary, similar to the timeout above
minetest.register_abm({
label = "Machines: re-enable check",
nodenames = {"technic:switching_station"},
interval = 1,
chance = 1,
action = function(pos, node, active_object_count, active_object_count_wider)
local meta = minetest.get_meta(pos)
local pos1 = {x=pos.x,y=pos.y-1,z=pos.z}
local tier = technic.get_cable_tier(minetest.get_node(pos1).name)
if not tier then return end
if switching_station_timeout_count(pos, tier) then
local meta = minetest.get_meta(pos)
meta:set_int("active",1)
end
end,
})
for tier, machines in pairs(technic.machines) do
-- SPECIAL will not be traversed
technic.register_machine(tier, "technic:switching_station", "SPECIAL")

View File

@ -0,0 +1,238 @@
# Blender v2.73 (sub 0) OBJ File: 'slope_test_cylinder_onetexture.blend'
# www.blender.org
o Cylinder_Cylinder.001
v 0.000000 -0.500000 -0.500000
v 0.000000 0.500000 -0.500000
v 0.097545 -0.500000 -0.490393
v 0.097545 0.500000 -0.490393
v 0.191342 -0.500000 -0.461940
v 0.191342 0.500000 -0.461940
v 0.277785 -0.500000 -0.415735
v 0.277785 0.500000 -0.415735
v 0.353553 -0.500000 -0.353554
v 0.353553 0.500000 -0.353554
v 0.415735 -0.500000 -0.277785
v 0.415735 0.500000 -0.277785
v 0.461940 -0.500000 -0.191342
v 0.461940 0.500000 -0.191342
v 0.490393 -0.500000 -0.097545
v 0.490393 0.500000 -0.097545
v 0.500000 -0.500000 -0.000000
v 0.500000 0.500000 -0.000000
v 0.490393 -0.500000 0.097545
v 0.490393 0.500000 0.097545
v 0.461940 -0.500000 0.191341
v 0.461940 0.500000 0.191341
v 0.415735 -0.500000 0.277785
v 0.415735 0.500000 0.277785
v 0.353553 -0.500000 0.353553
v 0.353553 0.500000 0.353553
v 0.277785 -0.500000 0.415735
v 0.277785 0.500000 0.415735
v 0.191342 -0.500000 0.461940
v 0.191342 0.500000 0.461940
v 0.097545 -0.500000 0.490392
v 0.097545 0.500000 0.490392
v -0.000000 -0.500000 0.500000
v -0.000000 0.500000 0.500000
v -0.097545 -0.500000 0.490392
v -0.097545 0.500000 0.490392
v -0.191342 -0.500000 0.461939
v -0.191342 0.500000 0.461939
v -0.277785 -0.500000 0.415734
v -0.277785 0.500000 0.415734
v -0.353554 -0.500000 0.353553
v -0.353554 0.500000 0.353553
v -0.415735 -0.500000 0.277785
v -0.415735 0.500000 0.277785
v -0.461940 -0.500000 0.191341
v -0.461940 0.500000 0.191341
v -0.490393 -0.500000 0.097545
v -0.490393 0.500000 0.097545
v -0.500000 -0.500000 -0.000001
v -0.500000 0.500000 -0.000001
v -0.490393 -0.500000 -0.097546
v -0.490393 0.500000 -0.097546
v -0.461940 -0.500000 -0.191342
v -0.461940 0.500000 -0.191342
v -0.415734 -0.500000 -0.277786
v -0.415734 0.500000 -0.277786
v -0.353553 -0.500000 -0.353554
v -0.353553 0.500000 -0.353554
v -0.277785 -0.500000 -0.415735
v -0.277785 0.500000 -0.415735
v -0.191341 -0.500000 -0.461940
v -0.191341 0.500000 -0.461940
v -0.097544 -0.500000 -0.490393
v -0.097544 0.500000 -0.490393
vt 0.499996 0.999997
vt 0.499995 0.000005
vt 0.562495 0.000004
vt 0.562496 0.999997
vt 0.624995 0.000003
vt 0.624997 0.999997
vt 0.687496 0.000002
vt 0.687497 0.999998
vt 0.749997 0.000001
vt 0.749997 0.999998
vt 0.812497 0.000001
vt 0.812497 0.999998
vt 0.874997 -0.000000
vt 0.874997 0.999998
vt 0.937498 -0.000000
vt 0.937498 0.999998
vt 0.999998 -0.000000
vt 0.999998 0.999998
vt 0.000005 0.999997
vt 0.000001 0.000024
vt 0.062500 0.000023
vt 0.062505 0.999996
vt 0.124999 0.000021
vt 0.125004 0.999996
vt 0.187498 0.000020
vt 0.187503 0.999995
vt 0.249997 0.000018
vt 0.250003 0.999994
vt 0.312497 0.000017
vt 0.312502 0.999994
vt 0.374997 0.000015
vt 0.375002 0.999993
vt 0.437496 0.000014
vt 0.437501 0.999993
vt 0.402487 0.009601
vt 0.597576 0.009614
vt 0.691371 0.038072
vt 0.777811 0.084282
vt 0.853576 0.146469
vt 0.915753 0.222242
vt 0.961953 0.308689
vt 0.990399 0.402487
vt 1.000000 0.500033
vt 0.990386 0.597577
vt 0.961928 0.691370
vt 0.915717 0.777811
vt 0.853531 0.853575
vt 0.777758 0.915753
vt 0.691312 0.961952
vt 0.597514 0.990398
vt 0.402424 0.990386
vt 0.308630 0.961928
vt 0.222188 0.915717
vt 0.146424 0.853531
vt 0.084248 0.777759
vt 0.038049 0.691313
vt 0.009602 0.597515
vt 0.000000 0.499970
vt 0.009614 0.402425
vt 0.038073 0.308630
vt 0.084283 0.222189
vt 0.146470 0.146424
vt 0.222243 0.084248
vt 0.308689 0.038048
vt 0.499927 0.999999
vt 0.084226 0.777725
vt 0.000000 0.499927
vt 0.222277 0.084224
vt 0.500074 0.000000
vt 0.915777 0.222279
vt 1.000000 0.500077
vt 0.777724 0.915775
vn 0.000000 -0.685700 -0.727900
vn 0.000000 0.685700 -0.727900
vn 0.142000 0.685700 -0.713900
vn 0.142000 -0.685700 -0.713900
vn 0.278500 0.685700 -0.672500
vn 0.278500 -0.685700 -0.672500
vn 0.404400 0.685700 -0.605200
vn 0.404400 -0.685700 -0.605200
vn 0.514700 0.685700 -0.514700
vn 0.514700 -0.685700 -0.514700
vn 0.605200 0.685700 -0.404400
vn 0.605200 -0.685700 -0.404400
vn 0.672500 0.685700 -0.278500
vn 0.672500 -0.685700 -0.278500
vn 0.713900 0.685700 -0.142000
vn 0.713900 -0.685700 -0.142000
vn 0.727900 0.685700 0.000000
vn 0.727900 -0.685700 0.000000
vn 0.713900 0.685700 0.142000
vn 0.713900 -0.685700 0.142000
vn 0.672500 0.685700 0.278500
vn 0.672500 -0.685700 0.278500
vn 0.605200 0.685700 0.404400
vn 0.605200 -0.685700 0.404400
vn 0.514700 0.685700 0.514700
vn 0.514700 -0.685700 0.514700
vn 0.404400 0.685700 0.605200
vn 0.404400 -0.685700 0.605200
vn 0.278500 0.685700 0.672500
vn 0.278500 -0.685700 0.672500
vn 0.142000 0.685700 0.713900
vn 0.142000 -0.685700 0.713900
vn 0.000000 0.685700 0.727900
vn 0.000000 -0.685700 0.727900
vn -0.142000 0.685700 0.713900
vn -0.142000 -0.685700 0.713900
vn -0.278500 0.685700 0.672500
vn -0.278500 -0.685700 0.672500
vn -0.404400 0.685700 0.605200
vn -0.404400 -0.685700 0.605200
vn -0.514700 0.685700 0.514700
vn -0.514700 -0.685700 0.514700
vn -0.605200 0.685700 0.404400
vn -0.605200 -0.685700 0.404400
vn -0.672500 0.685700 0.278500
vn -0.672500 -0.685700 0.278500
vn -0.713900 0.685700 0.142000
vn -0.713900 -0.685700 0.142000
vn -0.727900 0.685700 0.000000
vn -0.727900 -0.685700 0.000000
vn -0.713900 0.685700 -0.142000
vn -0.713900 -0.685700 -0.142000
vn -0.672500 0.685700 -0.278500
vn -0.672500 -0.685700 -0.278500
vn -0.605200 0.685700 -0.404400
vn -0.605200 -0.685700 -0.404400
vn -0.514700 0.685700 -0.514700
vn -0.514700 -0.685700 -0.514700
vn -0.404400 0.685700 -0.605200
vn -0.404400 -0.685700 -0.605200
vn -0.278500 0.685700 -0.672500
vn -0.278500 -0.685700 -0.672500
vn -0.142000 0.685700 -0.713900
vn -0.142000 -0.685700 -0.713900
s 1
f 1/1/1 2/2/2 4/3/3 3/4/4
f 3/4/4 4/3/3 6/5/5 5/6/6
f 5/6/6 6/5/5 8/7/7 7/8/8
f 7/8/8 8/7/7 10/9/9 9/10/10
f 9/10/10 10/9/9 12/11/11 11/12/12
f 11/12/12 12/11/11 14/13/13 13/14/14
f 13/14/14 14/13/13 16/15/15 15/16/16
f 15/16/16 16/15/15 18/17/17 17/18/18
f 17/19/18 18/20/17 20/21/19 19/22/20
f 19/22/20 20/21/19 22/23/21 21/24/22
f 21/24/22 22/23/21 24/25/23 23/26/24
f 23/26/24 24/25/23 26/27/25 25/28/26
f 25/28/26 26/27/25 28/29/27 27/30/28
f 27/30/28 28/29/27 30/31/29 29/32/30
f 29/32/30 30/31/29 32/33/31 31/34/32
f 31/34/32 32/33/31 34/2/33 33/1/34
f 33/1/34 34/2/33 36/3/35 35/4/36
f 35/4/36 36/3/35 38/5/37 37/6/38
f 37/6/38 38/5/37 40/7/39 39/8/40
f 39/8/40 40/7/39 42/9/41 41/10/42
f 41/10/42 42/9/41 44/11/43 43/12/44
f 43/12/44 44/11/43 46/13/45 45/14/46
f 45/14/46 46/13/45 48/15/47 47/16/48
f 47/16/48 48/15/47 50/17/49 49/18/50
f 49/19/50 50/20/49 52/21/51 51/22/52
f 51/22/52 52/21/51 54/23/53 53/24/54
f 53/24/54 54/23/53 56/25/55 55/26/56
f 55/26/56 56/25/55 58/27/57 57/28/58
f 57/28/58 58/27/57 60/29/59 59/30/60
f 59/30/60 60/29/59 62/31/61 61/32/62
f 4/35/3 2/2/2 64/36/63 62/37/61 60/38/59 58/39/57 56/40/55 54/41/53 52/42/51 50/43/49 48/44/47 46/45/45 44/46/43 42/47/41 40/48/39 38/49/37 36/50/35 34/1/33 32/51/31 30/52/29 28/53/27 26/54/25 24/55/23 22/56/21 20/57/19 18/58/17 16/59/15 14/60/13 12/61/11 10/62/9 8/63/7 6/64/5
f 63/34/64 64/33/63 2/2/2 1/1/1
f 61/32/62 62/31/61 64/33/63 63/34/64
f 1/65/1 3/51/4 5/52/6 7/53/8 9/54/10 11/66/12 13/56/14 15/57/16 17/67/18 19/59/20 21/60/22 23/61/24 25/62/26 27/68/28 29/64/30 31/35/32 33/69/34 35/36/36 37/37/38 39/38/40 41/39/42 43/70/44 45/41/46 47/42/48 49/71/50 51/44/52 53/45/54 55/46/56 57/47/58 59/72/60 61/49/62 63/50/64

View File

@ -0,0 +1,238 @@
# Blender v2.73 (sub 0) OBJ File: 'technic-cylinder-horizontal.blend'
# www.blender.org
o Cylinder_Cylinder.001
v 0.500000 0.000000 -0.500000
v -0.500000 0.000000 -0.500000
v 0.500000 0.097545 -0.490393
v -0.500000 0.097545 -0.490393
v 0.500000 0.191342 -0.461940
v -0.500000 0.191342 -0.461940
v 0.500000 0.277785 -0.415735
v -0.500000 0.277785 -0.415735
v 0.500000 0.353553 -0.353553
v -0.500000 0.353553 -0.353554
v 0.500000 0.415735 -0.277785
v -0.500000 0.415735 -0.277785
v 0.500000 0.461940 -0.191342
v -0.500000 0.461940 -0.191342
v 0.500000 0.490393 -0.097545
v -0.500000 0.490393 -0.097545
v 0.500000 0.500000 -0.000000
v -0.500000 0.500000 -0.000000
v 0.500000 0.490393 0.097545
v -0.500000 0.490393 0.097545
v 0.500000 0.461940 0.191342
v -0.500000 0.461940 0.191341
v 0.500000 0.415735 0.277785
v -0.500000 0.415735 0.277785
v 0.500000 0.353553 0.353553
v -0.500000 0.353553 0.353553
v 0.500000 0.277785 0.415735
v -0.500000 0.277785 0.415735
v 0.500000 0.191342 0.461940
v -0.500000 0.191342 0.461940
v 0.500000 0.097545 0.490393
v -0.500000 0.097545 0.490392
v 0.500000 -0.000000 0.500000
v -0.500000 -0.000000 0.500000
v 0.500000 -0.097546 0.490392
v -0.500000 -0.097545 0.490392
v 0.500000 -0.191342 0.461940
v -0.500000 -0.191342 0.461939
v 0.500000 -0.277785 0.415734
v -0.500000 -0.277785 0.415734
v 0.500000 -0.353554 0.353553
v -0.500000 -0.353554 0.353553
v 0.500000 -0.415735 0.277785
v -0.500000 -0.415735 0.277785
v 0.500000 -0.461940 0.191341
v -0.500000 -0.461940 0.191341
v 0.500000 -0.490393 0.097545
v -0.500000 -0.490393 0.097544
v 0.500000 -0.500000 -0.000001
v -0.500000 -0.500000 -0.000001
v 0.500000 -0.490393 -0.097546
v -0.500000 -0.490393 -0.097546
v 0.500000 -0.461940 -0.191342
v -0.500000 -0.461940 -0.191343
v 0.500000 -0.415734 -0.277786
v -0.500000 -0.415734 -0.277786
v 0.500000 -0.353553 -0.353554
v -0.500000 -0.353553 -0.353554
v 0.500000 -0.277785 -0.415735
v -0.500000 -0.277784 -0.415735
v 0.500000 -0.191341 -0.461940
v -0.500000 -0.191341 -0.461940
v 0.500000 -0.097544 -0.490393
v -0.500000 -0.097544 -0.490393
vt 0.000003 0.499996
vt 0.999995 0.499995
vt 0.999996 0.562495
vt 0.000002 0.562496
vt 0.999997 0.624995
vt 0.000003 0.624996
vt 0.999998 0.687496
vt 0.000002 0.687496
vt 0.999999 0.749997
vt 0.000002 0.749996
vt 0.999999 0.812497
vt 0.000002 0.812497
vt 1.000000 0.874997
vt 0.000001 0.874997
vt 1.000000 0.937498
vt 0.000001 0.937497
vt 1.000000 0.999998
vt 0.000001 0.999998
vt 0.000003 0.000005
vt 0.999976 0.000001
vt 0.999977 0.062500
vt 0.000003 0.062505
vt 0.999978 0.124999
vt 0.000004 0.125004
vt 0.999980 0.187498
vt 0.000005 0.187503
vt 0.999982 0.249997
vt 0.000005 0.250003
vt 0.999983 0.312497
vt 0.000006 0.312502
vt 0.999985 0.374997
vt 0.000007 0.375001
vt 0.999986 0.437496
vt 0.000007 0.437501
vt 0.009601 0.597512
vt 0.009614 0.402424
vt 0.038072 0.308628
vt 0.084283 0.222189
vt 0.146469 0.146424
vt 0.222242 0.084247
vt 0.308689 0.038047
vt 0.402487 0.009601
vt 0.500033 -0.000000
vt 0.597577 0.009613
vt 0.691371 0.038072
vt 0.777811 0.084283
vt 0.853575 0.146469
vt 0.915753 0.222242
vt 0.961952 0.308688
vt 0.990398 0.402486
vt 0.990386 0.597576
vt 0.961928 0.691370
vt 0.915717 0.777812
vt 0.853531 0.853576
vt 0.777759 0.915752
vt 0.691313 0.961951
vt 0.597515 0.990398
vt 0.499970 1.000000
vt 0.402425 0.990386
vt 0.308630 0.961927
vt 0.222189 0.915717
vt 0.146424 0.853530
vt 0.084248 0.777757
vt 0.038048 0.691311
vt 0.999999 0.500073
vt 0.777724 0.915774
vt 0.499927 0.999999
vt 0.084224 0.777723
vt 0.000000 0.499925
vt 0.222279 0.084223
vt 0.500078 -0.000000
vt 0.915775 0.222276
vn 0.685700 0.000000 -0.727900
vn -0.685700 0.000000 -0.727900
vn -0.685700 0.142000 -0.713900
vn 0.685700 0.142000 -0.713900
vn -0.685700 0.278500 -0.672500
vn 0.685700 0.278500 -0.672500
vn -0.685700 0.404400 -0.605200
vn 0.685700 0.404400 -0.605200
vn -0.685700 0.514700 -0.514700
vn 0.685700 0.514700 -0.514700
vn -0.685700 0.605200 -0.404400
vn 0.685700 0.605200 -0.404400
vn -0.685700 0.672500 -0.278500
vn 0.685700 0.672500 -0.278500
vn -0.685700 0.713900 -0.142000
vn 0.685700 0.713900 -0.142000
vn -0.685700 0.727900 0.000000
vn 0.685700 0.727900 0.000000
vn -0.685700 0.713900 0.142000
vn 0.685700 0.713900 0.142000
vn -0.685700 0.672500 0.278500
vn 0.685700 0.672500 0.278500
vn -0.685700 0.605200 0.404400
vn 0.685700 0.605200 0.404400
vn -0.685700 0.514700 0.514700
vn 0.685700 0.514700 0.514700
vn -0.685700 0.404400 0.605200
vn 0.685700 0.404400 0.605200
vn -0.685700 0.278500 0.672500
vn 0.685700 0.278500 0.672500
vn -0.685700 0.142000 0.713900
vn 0.685700 0.142000 0.713900
vn -0.685700 0.000000 0.727900
vn 0.685700 0.000000 0.727900
vn -0.685700 -0.142000 0.713900
vn 0.685700 -0.142000 0.713900
vn -0.685700 -0.278500 0.672500
vn 0.685700 -0.278500 0.672500
vn -0.685700 -0.404400 0.605200
vn 0.685700 -0.404400 0.605200
vn -0.685700 -0.514700 0.514700
vn 0.685700 -0.514700 0.514700
vn -0.685700 -0.605200 0.404400
vn 0.685700 -0.605200 0.404400
vn -0.685700 -0.672500 0.278500
vn 0.685700 -0.672500 0.278500
vn -0.685700 -0.713900 0.142000
vn 0.685700 -0.713900 0.142000
vn -0.685700 -0.727900 0.000000
vn 0.685700 -0.727900 0.000000
vn -0.685700 -0.713900 -0.142000
vn 0.685700 -0.713900 -0.142000
vn -0.685700 -0.672500 -0.278500
vn 0.685700 -0.672500 -0.278500
vn -0.685700 -0.605200 -0.404400
vn 0.685700 -0.605200 -0.404400
vn -0.685700 -0.514700 -0.514700
vn 0.685700 -0.514700 -0.514700
vn -0.685700 -0.404400 -0.605200
vn 0.685700 -0.404400 -0.605200
vn -0.685700 -0.278500 -0.672500
vn 0.685700 -0.278500 -0.672500
vn -0.685700 -0.142000 -0.713900
vn 0.685700 -0.142000 -0.713900
s 1
f 1/1/1 2/2/2 4/3/3 3/4/4
f 3/4/4 4/3/3 6/5/5 5/6/6
f 5/6/6 6/5/5 8/7/7 7/8/8
f 7/8/8 8/7/7 10/9/9 9/10/10
f 9/10/10 10/9/9 12/11/11 11/12/12
f 11/12/12 12/11/11 14/13/13 13/14/14
f 13/14/14 14/13/13 16/15/15 15/16/16
f 15/16/16 16/15/15 18/17/17 17/18/18
f 17/19/18 18/20/17 20/21/19 19/22/20
f 19/22/20 20/21/19 22/23/21 21/24/22
f 21/24/22 22/23/21 24/25/23 23/26/24
f 23/26/24 24/25/23 26/27/25 25/28/26
f 25/28/26 26/27/25 28/29/27 27/30/28
f 27/30/28 28/29/27 30/31/29 29/32/30
f 29/32/30 30/31/29 32/33/31 31/34/32
f 31/34/32 32/33/31 34/2/33 33/1/34
f 33/1/34 34/2/33 36/3/35 35/4/36
f 35/4/36 36/3/35 38/5/37 37/6/38
f 37/6/38 38/5/37 40/7/39 39/8/40
f 39/8/40 40/7/39 42/9/41 41/10/42
f 41/10/42 42/9/41 44/11/43 43/12/44
f 43/12/44 44/11/43 46/13/45 45/14/46
f 45/14/46 46/13/45 48/15/47 47/16/48
f 47/16/48 48/15/47 50/17/49 49/18/50
f 49/19/50 50/20/49 52/21/51 51/22/52
f 51/22/52 52/21/51 54/23/53 53/24/54
f 53/24/54 54/23/53 56/25/55 55/26/56
f 55/26/56 56/25/55 58/27/57 57/28/58
f 57/28/58 58/27/57 60/29/59 59/30/60
f 59/30/60 60/29/59 62/31/61 61/32/62
f 4/35/3 2/1/2 64/36/63 62/37/61 60/38/59 58/39/57 56/40/55 54/41/53 52/42/51 50/43/49 48/44/47 46/45/45 44/46/43 42/47/41 40/48/39 38/49/37 36/50/35 34/2/33 32/51/31 30/52/29 28/53/27 26/54/25 24/55/23 22/56/21 20/57/19 18/58/17 16/59/15 14/60/13 12/61/11 10/62/9 8/63/7 6/64/5
f 63/34/64 64/33/63 2/2/2 1/1/1
f 61/32/62 62/31/61 64/33/63 63/34/64
f 1/65/1 3/51/4 5/52/6 7/53/8 9/54/10 11/66/12 13/56/14 15/57/16 17/67/18 19/59/20 21/60/22 23/61/24 25/62/26 27/68/28 29/64/30 31/35/32 33/69/34 35/36/36 37/37/38 39/38/40 41/39/42 43/70/44 45/41/46 47/42/48 49/71/50 51/44/52 53/45/54 55/46/56 57/47/58 59/72/60 61/49/62 63/50/64

View File

@ -0,0 +1,33 @@
# Blender v2.73 (sub 0) OBJ File: 'technic-icorner.blend'
# www.blender.org
o Cube_Cube.000
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
v 0.500000 -0.500000 -0.500000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vn -0.000000 -0.000000 1.000000
vn -0.000000 -0.000000 -1.000000
vn 0.707100 0.707100 -0.000000
vn 1.000000 0.000000 -0.000000
vn 0.000000 -1.000000 -0.000000
vn -1.000000 -0.000000 -0.000000
vn 0.000000 0.707100 -0.707100
s off
f 6/1/1 1/2/1 7/3/1 8/4/1
f 2/1/2 5/3/2 3/4/2
f 2/1/3 1/2/3 5/4/3
f 6/2/4 8/3/4 9/4/4
f 9/1/5 8/2/5 7/3/5 3/4/5
f 3/3/6 7/4/6 1/1/6 2/2/6
f 1/1/7 6/2/7 9/3/7
l 1 4
l 3 4

View File

@ -0,0 +1,33 @@
# Blender v2.73 (sub 0) OBJ File: 'technic-icorner-upsdown.blend'
# www.blender.org
o Cube_Cube.000
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
v 0.500000 0.500000 -0.500000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vn -1.000000 0.000000 0.000000
vn 1.000000 -0.000000 0.000000
vn -0.000000 -0.707100 -0.707100
vn -0.000000 0.000000 -1.000000
vn 0.000000 1.000000 0.000000
vn 0.000000 -0.000000 1.000000
vn 0.707100 -0.707100 -0.000000
s off
f 6/1/1 1/2/1 7/3/1 8/4/1
f 2/1/2 5/3/2 3/4/2
f 2/1/3 1/2/3 5/4/3
f 6/2/4 8/3/4 9/4/4
f 9/1/5 8/2/5 7/3/5 3/4/5
f 3/3/6 7/4/6 1/1/6 2/2/6
f 1/1/7 6/2/7 9/3/7
l 1 4
l 3 4

View File

@ -0,0 +1,300 @@
# Blender v2.73 (sub 0) OBJ File: 'slope_test_blob_onetexture.blend'
# www.blender.org
o Cube
v 0.213679 -0.450000 -0.213679
v -0.213679 -0.450000 0.213680
v 0.213680 -0.450000 0.213680
v -0.213679 -0.450000 -0.213679
v 0.213679 0.450000 -0.213679
v -0.213679 0.450000 -0.213679
v 0.213679 0.450000 0.213680
v 0.500000 -0.000003 0.500000
v 0.277785 -0.415735 0.277785
v -0.277785 -0.415735 0.277785
v 0.353553 -0.353554 0.353553
v -0.353553 -0.353554 0.353553
v -0.500000 -0.000002 0.500000
v 0.415735 -0.277786 0.415735
v -0.277785 0.415735 0.277785
v 0.277785 0.415735 0.277785
v -0.415735 -0.277785 0.415735
v 0.353554 0.353553 0.353554
v -0.500000 -0.000002 -0.499983
v 0.461940 -0.191342 0.461940
v -0.461940 -0.191342 0.461940
v -0.353553 0.353553 0.353554
v 0.490393 -0.097546 0.490393
v 0.500000 -0.000002 -0.500000
v 0.490393 0.097545 -0.490392
v 0.490393 0.097545 0.490393
v -0.490393 -0.097546 0.490393
v 0.490393 -0.097545 -0.490393
v 0.461940 0.191341 0.461940
v -0.461940 0.191341 0.461940
v 0.461940 0.191342 -0.461940
v -0.490393 0.097545 0.490393
v 0.415735 0.277785 0.415735
v -0.490393 0.097545 -0.490392
v -0.415735 0.277785 0.415735
v 0.461940 -0.191341 -0.461940
v 0.415735 0.277785 -0.415735
v -0.461940 0.191341 -0.461940
v -0.415735 0.277785 -0.415735
v 0.415735 -0.277785 -0.415735
v -0.490393 -0.097546 -0.490392
v 0.353553 0.353553 -0.353553
v -0.213679 0.450000 0.213680
v -0.353553 0.353553 -0.353553
v 0.277785 0.415735 -0.277785
v -0.461940 -0.191342 -0.461939
v 0.353554 -0.353553 -0.353554
v -0.277785 0.415735 -0.277785
v -0.415735 -0.277785 -0.415734
v 0.277786 -0.415735 -0.277785
v -0.353553 -0.353554 -0.353553
v -0.277785 -0.415735 -0.277784
vt 0.038487 0.679029
vt 0.010047 0.589789
vt 0.990397 0.589790
vt 0.915772 0.767073
vt 0.084671 0.767071
vt 0.961957 0.679029
vt 0.852473 0.146294
vt 0.914576 0.232749
vt 0.084146 0.232744
vt 0.712776 0.000003
vt 0.221926 0.061588
vt 0.285951 0.000000
vt 0.285945 0.999818
vt 0.221920 0.938229
vt 0.712771 0.999818
vt 0.009578 0.589789
vt 0.989138 0.589792
vt 0.960721 0.679031
vt 0.286638 0.000000
vt 0.777884 0.061589
vt 0.222561 0.061589
vt 0.777608 0.938229
vt 0.222164 0.938229
vt 0.146413 0.853527
vt 0.286255 0.999818
vt 0.713517 0.999818
vt 0.776800 0.061592
vt 0.146251 0.146290
vt 0.000000 0.499907
vt 0.989139 0.410032
vt 0.998734 0.499910
vt 0.853618 0.146291
vt 0.915772 0.232746
vt 0.146826 0.146290
vt 0.961957 0.320789
vt 0.084672 0.232745
vt 0.990397 0.410029
vt 0.038487 0.320789
vt 0.776796 0.938230
vt 0.777790 0.938229
vt 0.146467 0.853526
vt 0.853556 0.853527
vt 0.146825 0.853526
vt 1.000000 0.499907
vt 0.010047 0.410028
vt 0.146246 0.853527
vt 0.222559 0.938228
vt 0.777882 0.938230
vt 0.915737 0.767073
vt 0.084287 0.767072
vt 0.038083 0.679029
vt 0.961941 0.679029
vt 0.037995 0.679029
vt 0.960723 0.320792
vt 0.037998 0.320787
vt 0.009580 0.410028
vt 0.990167 0.589790
vt 0.999772 0.499909
vt 0.961721 0.679029
vt 0.084246 0.767072
vt 0.915526 0.767072
vt 0.853359 0.853527
vt 0.914573 0.767074
vt 0.084142 0.767072
vt 0.852470 0.853528
vt 0.777609 0.061590
vt 0.853360 0.146293
vt 0.222166 0.061589
vt 0.146414 0.146291
vt 0.915527 0.232748
vt 0.084247 0.232746
vt 0.961721 0.320791
vt 0.038052 0.320789
vt 0.990167 0.410031
vt 0.713686 0.999818
vt 0.749950 0.250050
vt 0.749950 0.749950
vt 0.250050 0.749950
vt 0.250050 0.250050
vt 0.713807 0.000000
vt 0.286258 0.000000
vt 0.713519 0.000001
vt 0.250050 0.250050
vt 0.749950 0.250050
vt 0.749950 0.749950
vt 0.286636 0.999817
vt 0.777791 0.061589
vt 0.146467 0.146291
vt 0.084287 0.232745
vt 0.915737 0.232746
vt 0.961941 0.320789
vt 0.000444 0.499907
vt 0.713687 0.000000
vt 0.713805 0.999818
vn -0.620400 0.479600 0.620400
vn -0.683900 0.254100 0.683900
vn 0.683900 0.254100 0.683900
vn 0.531000 0.660300 0.531000
vn -0.531000 0.660300 0.531000
vn 0.620400 0.479600 0.620400
vn -0.429700 -0.794100 0.429700
vn -0.531000 -0.660300 0.531000
vn -0.531000 -0.660300 -0.531000
vn -0.185700 -0.964900 0.185700
vn -0.325800 -0.887500 -0.325800
vn -0.185700 -0.964900 -0.185700
vn -0.185700 0.964900 -0.185700
vn -0.325800 0.887500 -0.325800
vn -0.185700 0.964900 0.185700
vn -0.683900 0.254000 -0.683900
vn 0.325800 -0.887500 0.325800
vn -0.325800 -0.887500 0.325800
vn 0.325800 0.887500 -0.325800
vn 0.429700 0.794100 -0.429700
vn 0.185700 0.964900 -0.185700
vn -0.429700 -0.794100 -0.429700
vn -0.707100 0.000000 -0.707100
vn -0.683900 -0.254100 0.683900
vn -0.707100 0.000000 0.707100
vn 0.429700 -0.794100 0.429700
vn 0.531000 -0.660300 0.531000
vn 0.620400 -0.479600 0.620400
vn 0.683900 -0.254100 0.683900
vn -0.620400 -0.479600 0.620400
vn -0.325800 0.887500 0.325800
vn 0.185700 0.964900 0.185700
vn 0.325800 0.887500 0.325800
vn 0.429700 0.794100 0.429700
vn -0.429700 0.794100 0.429700
vn 0.707100 0.000000 0.707100
vn -0.429700 0.794100 -0.429700
vn 0.531000 0.660300 -0.531000
vn 0.683900 0.254100 -0.683900
vn 0.707100 0.000000 -0.707100
vn 0.620400 0.479600 -0.620400
vn -0.620400 0.479600 -0.620400
vn -0.620400 -0.479600 -0.620400
vn -0.683900 -0.254000 -0.683900
vn 0.683900 -0.254100 -0.683900
vn -0.531000 0.660300 -0.531000
vn 0.325800 -0.887500 -0.325800
vn 0.429700 -0.794100 -0.429700
vn 0.531000 -0.660300 -0.531000
vn 0.620400 -0.479600 -0.620400
vn 0.185700 -0.964900 -0.185700
vn 0.185700 -0.964900 0.185700
s 1
f 30/1/1 32/2/2 26/3/3
f 33/4/4 35/5/5 29/6/6
f 12/7/7 17/8/8 49/9/9
f 2/10/10 52/11/11 4/12/12
f 6/13/13 48/14/14 43/15/15
f 34/16/16 32/17/2 30/18/1
f 2/19/10 9/20/17 10/21/18
f 48/22/14 45/23/19 42/24/20
f 5/25/21 45/23/19 6/26/13
f 10/27/18 12/7/7 51/28/22
f 19/29/23 27/30/24 13/31/25
f 9/20/17 11/32/26 10/21/18
f 11/32/26 14/33/27 12/34/7
f 14/33/27 20/35/28 17/36/8
f 20/35/28 23/37/29 21/38/30
f 43/15/15 48/14/14 15/39/31
f 7/25/32 16/23/33 45/40/19
f 18/41/34 42/42/20 45/40/19
f 29/6/6 30/1/1 26/3/3
f 22/43/35 33/4/4 18/42/34
f 26/3/3 32/2/2 8/44/36
f 8/44/36 27/45/24 23/37/29
f 11/32/26 12/34/7 10/21/18
f 14/33/27 17/36/8 12/34/7
f 20/35/28 21/38/30 17/36/8
f 23/37/29 27/45/24 21/38/30
f 10/27/18 52/11/11 2/10/10
f 15/39/31 48/14/14 44/46/37
f 22/43/35 35/5/5 33/4/4
f 15/47/31 22/43/35 16/48/33
f 37/49/38 42/42/20 18/41/34
f 33/50/4 29/51/6 37/49/38
f 8/29/36 25/3/39 26/16/3
f 24/44/40 25/3/39 8/29/36
f 29/51/6 26/16/3 31/52/41
f 26/16/3 25/3/39 31/52/41
f 29/51/6 31/52/41 37/49/38
f 38/53/42 34/16/16 30/18/1
f 19/29/23 32/17/2 34/16/16
f 13/31/25 32/17/2 19/29/23
f 17/8/8 21/54/30 46/55/43
f 21/54/30 27/30/24 41/56/44
f 8/29/36 28/37/45 24/44/40
f 34/57/16 25/16/39 19/58/23
f 38/59/42 31/51/41 34/57/16
f 31/51/41 25/16/39 34/57/16
f 37/60/38 38/59/42 39/61/46
f 37/60/38 31/51/41 38/59/42
f 44/62/37 42/24/20 37/60/38
f 38/53/42 30/18/1 35/63/5
f 39/64/46 35/63/5 22/65/35
f 52/66/11 51/67/22 50/68/47
f 51/67/22 47/69/48 50/68/47
f 51/67/22 49/70/9 47/69/48
f 49/70/9 40/71/49 47/69/48
f 49/70/9 46/72/43 40/71/49
f 46/72/43 36/73/50 40/71/49
f 19/58/23 28/56/45 41/74/44
f 46/72/43 41/74/44 36/73/50
f 41/74/44 28/56/45 36/73/50
f 22/43/35 18/42/34 16/48/33
f 5/75/21 7/25/32 45/40/19
f 2/76/10 4/77/12 1/78/51 3/79/52
f 44/62/37 48/22/14 42/24/20
f 35/5/5 30/1/1 29/6/6
f 3/80/52 9/20/17 2/19/10
f 45/23/19 48/22/14 6/26/13
f 1/81/51 52/66/11 50/68/47
f 39/61/46 44/62/37 37/60/38
f 52/66/11 1/81/51 4/82/12
f 24/29/40 28/56/45 19/58/23
f 7/78/32 5/83/21 6/84/13 43/85/15
f 24/29/40 19/58/23 25/16/39
f 15/47/31 16/48/33 43/86/15
f 22/65/35 44/46/37 39/64/46
f 39/64/46 38/53/42 35/63/5
f 41/56/44 27/30/24 19/29/23
f 46/55/43 21/54/30 41/56/44
f 49/9/9 17/8/8 46/55/43
f 51/28/22 12/7/7 49/9/9
f 52/11/11 10/27/18 51/28/22
f 9/68/17 50/87/47 11/88/26
f 50/87/47 47/32/48 11/88/26
f 11/88/26 47/32/48 14/89/27
f 47/32/48 40/90/49 14/89/27
f 14/89/27 40/90/49 20/73/28
f 40/90/49 36/91/50 20/73/28
f 23/56/29 28/37/45 8/29/36
f 20/73/28 36/91/50 23/56/29
f 36/91/50 28/37/45 23/56/29
f 13/92/25 8/44/36 32/2/2
f 50/87/47 9/68/17 1/93/51
f 13/92/25 27/45/24 8/44/36
f 16/23/33 18/41/34 45/40/19
f 22/65/35 15/39/31 44/46/37
f 9/68/17 3/81/52 1/93/51
f 33/50/4 37/49/38 18/41/34
f 43/86/15 16/48/33 7/94/32

View File

@ -0,0 +1,132 @@
# Blender v2.73 (sub 0) OBJ File: 'slope_test_quarter_round_onetexture.blend'
# www.blender.org
o Cylinder
v -0.500000 0.490393 -0.097545
v 0.500000 0.490393 -0.097545
v -0.500000 0.461940 -0.191342
v 0.500000 0.461940 -0.191342
v -0.500000 0.415735 -0.277785
v 0.500000 0.415735 -0.277785
v -0.500000 0.353553 -0.353553
v 0.500000 0.353553 -0.353553
v -0.500000 0.277785 -0.415735
v 0.500000 0.277785 -0.415735
v -0.500000 0.191342 -0.461940
v 0.500000 0.191342 -0.461940
v -0.500000 0.097545 -0.490393
v 0.500000 0.097545 -0.490393
v 0.500000 -0.000000 -0.500000
v 0.500000 0.490393 -0.097545
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.000000 -0.500000
v -0.500000 0.500000 -0.000000
v 0.500000 0.500000 0.000000
v -0.500000 0.490393 -0.097545
v -0.500000 0.461940 -0.191342
v -0.500000 0.415735 -0.277785
v -0.500000 0.353553 -0.353553
v -0.500000 0.277785 -0.415735
v -0.500000 0.191342 -0.461940
v -0.500000 0.097545 -0.490393
v -0.500000 0.000000 0.000000
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.000000 -0.500000
v -0.500000 0.500000 -0.000000
v 0.500000 0.461940 -0.191342
v 0.500000 0.415735 -0.277785
v 0.500000 0.353553 -0.353553
v 0.500000 0.277785 -0.415735
v 0.500000 0.191342 -0.461940
v 0.500000 0.097545 -0.490393
v 0.500000 -0.000000 -0.500000
v 0.500000 -0.000000 -0.000000
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.000000
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 1.000000 0.000000
vt 1.000000 0.500000
vt 0.500001 0.500000
vt 0.500001 1.000000
vt 0.000003 1.000000
vt 0.000003 0.000000
vt 0.597546 0.990393
vt 0.691342 0.961940
vt 1.000000 1.000000
vt 0.990393 0.597545
vt 0.961940 0.691341
vt 0.777786 0.915735
vt 0.853554 0.853553
vt 0.915735 0.777785
vt 0.146446 0.853552
vt 0.084265 0.777783
vt 0.038060 0.691340
vt 0.308658 0.961938
vt 0.222214 0.915733
vt 0.000000 0.499999
vt 0.402454 0.990391
vt 0.009607 0.597544
vt 1.000000 0.375000
vt 0.000000 0.375000
vt 0.000000 0.250000
vt 1.000000 0.250000
vt 0.000000 0.125000
vt 1.000000 0.125000
vt 0.000000 0.875000
vt 1.000000 0.875000
vt 0.000000 0.750000
vt 1.000000 0.750000
vt 0.000000 0.625000
vt 1.000000 0.625000
vn 1.000000 -0.000000 0.000000
vn -0.000000 0.000000 1.000000
vn -0.000000 -1.000000 0.000000
vn -1.000000 0.000000 0.000000
vn 0.000000 0.980800 -0.195100
vn 0.000000 0.923900 -0.382700
vn -0.000000 0.831500 -0.555600
vn -0.000000 0.707100 -0.707100
vn -0.000000 0.555600 -0.831500
vn -0.000000 0.382700 -0.923900
vn -0.000000 0.195100 -0.980800
vn 0.000000 1.000000 -0.000000
vn 0.000000 0.998800 -0.049100
vn -0.000000 0.049100 -0.998800
vn -0.000000 0.000000 -1.000000
s off
f 46/1/1 44/2/1 45/3/1 49/4/1 48/5/1 47/6/1
f 16/7/1 49/4/1 45/3/1 38/8/1
f 55/5/2 53/6/2 54/1/2 56/9/2
f 43/10/1 42/11/1 45/3/1 44/2/1
f 39/12/1 38/8/1 45/3/1 40/13/1
f 41/14/1 40/13/1 45/3/1 42/11/1
f 50/9/3 51/5/3 52/6/3 17/1/3
f 28/15/4 29/16/4 30/17/4 32/3/4
f 26/18/4 27/19/4 28/15/4 32/3/4
f 35/9/4 37/4/4 32/3/4 36/20/4 34/6/4 33/1/4
f 37/4/4 25/21/4 26/18/4 32/3/4
f 30/17/4 31/22/4 36/20/4 32/3/4
s 1
f 1/23/5 2/24/5 4/25/6 3/26/6
f 3/26/6 4/25/6 6/27/7 5/28/7
f 5/28/7 6/27/7 8/6/8 7/1/8
f 7/9/8 8/5/8 10/29/9 9/30/9
f 9/30/9 10/29/9 12/31/10 11/32/10
f 11/32/10 12/31/10 14/33/11 13/34/11
f 21/5/12 24/20/13 23/2/13 20/9/12
f 13/34/11 14/33/11 15/20/14 22/2/14
f 23/2/13 24/20/13 2/24/5 1/23/5
f 18/1/15 22/2/14 15/20/14 19/6/15

View File

@ -0,0 +1,23 @@
# Blender v2.73 (sub 0) OBJ File: 'technic-ocorner.blend'
# www.blender.org
o Cube_Cube.002
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 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vn 0.000000 -1.000000 -0.000000
vn 0.000000 0.000000 1.000000
vn -1.000000 -0.000000 0.000000
vn -0.000000 0.707100 -0.707100
vn 0.707100 0.707100 -0.000000
s off
f 3/1/1 2/2/1 4/3/1 5/4/1
f 1/2/2 3/3/2 5/4/2
f 1/1/3 2/3/3 3/4/3
f 1/1/4 4/3/4 2/4/4
f 1/2/5 5/3/5 4/4/5

View File

@ -0,0 +1,23 @@
# Blender v2.73 (sub 0) OBJ File: 'slope_test_ocorner_onetexture.blend'
# www.blender.org
o Cube_Cube.002
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.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vn 0.000000 1.000000 -0.000000
vn -1.000000 0.000000 -0.000000
vn 0.000000 0.000000 1.000000
vn 0.707100 -0.707100 0.000000
vn -0.000000 -0.707100 -0.707100
s off
f 3/1/1 2/2/1 4/3/1 5/4/1
f 1/2/2 3/3/2 5/4/2
f 1/1/3 2/3/3 3/4/3
f 1/1/4 4/3/4 2/4/4
f 1/2/5 5/3/5 4/4/5

View File

@ -0,0 +1,24 @@
# Blender v2.73 (sub 0) OBJ File: 'slope_test_pyramid_short_onetexture.blend'
# www.blender.org
o Cube
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.000000 0.000000 -0.000000
vt 1.000000 0.500000
vt 0.000000 0.500000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 0.500000 0.500000
vn 0.000000 -1.000000 0.000000
vn -0.707100 0.707100 -0.000000
vn 0.000000 0.707100 -0.707100
vn 0.707100 0.707100 0.000000
vn -0.000000 0.707100 0.707100
s off
f 1/1/1 2/2/1 3/3/1 4/4/1
f 3/4/2 5/5/2 4/3/2
f 5/5/3 1/3/3 4/4/3
f 1/4/4 5/5/4 2/3/4
f 2/4/5 5/5/5 3/3/5

View File

@ -0,0 +1,24 @@
# Blender v2.73 (sub 0) OBJ File: 'slope_test_pyramid_onetexture.blend'
# www.blender.org
o Cube
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.000000 0.500000 -0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 0.500000 1.000000
vn 0.000000 -1.000000 0.000000
vn -0.894400 0.447200 -0.000000
vn 0.000000 0.447200 -0.894400
vn 0.894400 0.447200 0.000000
vn -0.000000 0.447200 0.894400
s off
f 1/1/1 2/2/1 3/3/1 4/4/1
f 3/4/2 5/5/2 4/3/2
f 5/5/3 1/3/3 4/4/3
f 1/4/4 5/5/4 2/3/4
f 2/4/5 5/5/5 3/3/5

View File

@ -0,0 +1,362 @@
# Blender v2.78 (sub 0) OBJ File: 'technic-reactor.blend'
# www.blender.org
o Cube.002
v 0.249998 -0.500500 -0.249998
v 0.249998 -0.500500 0.249998
v -0.249999 -0.500500 -0.249998
v -0.249999 -0.500500 0.249998
v 0.283224 0.283132 0.423876
v 0.283224 -0.283316 0.423876
v -0.283224 0.283132 0.423875
v -0.283224 -0.283316 0.423875
v 0.195088 -0.195188 0.470985
v 0.195088 0.194988 0.470985
v -0.195088 -0.195188 0.470985
v -0.195088 0.194988 0.470985
v 0.099454 -0.099560 0.499495
v 0.099454 0.099349 0.499495
v -0.099455 -0.099560 0.499495
v -0.099455 0.099349 0.499495
v -0.360476 -0.360431 -0.360476
v -0.195088 -0.195024 -0.470985
v -0.195088 0.195153 -0.470985
v 0.195089 -0.195024 -0.470985
v 0.195089 0.195153 -0.470985
v 0.283225 -0.283168 -0.423875
v 0.283225 0.283281 -0.423875
v -0.283224 -0.283168 -0.423875
v -0.283224 0.283281 -0.423875
v 0.099455 -0.099386 -0.499495
v 0.099455 0.099525 -0.499495
v -0.099455 -0.099386 -0.499495
v -0.099455 0.099525 -0.499495
v -0.360492 0.360411 0.360457
v -0.099717 0.499491 0.099455
v 0.099194 0.499491 0.099456
v -0.195335 0.470933 0.195089
v 0.195097 0.470933 0.195089
v 0.194842 0.471069 0.194640
v -0.283446 0.423808 0.283224
v 0.283003 0.424005 0.282855
v 0.360288 0.360647 0.360170
v -0.099717 0.499526 -0.099455
v 0.099194 0.499526 -0.099455
v -0.194886 0.471001 -0.195088
v 0.194842 0.471001 -0.195088
v -0.195335 0.470865 -0.195343
v -0.283076 0.423907 -0.283224
v 0.283003 0.423907 -0.283224
v -0.360358 0.360522 -0.360476
v 0.360429 0.360474 -0.360515
v 0.360664 -0.360306 -0.360247
v -0.423875 -0.283187 0.283224
v -0.423875 0.283165 0.283224
v -0.423727 -0.283464 -0.283405
v -0.423875 0.283165 -0.283224
v 0.283446 -0.423844 -0.283224
v -0.283244 -0.423843 -0.283224
v -0.470985 0.195015 -0.195088
v -0.470985 -0.195016 -0.195088
v -0.360287 -0.360683 0.360323
v 0.283446 -0.423745 0.283465
v -0.283002 -0.423942 0.283224
v 0.360664 -0.360306 0.360247
v 0.423875 0.283152 0.283225
v 0.423727 0.283428 -0.283405
v 0.424023 -0.283021 0.282947
v -0.470985 -0.195017 0.195088
v 0.470985 0.195317 0.195089
v 0.424023 -0.283021 -0.282948
v 0.470985 -0.194860 -0.195088
v 0.470883 0.195317 -0.195279
v 0.471087 -0.194860 0.194752
v -0.471087 0.194824 0.194751
v -0.499495 0.099176 0.099455
v -0.499495 -0.099735 0.099455
v -0.499495 0.099175 -0.099455
v -0.499495 -0.099735 -0.099455
v 0.499495 -0.099212 0.099456
v 0.499495 0.099699 0.099456
v 0.499495 -0.099212 -0.099455
v 0.499495 0.099699 -0.099455
v 0.254894 -0.439053 0.254894
v 0.254894 -0.438992 -0.254894
v -0.254894 -0.439019 -0.254894
v -0.254664 -0.439081 0.254894
vt 0.2500 0.0000
vt 0.2451 0.0610
vt 0.7549 0.0609
vt 0.7500 0.0000
vt 0.2500 0.0000
vt 0.2451 0.0609
vt 0.7547 0.0609
vt 0.7500 0.0000
vt 0.2500 0.0000
vt 0.2451 0.0609
vt 0.7549 0.0610
vt 0.7500 0.0000
vt 0.2498 0.0000
vt 0.2449 0.0610
vt 0.7547 0.0610
vt 0.7498 0.0000
vt 0.2168 0.2167
vt 0.1393 0.1397
vt 0.1397 0.8606
vt 0.2168 0.7831
vt 0.4004 0.4006
vt 0.3047 0.3050
vt 0.3047 0.6952
vt 0.4004 0.5995
vt 0.7830 0.2168
vt 0.8605 0.1397
vt 0.1393 0.1396
vt 0.2166 0.2168
vt 0.3049 0.3048
vt 0.3049 0.6950
vt 0.6949 0.3050
vt 0.5993 0.4006
vt 0.5993 0.5995
vt 0.6949 0.6952
vt 0.7830 0.7833
vt 0.2166 0.7833
vt 0.7832 0.7831
vt 0.6951 0.6950
vt 0.8602 0.8605
vt 0.1395 0.8605
vt 0.4005 0.5993
vt 0.5995 0.5993
vt 0.6951 0.3048
vt 0.7832 0.2167
vt 0.5995 0.4004
vt 0.8605 0.1396
vt 0.7834 0.2165
vt 0.7832 0.7832
vt 0.8605 0.8605
vt 0.4005 0.4004
vt 0.8605 0.8604
vt 0.1396 0.1395
vt 0.2170 0.2168
vt 0.2170 0.7829
vt 0.1397 0.8602
vt 0.2168 0.2168
vt 0.1397 0.1393
vt 0.1396 0.8604
vt 0.2168 0.7832
vt 0.6951 0.6950
vt 0.3053 0.6948
vt 0.6953 0.3047
vt 0.7831 0.2168
vt 0.7834 0.7832
vt 0.6953 0.6951
vt 0.8604 0.1395
vt 0.3052 0.3049
vt 0.6949 0.3049
vt 0.8602 0.1397
vt 0.7829 0.2170
vt 0.7832 0.7832
vt 0.8602 0.8606
vt 0.3052 0.6946
vt 0.3049 0.6951
vt 0.2171 0.2170
vt 0.1398 0.1397
vt 0.1395 0.8605
vt 0.2166 0.7834
vt 0.4005 0.4008
vt 0.3049 0.3051
vt 0.3047 0.6953
vt 0.4005 0.5997
vt 0.6951 0.6953
vt 0.4006 0.4003
vt 0.4006 0.5992
vt 0.5995 0.5992
vt 0.5995 0.4003
vt 0.6948 0.3051
vt 0.5995 0.4008
vt 0.5995 0.5997
vt 0.5997 0.4005
vt 0.5997 0.5995
vt 0.6951 0.3050
vt 0.3049 0.3050
vt 0.4008 0.4005
vt 0.4008 0.5995
vt 0.8603 0.1393
vt 0.2169 0.2168
vt 0.1397 0.1395
vt 0.1395 0.8605
vt 0.2166 0.7832
vt 0.8605 0.8605
vt 0.1393 0.1398
vt 0.2166 0.2168
vt 0.7832 0.2168
vt 0.8605 0.1395
vt 0.1393 0.8602
vt 0.2166 0.7835
vt 0.7830 0.7832
vt 0.8603 0.8603
vt 0.2451 0.2451
vt 0.7549 0.2451
vt 0.7547 0.7549
vt 0.2451 0.7549
vt 0.2500 0.7500
vt 0.7500 0.7500
vt 0.7500 0.2500
vt 0.2500 0.2500
vn 0.9968 -0.0794 -0.0000
vn 0.0000 -0.0794 0.9968
vn -0.9970 -0.0776 0.0002
vn 0.0000 -0.0794 -0.9968
vn 0.6360 0.0002 0.7717
vn -0.2857 0.0000 -0.9583
vn 0.0002 -0.6353 -0.7722
vn 0.4714 -0.0000 0.8819
vn 0.2857 0.0000 -0.9583
vn 0.0000 -0.2857 -0.9583
vn 0.0000 0.4714 -0.8819
vn -0.0000 0.4714 0.8819
vn 0.6346 -0.0000 -0.7728
vn -0.6347 0.0001 -0.7728
vn -0.0000 0.2857 0.9583
vn -0.0000 -0.4714 0.8819
vn -0.2857 -0.0000 0.9583
vn -0.7727 0.0001 -0.6347
vn -0.0000 -0.2857 0.9583
vn -0.4714 0.0000 -0.8819
vn 0.2857 -0.0000 0.9583
vn -0.4714 -0.0000 0.8819
vn 0.4714 0.0000 -0.8819
vn 0.0001 0.6347 0.7728
vn 0.0000 -0.4714 -0.8819
vn 0.0000 0.2857 -0.9583
vn 0.6339 0.7734 -0.0001
vn -0.7722 -0.0002 0.6353
vn -0.8820 0.4713 0.0000
vn -0.4717 0.8817 -0.0002
vn 0.0000 0.7730 -0.6344
vn 0.0000 0.8820 -0.4713
vn 0.7721 0.0002 0.6355
vn 0.4711 0.8821 -0.0002
vn 0.0000 0.0000 -1.0000
vn 0.7732 -0.0000 -0.6342
vn -0.0000 -0.0000 1.0000
vn 0.9583 0.0001 -0.2859
vn -0.7730 0.6345 -0.0000
vn 0.8815 0.4723 -0.0001
vn -1.0000 -0.0000 0.0000
vn 0.9583 0.0000 0.2857
vn 0.0000 0.6344 -0.7730
vn -0.2867 0.9580 -0.0001
vn -0.9580 -0.2867 0.0000
vn 0.0000 0.9583 -0.2858
vn 0.7733 -0.6340 0.0000
vn 1.0000 0.0000 0.0000
vn -0.8818 -0.0000 -0.4716
vn 0.9585 -0.2852 -0.0002
vn 0.2853 0.9584 -0.0001
vn 0.9582 0.2862 -0.0002
vn -0.0000 0.8819 0.4715
vn 0.0002 -0.6359 0.7718
vn -0.7728 -0.6346 0.0000
vn -0.9586 0.2849 -0.0001
vn -0.6353 -0.0002 0.7722
vn -0.0000 0.9582 0.2861
vn -0.9583 0.0000 -0.2857
vn 0.8821 -0.0001 0.4711
vn -0.6348 0.7727 -0.0001
vn -0.8821 0.0001 0.4711
vn 0.8818 0.0000 -0.4716
vn -0.9583 -0.0000 0.2857
vn -0.8820 -0.4713 -0.0000
vn 0.0000 1.0000 0.0002
vn 0.8824 -0.4705 -0.0001
vn 0.7729 0.6346 0.0000
vn 0.0001 0.7732 0.6342
vn 0.0002 -0.7722 -0.6354
vn 0.6351 -0.7724 0.0001
vn -0.6340 -0.7733 0.0000
vn 0.0000 -0.8817 -0.4719
vn -0.4716 -0.8818 0.0001
vn 0.0003 -0.7720 0.6356
vn 0.4706 -0.8823 0.0000
vn 0.0001 -0.8817 0.4718
vn 0.0000 -1.0000 0.0000
g Cube.002_Cube.002_allsides
s off
f 1/1/1 80/2/1 79/3/1 2/4/1
f 2/5/2 79/6/2 82/7/2 4/8/2
f 4/9/3 82/10/3 81/11/3 3/12/3
f 3/13/4 81/14/4 80/15/4 1/16/4
f 6/17/5 60/18/5 38/19/5 5/20/5
f 28/21/6 18/22/6 19/23/6 29/24/6
f 22/25/7 48/26/7 17/27/7 24/28/7
f 9/29/8 6/17/8 5/20/8 10/30/8
f 20/31/9 26/32/9 27/33/9 21/34/9
f 26/32/10 20/31/10 18/22/10 28/21/10
f 23/35/11 21/34/11 19/23/11 25/36/11
f 10/30/12 5/20/12 7/37/12 12/38/12
f 48/26/13 22/25/13 23/35/13 47/39/13
f 24/28/14 17/27/14 46/40/14 25/36/14
f 14/41/15 10/30/15 12/38/15 16/42/15
f 6/17/16 9/29/16 11/43/16 8/44/16
f 11/43/17 15/45/17 16/42/17 12/38/17
f 17/46/18 51/47/18 52/48/18 46/49/18
f 9/29/19 13/50/19 15/45/19 11/43/19
f 18/22/20 24/28/20 25/36/20 19/23/20
f 13/50/21 9/29/21 10/30/21 14/41/21
f 8/44/22 11/43/22 12/38/22 7/37/22
f 22/25/23 20/31/23 21/34/23 23/35/23
f 5/20/24 38/19/24 30/51/24 7/37/24
f 20/31/25 22/25/25 24/28/25 18/22/25
f 21/34/26 27/33/26 29/24/26 19/23/26
f 47/52/27 45/53/27 37/54/27 38/55/27
f 49/56/28 57/57/28 30/58/28 50/59/28
f 52/48/29 55/60/29 70/61/29 50/59/29
f 43/62/30 44/63/30 36/64/30 33/65/30
f 45/53/31 47/52/31 46/66/31 44/63/31
f 42/67/32 45/53/32 44/63/32 43/62/32 41/68/32
f 60/69/33 63/70/33 61/71/33 38/72/33
f 45/53/34 42/67/34 35/73/34 34/74/34 37/54/34
f 28/21/35 29/24/35 27/33/35 26/32/35
f 66/75/36 48/76/36 47/77/36 62/78/36
f 13/50/37 14/41/37 16/42/37 15/45/37
f 77/79/38 67/80/38 68/81/38 78/82/38
f 46/49/39 52/48/39 50/59/39 30/58/39
f 68/81/40 62/78/40 61/71/40 65/83/40
f 72/84/41 71/85/41 73/86/41 74/87/41
f 69/88/42 75/89/42 76/90/42 65/83/42
f 47/39/43 23/35/43 25/36/43 46/40/43
f 39/91/44 41/68/44 43/62/44 33/65/44 31/92/44
f 74/87/45 56/93/45 64/94/45 72/84/45
f 40/95/46 42/67/46 41/68/46 39/91/46
f 48/76/47 66/75/47 63/70/47 60/69/47
f 77/79/48 78/82/48 76/90/48 75/89/48
f 51/47/49 56/93/49 55/60/49 52/48/49
f 67/80/50 77/79/50 75/89/50 69/88/50
f 42/67/51 40/95/51 32/96/51 35/73/51
f 78/82/52 68/81/52 65/83/52 76/90/52
f 37/54/53 34/74/53 33/65/53 36/64/53
f 60/18/54 6/17/54 8/44/54 57/97/54
f 51/47/55 17/46/55 57/57/55 49/56/55
f 55/60/56 73/86/56 71/85/56 70/61/56
f 57/97/57 8/44/57 7/37/57 30/51/57
f 34/74/58 35/73/58 32/96/58 31/92/58 33/65/58
f 56/93/59 74/87/59 73/86/59 55/60/59
f 63/70/60 69/88/60 65/83/60 61/71/60
f 44/98/61 46/99/61 30/100/61 36/101/61
f 64/94/62 49/56/62 50/59/62 70/61/62
f 67/80/63 66/75/63 62/78/63 68/81/63
f 72/84/64 64/94/64 70/61/64 71/85/64
f 56/93/65 51/47/65 49/56/65 64/94/65
f 40/95/66 39/91/66 31/92/66 32/96/66
f 66/75/67 67/80/67 69/88/67 63/70/67
f 62/78/68 47/77/68 38/72/68 61/71/68
f 30/102/69 38/55/69 37/54/69 36/64/69
g Cube.002_Cube.002_bottom
f 48/103/70 53/104/70 54/105/70 17/106/70
f 53/104/71 48/103/71 60/107/71 58/108/71
f 17/106/72 54/105/72 59/109/72 57/110/72
f 53/104/73 80/111/73 81/112/73 54/105/73
f 54/105/74 81/112/74 82/113/74 59/109/74
f 58/108/75 60/107/75 57/110/75 59/109/75
f 79/114/76 80/111/76 53/104/76 58/108/76
f 82/113/77 79/114/77 58/108/77 59/109/77
f 2/115/78 4/116/78 3/117/78 1/118/78

View File

@ -0,0 +1,24 @@
# Blender v2.73 (sub 0) OBJ File: 'slope_test_slope_onetexture.blend'
# www.blender.org
o Cube_Cube.002
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 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vn 0.000000 -0.000000 1.000000
vn 0.000000 -1.000000 -0.000000
vn -1.000000 0.000000 0.000000
vn 1.000000 0.000000 0.000000
vn 0.000000 0.707100 -0.707100
s off
f 1/1/1 2/2/1 3/3/1 4/4/1
f 4/3/2 3/4/2 5/1/2 6/2/2
f 2/1/3 5/3/3 3/4/3
f 1/2/4 4/3/4 6/4/4
f 2/1/5 1/2/5 6/3/5 5/4/5

View File

@ -0,0 +1,24 @@
# Blender v2.73 (sub 0) OBJ File: 'technic-slope-horizontal.blend'
# www.blender.org
o Cube_Cube.002
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.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vn 0.000000 -0.000000 1.000000
vn 1.000000 -0.000000 -0.000000
vn -0.000000 -1.000000 0.000000
vn 0.000000 1.000000 -0.000000
vn -0.707100 0.000000 -0.707100
s off
f 1/1/1 2/2/1 3/3/1 4/4/1
f 4/1/2 3/2/2 5/3/2 6/4/2
f 2/3/3 5/1/3 3/2/3
f 1/4/4 4/1/4 6/2/4
f 2/3/5 1/4/5 6/1/5 5/2/5

View File

@ -0,0 +1,24 @@
# Blender v2.73 (sub 0) OBJ File: 'slope_test_slope_onetexture.blend'
# www.blender.org
o Cube_Cube.002
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.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vn 0.000000 0.000000 1.000000
vn 0.000000 1.000000 -0.000000
vn 1.000000 -0.000000 0.000000
vn -1.000000 0.000000 -0.000000
vn -0.000000 -0.707100 -0.707100
s off
f 1/1/1 2/2/1 3/3/1 4/4/1
f 4/3/2 3/4/2 5/1/2 6/2/2
f 2/1/3 5/3/3 3/4/3
f 1/2/4 4/3/4 6/4/4
f 2/1/5 1/2/5 6/3/5 5/4/5

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,207 @@
# Blender v2.73 (sub 0) OBJ File: 'slope_test_quarter_round_corner_onetexture.blend'
# www.blender.org
o corner1_Cylinder
v 0.415732 0.277783 0.499997
v 0.461936 0.191340 0.499997
v 0.415735 0.277783 -0.415732
v 0.461940 0.191340 -0.461937
v 0.490389 0.097544 0.499997
v 0.353551 0.353551 0.499997
v 0.353555 0.353551 -0.353551
v 0.499996 -0.000000 0.499997
v 0.277783 0.415732 0.499997
v 0.490393 0.097544 -0.490389
v 0.277787 0.415732 -0.277784
v 0.191340 0.461936 0.499997
v 0.191344 0.461937 -0.191341
v 0.097544 0.490389 0.499997
v 0.097547 0.490391 -0.097545
v -0.000000 0.499996 0.499997
v -0.499997 0.499997 0.499997
v -0.499997 0.499997 -0.000030
v -0.499997 0.415735 -0.277785
v -0.499997 0.461940 -0.191342
v -0.499997 0.490393 -0.097545
v -0.500000 -0.500000 -0.500000
v -0.499997 -0.499997 0.499997
v 0.000000 0.499998 0.000000
v -0.499998 0.000014 -0.499999
v -0.499997 0.353553 -0.353554
v -0.499998 0.097545 -0.490393
v -0.499997 0.277785 -0.415735
v -0.499998 0.191342 -0.461940
v 0.499997 -0.000000 -0.499996
v 0.500000 -0.500000 -0.500000
v 0.499997 -0.499997 0.499997
v -0.499997 -0.499997 0.499997
v -0.499997 0.499997 0.499997
v -0.499997 0.499997 -0.000030
v -0.499997 0.415735 -0.277785
v -0.499997 0.461940 -0.191342
v -0.499997 0.490393 -0.097545
v -0.500000 -0.500000 -0.500000
v -0.499998 0.000014 -0.499999
v -0.499997 0.353553 -0.353554
v -0.499998 0.097545 -0.490393
v -0.499997 0.277785 -0.415735
v -0.499998 0.191342 -0.461940
v -0.499998 -0.033351 0.033348
v -0.500000 -0.500000 -0.500000
v 0.500000 -0.500000 -0.500000
v 0.499997 -0.499997 0.499997
v 0.415732 0.277783 0.499997
v 0.461936 0.191340 0.499997
v 0.490389 0.097544 0.499997
v 0.353551 0.353551 0.499997
v 0.499996 -0.000000 0.499997
v 0.277783 0.415732 0.499997
v 0.191340 0.461936 0.499997
v -0.499997 -0.499997 0.499997
v 0.097544 0.490389 0.499997
v -0.000000 0.499996 0.499997
v -0.499997 0.499997 0.499997
v -0.033351 -0.033351 0.499997
v 0.499997 -0.499997 0.499997
vt 1.000000 0.500100
vt 0.990395 0.597625
vt 0.466756 0.466756
vt 1.000000 0.000200
vt 0.000201 0.000201
vt 0.597626 0.990394
vt 0.500101 1.000000
vt 0.691404 0.961947
vt 0.777830 0.915751
vt 0.853583 0.853583
vt 0.915752 0.777829
vt 0.000201 1.000000
vt 0.961948 0.691403
vt -0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt -0.000000 1.000000
vt 0.533443 0.466757
vt 0.000202 0.500115
vt 0.402575 0.990397
vt 0.308797 0.961949
vt 0.222371 0.915753
vt 0.146617 0.853584
vt 0.084449 0.777831
vt 0.038253 0.691405
vt 0.009806 0.597626
vt 0.999996 0.125448
vt 0.222353 0.125462
vt 0.146597 0.000612
vt 0.999995 0.000594
vt 0.000178 0.874582
vt 0.915751 0.874577
vt 0.853580 0.999436
vt 0.000178 0.999439
vt 0.999808 0.625427
vt 0.009599 0.625446
vt -0.000005 0.500594
vt 0.999807 0.500594
vt 0.597441 0.374574
vt 0.499912 0.499435
vt 0.000000 0.499434
vt 0.000000 0.374576
vt 0.999999 0.375154
vt 1.000000 0.499969
vt 0.500093 0.500015
vt 0.402562 0.375164
vt 0.999812 0.999983
vt 0.146415 1.000000
vt 0.084244 0.875149
vt 0.999811 0.875131
vt 0.990396 0.624861
vt 0.961947 0.749719
vt 0.000178 0.749724
vt 0.000178 0.624866
vt 0.777649 0.124857
vt 0.691221 0.249715
vt 0.000001 0.249719
vt 0.000001 0.124861
vt 0.308782 0.250314
vt 0.999998 0.250301
vt 0.853403 -0.000000
vt 0.038047 0.750298
vt 0.999809 0.750280
vt 0.000177 0.500008
vt 0.000000 0.500000
vt 0.500000 1.000000
vt 0.500000 0.500000
vn 0.000000 -0.000000 1.000000
vn -0.000000 -1.000000 0.000000
vn -1.000000 0.000000 0.000000
vn 0.000000 0.831500 -0.555600
vn 0.325800 0.887500 -0.325800
vn 0.429700 0.794100 -0.429700
vn 0.000000 0.707100 -0.707100
vn 0.831500 0.555600 0.000000
vn 0.531000 0.660300 -0.531000
vn 0.707100 0.707100 0.000000
vn 0.000000 0.195100 -0.980800
vn 0.683900 0.254100 -0.683900
vn 0.705500 0.067100 -0.705500
vn 0.000000 0.049100 -0.998800
vn 0.123100 0.984700 -0.123100
vn 0.036800 0.998600 -0.036800
vn 0.049100 0.998800 0.000000
vn 0.195100 0.980800 0.000000
vn 0.000000 0.980800 -0.195100
vn 0.000000 0.998800 -0.049100
vn 0.000000 0.555600 -0.831500
vn 0.620400 0.479600 -0.620400
vn 0.923900 0.382700 0.000000
vn 0.980800 0.195100 0.000000
vn 0.223300 0.948800 -0.223200
vn 0.382700 0.923900 0.000000
vn 0.555600 0.831500 0.000000
vn 0.000000 0.923900 -0.382700
vn 0.000000 0.382700 -0.923900
vn 0.998800 0.049100 0.000000
vn 0.707100 0.000000 -0.707100
vn 0.000000 0.000000 -1.000000
vn -0.000000 1.000000 0.000000
vn 1.000000 0.000000 0.000000
s off
f 53/1/1 51/2/1 60/3/1
f 61/4/1 53/1/1 60/3/1 56/5/1
f 57/6/1 58/7/1 60/3/1
f 55/8/1 57/6/1 60/3/1
f 54/9/1 55/8/1 60/3/1
f 52/10/1 54/9/1 60/3/1
f 49/11/1 52/10/1 60/3/1
f 59/12/1 56/5/1 60/3/1 58/7/1
f 50/13/1 49/11/1 60/3/1
f 48/14/2 23/15/2 46/16/2 47/17/2
f 39/5/3 33/4/3 45/18/3 40/19/3
f 35/7/3 38/20/3 45/18/3
f 38/20/3 37/21/3 45/18/3
f 37/21/3 36/22/3 45/18/3
f 36/22/3 41/23/3 45/18/3
f 41/23/3 43/24/3 45/18/3
f 43/24/3 44/25/3 45/18/3
f 44/25/3 42/26/3 45/18/3
f 42/26/3 40/19/3 45/18/3
f 34/16/3 35/7/3 45/18/3 33/4/3
f 51/2/1 50/13/1 60/3/1
s 1
f 19/27/4 11/28/5 7/29/6 26/30/7
f 1/31/8 3/32/9 7/33/6 6/34/10
f 27/35/11 10/36/12 30/37/13 25/38/14
f 15/39/15 24/40/16 16/41/17 14/42/18
f 21/43/19 18/44/20 24/45/16 15/46/15
f 26/47/7 7/48/6 3/49/9 28/50/21
f 10/51/12 4/52/22 2/53/23 5/54/24
f 11/55/5 13/56/25 12/57/26 9/58/27
f 21/43/19 15/46/15 13/59/25 20/60/28
f 20/60/28 13/59/25 11/28/5 19/27/4
f 9/58/27 6/14/10 7/61/6 11/55/5
f 4/52/22 3/32/9 1/31/8 2/53/23
f 3/49/9 4/62/22 29/63/29 28/50/21
f 10/51/12 5/54/24 8/64/30 30/44/13
f 29/63/29 4/62/22 10/36/12 27/35/11
f 25/44/14 30/65/13 31/14/31 22/15/32
f 16/66/17 24/67/16 18/44/20 17/16/33
f 8/65/30 32/14/34 31/15/31 30/44/13
f 12/57/26 13/56/25 15/39/15 14/42/18

Some files were not shown because too many files have changed in this diff Show More