Compare commits
141 Commits
488f80d950
...
master
Author | SHA1 | Date | |
---|---|---|---|
4a5a22a3e3 | |||
85e342c08c | |||
0ff7cb769b | |||
3bece9cec5 | |||
59643c45d4 | |||
b268e3d526 | |||
87e512ff24 | |||
18df2813a0 | |||
221fc1376e | |||
9f373d6528 | |||
6731db14e5 | |||
a9079c49e0 | |||
f80372a0f8 | |||
80dee96dbe | |||
d65c4aadd2 | |||
98675a2ae9 | |||
ba2bdf8368 | |||
d5ff69d1d9 | |||
f47da0c045 | |||
a08ba2bb93 | |||
410e341da5 | |||
5826c2feaa | |||
b221d69717 | |||
a296446da1 | |||
49d4105a2b | |||
fda8a3d042 | |||
dfcf64c1d0 | |||
0921c326a8 | |||
9b7c44b453 | |||
86e083c409 | |||
21e044478e | |||
521c0b74bb | |||
aad1b2875a | |||
66e20a9231 | |||
705961e2fe | |||
6a9dfec36f | |||
d4609f23f2 | |||
091bb2406d | |||
c40189eabf | |||
f61bb82bd1 | |||
7d39136764 | |||
4775d98fb7 | |||
d623715d94 | |||
718a5beda1 | |||
fa39b24ed5 | |||
bce5306abe | |||
167ab93905 | |||
5beb84bed9 | |||
f9b0906a82 | |||
9a39a94272 | |||
349676f243 | |||
0f6bdb1bde | |||
0211c582e9 | |||
d2b68a6bef | |||
140701c99e | |||
1c219487d3 | |||
43acec2900 | |||
0f7810e538 | |||
11e43ffe13 | |||
d8fe9ad16c | |||
c06a56daff | |||
cd5a3ee1ef | |||
a5b36b041e | |||
b9f89a0e39 | |||
03bb4dab46 | |||
d7336670f2 | |||
3c85abb3b2 | |||
11f2b4f4b3 | |||
00618d13b5 | |||
6154a04c00 | |||
438c0877f6 | |||
88f2bc388f | |||
a8daa417c4 | |||
befe3ecc86 | |||
df7f2e464a | |||
31a052d7e6 | |||
88f42539bb | |||
b2a124dd83 | |||
34f2894321 | |||
fb4fef783b | |||
4a9ad94bf9 | |||
f3828c1943 | |||
0e10e8360d | |||
fbc4cc8511 | |||
904800abde | |||
1a45ad19d4 | |||
e90b28895c | |||
7696546d47 | |||
da95be53ec | |||
76a39e71b9 | |||
08b660ba99 | |||
cb84439266 | |||
c41f6509cf | |||
d5df30c3ff | |||
e66bb281a4 | |||
768fbecc64 | |||
707fa5a97c | |||
505ad8d045 | |||
a75cb7252d | |||
662cc7e7ef | |||
e12220be79 | |||
19e045e042 | |||
e8e5df3f4a | |||
d119a67482 | |||
bb05ff8fd2 | |||
d1bf386b80 | |||
dc4f4f66e6 | |||
62fdb853ec | |||
8a987bb361 | |||
e8f1033d49 | |||
a9b10cc4b1 | |||
b81d1d3f2d | |||
c9ba4b329d | |||
700faca5cb | |||
c14521cbd2 | |||
4f78a69ffc | |||
5f6b87d43a | |||
6e58a8e939 | |||
8ebc1de29c | |||
e1a71a8fb0 | |||
701240bc3a | |||
aa82fa1d13 | |||
bdd13beeff | |||
f5bf0d98b1 | |||
3cafe7553a | |||
bc26b047d2 | |||
83ec1b2476 | |||
c068edec65 | |||
4ecb3d4334 | |||
d40946fa38 | |||
dc0689018d | |||
51d7bd81ff | |||
2b2411d1ee | |||
8409be32fc | |||
3d52b679b0 | |||
44cb8df048 | |||
f702a6597b | |||
e931041358 | |||
5b97d94dae | |||
92dd0f4af8 | |||
29f746369f |
20
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
---
|
||||||
|
name: Bug report
|
||||||
|
about: Report a problem within technic
|
||||||
|
title: ''
|
||||||
|
labels: Bug
|
||||||
|
assignees: ''
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
Technic has no main developer and largely depends on
|
||||||
|
user-provided Pull Requests. It will take a while until
|
||||||
|
even important issues are noticed.
|
||||||
|
Please consider proposing a PR directly.
|
||||||
|
_______________________________________________
|
||||||
|
|
||||||
|
|
||||||
|
**Bug description**
|
||||||
|
|
||||||
|
|
||||||
|
**Steps to reproduce this issue**
|
11
.github/workflows/check-release.yml
vendored
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
on: [push, pull_request]
|
||||||
|
name: Check & Release
|
||||||
|
jobs:
|
||||||
|
lint:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@master
|
||||||
|
- name: lint
|
||||||
|
uses: Roang-zero1/factorio-mod-luacheck@master
|
||||||
|
with:
|
||||||
|
luacheckrc_url: ""
|
40
.luacheckrc
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
unused_args = false
|
||||||
|
allow_defined_top = true
|
||||||
|
max_line_length = 150
|
||||||
|
-- Allow shadowed variables (callbacks in callbacks)
|
||||||
|
redefined = false
|
||||||
|
|
||||||
|
globals = {
|
||||||
|
"technic", "minetest",
|
||||||
|
"srcstack",
|
||||||
|
}
|
||||||
|
|
||||||
|
read_globals = {
|
||||||
|
string = {fields = {"split", "trim"}},
|
||||||
|
table = {fields = {"copy", "getn"}},
|
||||||
|
|
||||||
|
"intllib", "VoxelArea",
|
||||||
|
"default", "stairsplus",
|
||||||
|
|
||||||
|
"PseudoRandom", "ItemStack",
|
||||||
|
"mg", "tubelib", "vector",
|
||||||
|
|
||||||
|
"moretrees", "bucket",
|
||||||
|
"unified_inventory", "digilines",
|
||||||
|
|
||||||
|
"pipeworks", "screwdriver",
|
||||||
|
"VoxelManip", "unifieddyes",
|
||||||
|
|
||||||
|
"Settings", "mesecon",
|
||||||
|
"digiline_remote",
|
||||||
|
|
||||||
|
"protector", "isprotect",
|
||||||
|
"homedecor_expect_infinite_stacks",
|
||||||
|
|
||||||
|
"craftguide", "i3"
|
||||||
|
}
|
||||||
|
|
||||||
|
-- Loop warning
|
||||||
|
files["technic/machines/other/frames.lua"].ignore = { "" }
|
||||||
|
-- Long lines
|
||||||
|
files["technic_cnc/cnc_api.lua"].ignore = { "" }
|
16
LICENSE.txt
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
Minetest Mod: technic
|
||||||
|
Copyright (C) 2012-2022 RealBadAngel and contributors
|
||||||
|
|
||||||
|
This library is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU Lesser General Public
|
||||||
|
License as published by the Free Software Foundation; either
|
||||||
|
version 2.1 of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This library is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
Lesser General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Lesser General Public
|
||||||
|
License along with this library; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
64
README.md
@ -1,23 +1,55 @@
|
|||||||
Technic
|
# Technic
|
||||||
=======
|
|
||||||
|
[](https://github.com/minetest-mods/technic/actions)
|
||||||
|
[](https://www.gnu.org/licenses/old-licenses/lgpl-2.0.en.html)
|
||||||
|
|
||||||
|
This Minetest modpack adds machinery and automation procedure content to your
|
||||||
|
world. A few notable features:
|
||||||
|
|
||||||
|
* Electric circuits
|
||||||
|
* Automated material processing (ores, wood, ...)
|
||||||
|
* Extended chest functionalities
|
||||||
|
|
||||||
|
## Dependencies
|
||||||
|
|
||||||
|
* Minetest 5.0.0 or newer
|
||||||
|
* [Minetest Game](https://github.com/minetest/minetest_game/)
|
||||||
|
* [mesecons](https://github.com/minetest-mods/mesecons) -> signalling events
|
||||||
|
* [pipeworks](https://github.com/mt-mods/pipeworks) -> automation of item transport
|
||||||
|
* [moreores](https://github.com/minetest-mods/moreores/) -> additional ores
|
||||||
|
* [basic_materials](https://github.com/mt-mods/basic_materials) -> basic craft items
|
||||||
|
* Supports [moretrees](https://github.com/mt-mods/moretrees) -> rubber trees
|
||||||
|
* Consult `depends.txt` or `mod.conf` of each mod for further dependency information.
|
||||||
|
|
||||||
|
|
||||||
|
## FAQ
|
||||||
|
|
||||||
|
The modpack is explained in the **[Manual](manual.md)** included in this repository.
|
||||||
|
Machine and tool descriptions can be found on the **[GitHub Wiki](https://github.com/minetest-mods/technic/wiki)**.
|
||||||
|
|
||||||
|
1. My technic circuit doesn't work. No power is distributed.
|
||||||
|
* Make sure you have a switching station connected.
|
||||||
|
2. My wires do not connect to the machines.
|
||||||
|
* Each machine type requires its own cable type. If you do not have a
|
||||||
|
matching circuit, consider using a "Supply Converter" for simplicity.
|
||||||
|
|
||||||
|
For modders: **[Technic Lua API](technic/doc/api.md)**
|
||||||
|
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
Unless otherwise stated, all components of this modpack are licensed under the
|
||||||
|
[LGPLv2 or later](LICENSE.txt). See also the individual mod folders for their
|
||||||
|
secondary/alternate licenses, if any.
|
||||||
|
|
||||||
|
|
||||||
|
### Credits
|
||||||
|
|
||||||
|
Contributors in alphabetical order:
|
||||||
|
|
||||||
Credits for contributing to the project (in alphabetical order):
|
|
||||||
* kpoppel
|
* kpoppel
|
||||||
* Nekogloop
|
* Nekogloop
|
||||||
* Nore/Ekdohibs
|
* Nore/Ekdohibs
|
||||||
* ShadowNinja
|
* ShadowNinja
|
||||||
* VanessaE
|
* VanessaE
|
||||||
* And many others...
|
* And many others...
|
||||||
|
|
||||||
FAQ
|
|
||||||
---
|
|
||||||
|
|
||||||
1. My technic circuit doesn't work. No power is distrubuted.
|
|
||||||
* A: Make sure you have a switching station connected.
|
|
||||||
|
|
||||||
License
|
|
||||||
-------
|
|
||||||
|
|
||||||
Unless otherwise stated, all components of this modpack are licensed under the
|
|
||||||
LGPL, V2 or later. See also the individual mod folders for their
|
|
||||||
secondary/alternate licenses, if any.
|
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
default
|
|
||||||
intllib?
|
|
||||||
|
|
@ -16,31 +16,6 @@ for i = 32, 63 do
|
|||||||
"technic:concrete_post_with_platform")
|
"technic:concrete_post_with_platform")
|
||||||
end
|
end
|
||||||
|
|
||||||
local steel_ingot
|
|
||||||
if minetest.get_modpath("technic_worldgen") then
|
|
||||||
steel_ingot = "technic:carbon_steel_ingot"
|
|
||||||
else
|
|
||||||
steel_ingot = "default:steel_ingot"
|
|
||||||
end
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = 'technic:rebar 6',
|
|
||||||
recipe = {
|
|
||||||
{'','', steel_ingot},
|
|
||||||
{'',steel_ingot,''},
|
|
||||||
{steel_ingot, '', ''},
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = 'technic:concrete 5',
|
|
||||||
recipe = {
|
|
||||||
{'default:stone','technic:rebar','default:stone'},
|
|
||||||
{'technic:rebar','default:stone','technic:rebar'},
|
|
||||||
{'default:stone','technic:rebar','default:stone'},
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = 'technic:concrete_post_platform 6',
|
output = 'technic:concrete_post_platform 6',
|
||||||
recipe = {
|
recipe = {
|
||||||
@ -51,9 +26,9 @@ minetest.register_craft({
|
|||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = 'technic:concrete_post 12',
|
output = 'technic:concrete_post 12',
|
||||||
recipe = {
|
recipe = {
|
||||||
{'default:stone','technic:rebar','default:stone'},
|
{'default:stone','basic_materials:steel_bar','default:stone'},
|
||||||
{'default:stone','technic:rebar','default:stone'},
|
{'default:stone','basic_materials:steel_bar','default:stone'},
|
||||||
{'default:stone','technic:rebar','default:stone'},
|
{'default:stone','basic_materials:steel_bar','default:stone'},
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -66,18 +41,6 @@ minetest.register_craft({
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craftitem(":technic:rebar", {
|
|
||||||
description = S("Rebar"),
|
|
||||||
inventory_image = "technic_rebar.png",
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_node(":technic:concrete", {
|
|
||||||
description = S("Concrete Block"),
|
|
||||||
tiles = {"technic_concrete_block.png",},
|
|
||||||
groups = {cracky=1, level=2, concrete=1},
|
|
||||||
sounds = default.node_sound_stone_defaults(),
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_node(":technic:blast_resistant_concrete", {
|
minetest.register_node(":technic:blast_resistant_concrete", {
|
||||||
description = S("Blast-resistant Concrete Block"),
|
description = S("Blast-resistant Concrete Block"),
|
||||||
tiles = {"technic_blast_resistant_concrete_block.png",},
|
tiles = {"technic_blast_resistant_concrete_block.png",},
|
||||||
@ -91,6 +54,20 @@ minetest.register_node(":technic:blast_resistant_concrete", {
|
|||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
if minetest.get_modpath("moreblocks") then
|
||||||
|
stairsplus:register_all("technic","blast_resistant_concrete","technic:blast_resistant_concrete",{
|
||||||
|
description = "Blast-resistant Concrete",
|
||||||
|
tiles = {"technic_blast_resistant_concrete_block.png",},
|
||||||
|
groups = {cracky=1, level=3, concrete=1},
|
||||||
|
sounds = default.node_sound_stone_defaults(),
|
||||||
|
on_blast = function(pos, intensity)
|
||||||
|
if intensity > 1 then
|
||||||
|
minetest.remove_node(pos)
|
||||||
|
minetest.add_item(pos, "technic:blast_resistant_concrete")
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
local box_platform = {-0.5, 0.3, -0.5, 0.5, 0.5, 0.5}
|
local box_platform = {-0.5, 0.3, -0.5, 0.5, 0.5, 0.5}
|
||||||
local box_post = {-0.15, -0.5, -0.15, 0.15, 0.5, 0.15}
|
local box_post = {-0.15, -0.5, -0.15, 0.15, 0.5, 0.15}
|
||||||
@ -101,7 +78,7 @@ local box_right = {0, -0.3, -0.1, 0.5, 0.3, 0.1}
|
|||||||
|
|
||||||
minetest.register_node(":technic:concrete_post_platform", {
|
minetest.register_node(":technic:concrete_post_platform", {
|
||||||
description = S("Concrete Post Platform"),
|
description = S("Concrete Post Platform"),
|
||||||
tiles = {"technic_concrete_block.png",},
|
tiles = {"basic_materials_concrete_block.png",},
|
||||||
groups={cracky=1, level=2},
|
groups={cracky=1, level=2},
|
||||||
sounds = default.node_sound_stone_defaults(),
|
sounds = default.node_sound_stone_defaults(),
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
@ -133,7 +110,7 @@ for platform = 0, 1 do
|
|||||||
|
|
||||||
minetest.register_node(":technic:concrete_post"..(platform == 1 and "_with_platform" or ""), {
|
minetest.register_node(":technic:concrete_post"..(platform == 1 and "_with_platform" or ""), {
|
||||||
description = S("Concrete Post"),
|
description = S("Concrete Post"),
|
||||||
tiles = {"technic_concrete_block.png"},
|
tiles = {"basic_materials_concrete_block.png"},
|
||||||
groups = {cracky=1, level=2, concrete_post=1, not_in_creative_inventory=platform},
|
groups = {cracky=1, level=2, concrete_post=1, not_in_creative_inventory=platform},
|
||||||
sounds = default.node_sound_stone_defaults(),
|
sounds = default.node_sound_stone_defaults(),
|
||||||
drop = (platform == 1 and "technic:concrete_post_platform" or
|
drop = (platform == 1 and "technic:concrete_post_platform" or
|
||||||
|
7
concrete/locale/fr.txt
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
# technic_concrete translation template
|
||||||
|
|
||||||
|
Rebar = Armature
|
||||||
|
Concrete Block = Bloc de béton
|
||||||
|
Blast-resistant Concrete Block = Bloc de béton anti explosions
|
||||||
|
Concrete Post Platform = Plateforme en béton
|
||||||
|
Concrete Post = Pilier en béton
|
9
concrete/locale/ja.txt
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
# technic_concrete japanese translation
|
||||||
|
# technic_concreteの日本語への翻訳
|
||||||
|
# by damiemk
|
||||||
|
|
||||||
|
Rebar = 鉄筋
|
||||||
|
Concrete Block = コンクリートのブロック
|
||||||
|
Blast-resistant Concrete Block = 耐爆性コンクリートのブロック
|
||||||
|
Concrete Post Platform = コンクリートのプラットフォーム
|
||||||
|
Concrete Post = コンクリートポスト
|
10
concrete/locale/pl.txt
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
# Polish Translation for technic_concrete
|
||||||
|
# Polskie tłumaczenie technic_concrete
|
||||||
|
# by mat9117
|
||||||
|
|
||||||
|
Rebar = Pręt zbrojeniowy
|
||||||
|
Concrete Block = Blok betonu
|
||||||
|
Blast-resistant Concrete Block = Przeciwwybuchowy blok betonu
|
||||||
|
Concrete Post Platform = Betonowa platforma
|
||||||
|
Concrete Post = Betonowy słup
|
||||||
|
|
10
concrete/locale/pt_BR.txt
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
# Braziliam portuguese translation for technic_concrete
|
||||||
|
# Tradução portuguesa brasileira para technic_concrete
|
||||||
|
# By Sires
|
||||||
|
|
||||||
|
Rebar = Vergalhão
|
||||||
|
Concrete Block = Bloco de Concreto
|
||||||
|
Blast-resistant Concrete Block = Bloco de Concreto resistente-a-explosões
|
||||||
|
Concrete Post Platform = Plataforma para Poste de Concreto
|
||||||
|
Concrete Post = Poste de Concreto
|
||||||
|
|
3
concrete/mod.conf
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
name = concrete
|
||||||
|
depends = default
|
||||||
|
optional_depends = basic_materials, intllib, moreblocks
|
Before Width: | Height: | Size: 311 B After Width: | Height: | Size: 214 B |
Before Width: | Height: | Size: 500 B |
Before Width: | Height: | Size: 813 B |
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 813 B After Width: | Height: | Size: 583 B |
@ -1,6 +0,0 @@
|
|||||||
default
|
|
||||||
technic_worldgen
|
|
||||||
concrete
|
|
||||||
unifieddyes?
|
|
||||||
intllib?
|
|
||||||
moreblocks?
|
|
@ -27,10 +27,16 @@ if minetest.get_modpath("moreblocks") then
|
|||||||
tiles={"technic_granite.png"},
|
tiles={"technic_granite.png"},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
stairsplus:register_all("technic", "granite_bricks", "technic:granite_bricks", {
|
||||||
|
description=S("Granite Bricks"),
|
||||||
|
groups={cracky=1, not_in_creative_inventory=1},
|
||||||
|
tiles={"technic_granite_bricks.png"},
|
||||||
|
})
|
||||||
|
|
||||||
stairsplus:register_all("technic", "concrete", "technic:concrete", {
|
stairsplus:register_all("technic", "concrete", "technic:concrete", {
|
||||||
description=S("Concrete"),
|
description=S("Concrete"),
|
||||||
groups={cracky=3, not_in_creative_inventory=1},
|
groups={cracky=3, not_in_creative_inventory=1},
|
||||||
tiles={"technic_concrete_block.png"},
|
tiles={"basic_materials_concrete_block.png"},
|
||||||
})
|
})
|
||||||
|
|
||||||
stairsplus:register_all("technic", "zinc_block", "technic:zinc_block", {
|
stairsplus:register_all("technic", "zinc_block", "technic:zinc_block", {
|
||||||
@ -57,42 +63,47 @@ if minetest.get_modpath("moreblocks") then
|
|||||||
tiles={"technic_stainless_steel_block.png"},
|
tiles={"technic_stainless_steel_block.png"},
|
||||||
})
|
})
|
||||||
|
|
||||||
stairsplus:register_all("technic", "brass_block", "technic:brass_block", {
|
function register_technic_stairs_alias(origmod, origname, newmod, newname)
|
||||||
description=S("Brass Block"),
|
local func = minetest.register_alias
|
||||||
groups={cracky=1, not_in_creative_inventory=1},
|
local function remap(kind, suffix)
|
||||||
tiles={"technic_brass_block.png"},
|
-- Old: stairsplus:slab_concrete_wall
|
||||||
})
|
-- New: technic:slab_concrete_wall
|
||||||
|
func(("%s:%s_%s%s"):format(origmod, kind, origname, suffix),
|
||||||
|
("%s:%s_%s%s"):format(newmod, kind, newname, suffix))
|
||||||
|
end
|
||||||
|
|
||||||
function register_technic_stairs_alias(modname, origname, newmod, newname)
|
-- Slabs
|
||||||
minetest.register_alias(modname .. ":slab_" .. origname, newmod..":slab_" .. newname)
|
remap("slab", "")
|
||||||
minetest.register_alias(modname .. ":slab_" .. origname .. "_inverted", newmod..":slab_" .. newname .. "_inverted")
|
remap("slab", "_inverted")
|
||||||
minetest.register_alias(modname .. ":slab_" .. origname .. "_wall", newmod..":slab_" .. newname .. "_wall")
|
remap("slab", "_wall")
|
||||||
minetest.register_alias(modname .. ":slab_" .. origname .. "_quarter", newmod..":slab_" .. newname .. "_quarter")
|
remap("slab", "_quarter")
|
||||||
minetest.register_alias(modname .. ":slab_" .. origname .. "_quarter_inverted", newmod..":slab_" .. newname .. "_quarter_inverted")
|
remap("slab", "_quarter_inverted")
|
||||||
minetest.register_alias(modname .. ":slab_" .. origname .. "_quarter_wall", newmod..":slab_" .. newname .. "_quarter_wall")
|
remap("slab", "_quarter_wall")
|
||||||
minetest.register_alias(modname .. ":slab_" .. origname .. "_three_quarter", newmod..":slab_" .. newname .. "_three_quarter")
|
remap("slab", "_three_quarter")
|
||||||
minetest.register_alias(modname .. ":slab_" .. origname .. "_three_quarter_inverted", newmod..":slab_" .. newname .. "_three_quarter_inverted")
|
remap("slab", "_three_quarter_inverted")
|
||||||
minetest.register_alias(modname .. ":slab_" .. origname .. "_three_quarter_wall", newmod..":slab_" .. newname .. "_three_quarter_wall")
|
remap("slab", "_three_quarter_wall")
|
||||||
minetest.register_alias(modname .. ":stair_" .. origname, newmod..":stair_" .. newname)
|
|
||||||
minetest.register_alias(modname .. ":stair_" .. origname .. "_inverted", newmod..":stair_" .. newname .. "_inverted")
|
-- Stairs
|
||||||
minetest.register_alias(modname .. ":stair_" .. origname .. "_wall", newmod..":stair_" .. newname .. "_wall")
|
remap("stair", "")
|
||||||
minetest.register_alias(modname .. ":stair_" .. origname .. "_wall_half", newmod..":stair_" .. newname .. "_wall_half")
|
remap("stair", "_inverted")
|
||||||
minetest.register_alias(modname .. ":stair_" .. origname .. "_wall_half_inverted", newmod..":stair_" .. newname .. "_wall_half_inverted")
|
remap("stair", "_wall")
|
||||||
minetest.register_alias(modname .. ":stair_" .. origname .. "_half", newmod..":stair_" .. newname .. "_half")
|
remap("stair", "_wall_half")
|
||||||
minetest.register_alias(modname .. ":stair_" .. origname .. "_half_inverted", newmod..":stair_" .. newname .. "_half_inverted")
|
remap("stair", "_wall_half_inverted")
|
||||||
minetest.register_alias(modname .. ":stair_" .. origname .. "_right_half", newmod..":stair_" .. newname .. "_right_half")
|
remap("stair", "_half")
|
||||||
minetest.register_alias(modname .. ":stair_" .. origname .. "_right_half_inverted", newmod..":stair_" .. newname .. "_right_half_inverted")
|
remap("stair", "_half_inverted")
|
||||||
minetest.register_alias(modname .. ":stair_" .. origname .. "_wall_half", newmod..":stair_" .. newname .. "_wall_half")
|
remap("stair", "_right_half")
|
||||||
minetest.register_alias(modname .. ":stair_" .. origname .. "_wall_half_inverted", newmod..":stair_" .. newname .. "_wall_half_inverted")
|
remap("stair", "_right_half_inverted")
|
||||||
minetest.register_alias(modname .. ":stair_" .. origname .. "_inner", newmod..":stair_" .. newname .. "_inner")
|
remap("stair", "_inner")
|
||||||
minetest.register_alias(modname .. ":stair_" .. origname .. "_inner_inverted", newmod..":stair_" .. newname .. "_inner_inverted")
|
remap("stair", "_inner_inverted")
|
||||||
minetest.register_alias(modname .. ":stair_" .. origname .. "_outer", newmod..":stair_" .. newname .. "_outer")
|
remap("stair", "_outer")
|
||||||
minetest.register_alias(modname .. ":stair_" .. origname .. "_outer_inverted", newmod..":stair_" .. newname .. "_outer_inverted")
|
remap("stair", "_outer_inverted")
|
||||||
minetest.register_alias(modname .. ":panel_" .. origname .. "_bottom", newmod..":panel_" .. newname .. "_bottom")
|
|
||||||
minetest.register_alias(modname .. ":panel_" .. origname .. "_top", newmod..":panel_" .. newname .. "_top")
|
-- Other
|
||||||
minetest.register_alias(modname .. ":panel_" .. origname .. "_vertical", newmod..":panel_" .. newname .. "_vertical")
|
remap("panel", "_bottom")
|
||||||
minetest.register_alias(modname .. ":micro_" .. origname .. "_bottom", newmod..":micro_" .. newname .. "_bottom")
|
remap("panel", "_top")
|
||||||
minetest.register_alias(modname .. ":micro_" .. origname .. "_top", newmod..":micro_" .. newname .. "_top")
|
remap("panel", "_vertical")
|
||||||
|
remap("micro", "_bottom")
|
||||||
|
remap("micro", "_top")
|
||||||
end
|
end
|
||||||
|
|
||||||
register_technic_stairs_alias("stairsplus", "concrete", "technic", "concrete")
|
register_technic_stairs_alias("stairsplus", "concrete", "technic", "concrete")
|
||||||
@ -103,7 +114,7 @@ if minetest.get_modpath("moreblocks") then
|
|||||||
end
|
end
|
||||||
|
|
||||||
local iclip_def = {
|
local iclip_def = {
|
||||||
description = "Insulator/cable clip",
|
description = S("Insulator/cable clip"),
|
||||||
drawtype = "mesh",
|
drawtype = "mesh",
|
||||||
mesh = "technic_insulator_clip.obj",
|
mesh = "technic_insulator_clip.obj",
|
||||||
tiles = {"technic_insulator_clip.png"},
|
tiles = {"technic_insulator_clip.png"},
|
||||||
@ -113,7 +124,7 @@ local iclip_def = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
local iclipfence_def = {
|
local iclipfence_def = {
|
||||||
description = "Insulator/cable clip",
|
description = S("Insulator/cable clip"),
|
||||||
tiles = {"technic_insulator_clip.png"},
|
tiles = {"technic_insulator_clip.png"},
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
@ -146,23 +157,58 @@ local iclipfence_def = {
|
|||||||
sounds = default.node_sound_stone_defaults(),
|
sounds = default.node_sound_stone_defaults(),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
local sclip_tex = {
|
||||||
|
"technic_insulator_clip.png",
|
||||||
|
{ name = "strut.png^technic_steel_strut_overlay.png", color = "white" },
|
||||||
|
{ name = "strut.png", color = "white" }
|
||||||
|
}
|
||||||
|
|
||||||
|
local streetsmod = minetest.get_modpath("streets") or minetest.get_modpath ("steelsupport")
|
||||||
|
-- cheapie's fork breaks it into several individual mods, with differernt names for the same content.
|
||||||
|
|
||||||
|
if streetsmod then
|
||||||
|
sclip_tex = {
|
||||||
|
"technic_insulator_clip.png",
|
||||||
|
{ name = "streets_support.png^technic_steel_strut_overlay.png", color = "white" },
|
||||||
|
{ name = "streets_support.png", color = "white" }
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
local sclip_def = {
|
||||||
|
description = S("Steel strut with insulator/cable clip"),
|
||||||
|
drawtype = "mesh",
|
||||||
|
mesh = "technic_steel_strut_with_insulator_clip.obj",
|
||||||
|
tiles = sclip_tex,
|
||||||
|
paramtype = "light",
|
||||||
|
paramtype2 = "wallmounted",
|
||||||
|
is_ground_content = false,
|
||||||
|
sounds = default.node_sound_stone_defaults(),
|
||||||
|
groups = { choppy=1, cracky=1 },
|
||||||
|
backface_culling = false
|
||||||
|
}
|
||||||
|
|
||||||
if minetest.get_modpath("unifieddyes") then
|
if minetest.get_modpath("unifieddyes") then
|
||||||
iclip_def.paramtype2 = "colorwallmounted"
|
iclip_def.paramtype2 = "colorwallmounted"
|
||||||
iclip_def.palette = "unifieddyes_palette_colorwallmounted.png"
|
iclip_def.palette = "unifieddyes_palette_colorwallmounted.png"
|
||||||
iclip_def.after_place_node = function(pos, placer, itemstack, pointed_thing)
|
iclip_def.after_place_node = function(pos, placer, itemstack, pointed_thing)
|
||||||
unifieddyes.fix_rotation(pos, placer, itemstack, pointed_thing)
|
unifieddyes.fix_rotation(pos, placer, itemstack, pointed_thing)
|
||||||
unifieddyes.recolor_on_place(pos, placer, itemstack, pointed_thing)
|
|
||||||
end
|
end
|
||||||
iclip_def.after_dig_node = unifieddyes.after_dig_node
|
|
||||||
iclip_def.groups = {choppy=1, snappy=1, oddly_breakable_by_hand=1, ud_param2_colorable = 1}
|
iclip_def.groups = {choppy=1, snappy=1, oddly_breakable_by_hand=1, ud_param2_colorable = 1}
|
||||||
|
iclip_def.on_dig = unifieddyes.on_dig
|
||||||
|
|
||||||
iclipfence_def.paramtype2 = "color"
|
iclipfence_def.paramtype2 = "color"
|
||||||
iclipfence_def.palette = "unifieddyes_palette_extended.png"
|
iclipfence_def.palette = "unifieddyes_palette_extended.png"
|
||||||
iclipfence_def.on_construct = unifieddyes.on_construct
|
iclipfence_def.on_construct = unifieddyes.on_construct
|
||||||
iclipfence_def.after_place_node = unifieddyes.recolor_on_place
|
|
||||||
iclipfence_def.after_dig_node = unifieddyes.after_dig_node
|
|
||||||
iclipfence_def.groups = {fence=1, choppy=1, snappy=1, oddly_breakable_by_hand=1, ud_param2_colorable = 1}
|
iclipfence_def.groups = {fence=1, choppy=1, snappy=1, oddly_breakable_by_hand=1, ud_param2_colorable = 1}
|
||||||
iclipfence_def.place_param2 = 171 -- medium amber, low saturation, closest color to default:wood
|
iclipfence_def.on_dig = unifieddyes.on_dig
|
||||||
|
|
||||||
|
sclip_def.paramtype2 = "colorwallmounted"
|
||||||
|
sclip_def.palette = "unifieddyes_palette_colorwallmounted.png"
|
||||||
|
sclip_def.after_place_node = function(pos, placer, itemstack, pointed_thing)
|
||||||
|
unifieddyes.fix_rotation(pos, placer, itemstack, pointed_thing)
|
||||||
|
end
|
||||||
|
sclip_def.on_dig = unifieddyes.on_dig
|
||||||
|
sclip_def.groups = {choppy=1, cracky=1, ud_param2_colorable = 1}
|
||||||
end
|
end
|
||||||
|
|
||||||
minetest.register_node(":technic:insulator_clip", iclip_def)
|
minetest.register_node(":technic:insulator_clip", iclip_def)
|
||||||
@ -185,3 +231,96 @@ minetest.register_craft({
|
|||||||
{ "technic:raw_latex", "default:fence_wood", "technic:raw_latex"},
|
{ "technic:raw_latex", "default:fence_wood", "technic:raw_latex"},
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
local steelmod = minetest.get_modpath("steel")
|
||||||
|
|
||||||
|
if streetsmod or steelmod then
|
||||||
|
minetest.register_node(":technic:steel_strut_with_insulator_clip", sclip_def)
|
||||||
|
|
||||||
|
if steelmod then
|
||||||
|
minetest.register_craft({
|
||||||
|
output = "technic:steel_strut_with_insulator_clip",
|
||||||
|
recipe = {
|
||||||
|
{"technic:insulator_clip_fencepost"},
|
||||||
|
{"steel:strut_mount"}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = "technic:steel_strut_with_insulator_clip",
|
||||||
|
recipe = {
|
||||||
|
{"technic:insulator_clip_fencepost", "" },
|
||||||
|
{"steel:strut", "default:steel_ingot" },
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
elseif streetsmod then
|
||||||
|
minetest.register_craft({
|
||||||
|
output = "technic:steel_strut_with_insulator_clip",
|
||||||
|
recipe = {
|
||||||
|
{"technic:insulator_clip_fencepost", "" },
|
||||||
|
{"streets:steel_support", "default:steel_ingot" },
|
||||||
|
}
|
||||||
|
})
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if minetest.get_modpath("unifieddyes") then
|
||||||
|
|
||||||
|
unifieddyes.register_color_craft({
|
||||||
|
output = "technic:insulator_clip_fencepost",
|
||||||
|
palette = "extended",
|
||||||
|
type = "shapeless",
|
||||||
|
neutral_node = "technic:insulator_clip_fencepost",
|
||||||
|
recipe = {
|
||||||
|
"NEUTRAL_NODE",
|
||||||
|
"MAIN_DYE"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
unifieddyes.register_color_craft({
|
||||||
|
output = "technic:insulator_clip",
|
||||||
|
palette = "wallmounted",
|
||||||
|
type = "shapeless",
|
||||||
|
neutral_node = "technic:insulator_clip",
|
||||||
|
recipe = {
|
||||||
|
"NEUTRAL_NODE",
|
||||||
|
"MAIN_DYE"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
unifieddyes.register_color_craft({
|
||||||
|
output = "technic:steel_strut_with_insulator_clip",
|
||||||
|
palette = "wallmounted",
|
||||||
|
type = "shapeless",
|
||||||
|
neutral_node = "",
|
||||||
|
recipe = {
|
||||||
|
"technic:steel_strut_with_insulator_clip",
|
||||||
|
"MAIN_DYE"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
if steelmod then
|
||||||
|
unifieddyes.register_color_craft({
|
||||||
|
output = "technic:steel_strut_with_insulator_clip",
|
||||||
|
palette = "wallmounted",
|
||||||
|
neutral_node = "",
|
||||||
|
recipe = {
|
||||||
|
{ "technic:insulator_clip_fencepost", "MAIN_DYE" },
|
||||||
|
{ "steel:strut_mount", "" },
|
||||||
|
}
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
if streetsmod then
|
||||||
|
unifieddyes.register_color_craft({
|
||||||
|
output = "technic:steel_strut_with_insulator_clip",
|
||||||
|
palette = "wallmounted",
|
||||||
|
neutral_node = "technic:steel_strut_with_insulator_clip",
|
||||||
|
recipe = {
|
||||||
|
{ "technic:insulator_clip_fencepost", "MAIN_DYE" },
|
||||||
|
{ "streets:steel_support", "default:steel_ingot" },
|
||||||
|
}
|
||||||
|
})
|
||||||
|
end
|
||||||
|
end
|
||||||
|
7
extranodes/locale/fr.txt
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
# technic_extranodes translation template
|
||||||
|
|
||||||
|
Marble = Marbre
|
||||||
|
Marble Bricks = Briques en marbre
|
||||||
|
Granite = Granite
|
||||||
|
Concrete = Béton
|
||||||
|
|
8
extranodes/locale/ja.txt
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
# technic_extranodes japanese translation
|
||||||
|
# technic_extranodesの日本語への翻訳
|
||||||
|
# by damiemk
|
||||||
|
|
||||||
|
Marble = 大理石
|
||||||
|
Marble Bricks = 大理石のレンガ
|
||||||
|
Granite = 花崗岩
|
||||||
|
Concrete = コンクリート
|
9
extranodes/locale/pl.txt
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
# Polish Translation for technic_extranodes
|
||||||
|
# Polskie tłumaczenie technic_extranodes
|
||||||
|
# by mat9117
|
||||||
|
|
||||||
|
Marble = Marmur
|
||||||
|
Marble Bricks = Marmurowe cegły
|
||||||
|
Granite = Granit
|
||||||
|
Concrete = Beton
|
||||||
|
|
9
extranodes/locale/pt_BR.txt
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
# Braziliam portuguese translation for technic_extranodes
|
||||||
|
# Tradução portuguesa brasileira para technic_extranodes
|
||||||
|
# By Sires
|
||||||
|
|
||||||
|
Marble = Mármore
|
||||||
|
Marble Bricks = Tijolos de Mármore
|
||||||
|
Granite = Granito
|
||||||
|
Concrete = Concreto
|
||||||
|
|
3
extranodes/mod.conf
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
name = extranodes
|
||||||
|
depends = default, technic_worldgen, basic_materials, concrete
|
||||||
|
optional_depends = unifieddyes, intllib, moreblocks, steel, streetsmod
|
246
extranodes/models/technic_steel_strut_with_insulator_clip.obj
Normal file
@ -0,0 +1,246 @@
|
|||||||
|
# Blender v2.79 (sub 0) OBJ File: 'technic steel strut with insulator clip.blend'
|
||||||
|
# www.blender.org
|
||||||
|
o Cube_Cube_Material.001
|
||||||
|
v -0.375000 0.500532 -0.250000
|
||||||
|
v -0.249997 0.562500 -0.249997
|
||||||
|
v 0.249997 0.562500 -0.249997
|
||||||
|
v 0.375000 0.500532 -0.250000
|
||||||
|
v 0.249997 0.562500 0.249997
|
||||||
|
v 0.375000 0.500532 0.250000
|
||||||
|
v -0.249997 0.562500 0.249997
|
||||||
|
v -0.375000 0.500532 0.250000
|
||||||
|
v 0.187500 0.562500 -0.187500
|
||||||
|
v -0.168668 0.718750 0.168668
|
||||||
|
v 0.168668 0.718750 0.168668
|
||||||
|
v 0.187500 0.750000 0.187500
|
||||||
|
v -0.187500 0.750000 0.187500
|
||||||
|
v 0.168668 0.718750 -0.168668
|
||||||
|
v 0.187500 0.750000 -0.187500
|
||||||
|
v -0.168668 0.718750 -0.168668
|
||||||
|
v -0.187500 0.750000 -0.187500
|
||||||
|
v 0.250000 0.750000 -0.250000
|
||||||
|
v 0.250000 0.750000 0.250000
|
||||||
|
v -0.250000 0.750000 -0.250000
|
||||||
|
v -0.250000 1.250000 -0.250000
|
||||||
|
v 0.250000 1.250000 -0.250000
|
||||||
|
v 0.250000 1.250000 0.250000
|
||||||
|
v -0.250000 1.250000 0.250000
|
||||||
|
v -0.250000 0.750000 0.250000
|
||||||
|
v -0.168668 0.593750 0.168668
|
||||||
|
v 0.168668 0.593750 0.168668
|
||||||
|
v 0.187500 0.625000 0.187500
|
||||||
|
v -0.187500 0.625000 0.187500
|
||||||
|
v 0.168668 0.593750 -0.168668
|
||||||
|
v 0.187500 0.625000 -0.187500
|
||||||
|
v -0.168668 0.593750 -0.168668
|
||||||
|
v -0.187500 0.625000 -0.187500
|
||||||
|
v -0.168668 0.656250 0.168668
|
||||||
|
v 0.168668 0.656250 0.168668
|
||||||
|
v 0.187500 0.687500 0.187500
|
||||||
|
v -0.187500 0.687500 0.187500
|
||||||
|
v 0.168668 0.656250 -0.168668
|
||||||
|
v 0.187500 0.687500 -0.187500
|
||||||
|
v -0.168668 0.656250 -0.168668
|
||||||
|
v -0.187500 0.687500 -0.187500
|
||||||
|
v 0.187500 0.562500 0.187500
|
||||||
|
v -0.187500 0.562500 0.187500
|
||||||
|
v -0.187500 0.562500 -0.187500
|
||||||
|
v -0.499468 -0.499468 -0.499468
|
||||||
|
v -0.499468 0.500000 -0.499468
|
||||||
|
v 0.499468 -0.499468 -0.499468
|
||||||
|
v -0.499468 -0.499468 0.499468
|
||||||
|
v -0.499468 0.500000 0.499468
|
||||||
|
v 0.499468 -0.499468 0.499468
|
||||||
|
v 0.499468 0.500000 -0.499468
|
||||||
|
v 0.499468 0.500000 0.499468
|
||||||
|
vt 1.000000 0.875000
|
||||||
|
vt 0.937500 0.750000
|
||||||
|
vt 0.937500 0.250000
|
||||||
|
vt 1.000000 0.125000
|
||||||
|
vt 0.250000 0.875000
|
||||||
|
vt 0.250000 0.750000
|
||||||
|
vt 0.750000 0.750000
|
||||||
|
vt 0.750000 0.875000
|
||||||
|
vt 0.000000 0.125000
|
||||||
|
vt 0.062500 0.250000
|
||||||
|
vt 0.062500 0.750000
|
||||||
|
vt 0.000000 0.875000
|
||||||
|
vt 0.750000 0.250000
|
||||||
|
vt 0.687500 0.687500
|
||||||
|
vt 0.687500 0.312500
|
||||||
|
vt 0.312500 0.687500
|
||||||
|
vt 0.250000 0.250000
|
||||||
|
vt 0.312500 0.312500
|
||||||
|
vt 0.331332 1.218750
|
||||||
|
vt 0.668668 1.218750
|
||||||
|
vt 0.687500 1.250000
|
||||||
|
vt 0.312500 1.250000
|
||||||
|
vt 0.531250 0.666667
|
||||||
|
vt 0.531250 0.333333
|
||||||
|
vt 0.500000 0.312500
|
||||||
|
vt 0.500000 0.687500
|
||||||
|
vt 0.531250 0.333333
|
||||||
|
vt 0.531250 0.666667
|
||||||
|
vt 0.500000 0.687500
|
||||||
|
vt 0.500000 0.312500
|
||||||
|
vt 0.331332 1.218750
|
||||||
|
vt 0.668668 1.218750
|
||||||
|
vt 0.687500 1.250000
|
||||||
|
vt 0.312500 1.250000
|
||||||
|
vt 0.687500 0.312500
|
||||||
|
vt 0.750000 0.250000
|
||||||
|
vt 0.750000 0.750000
|
||||||
|
vt 0.687500 0.687500
|
||||||
|
vt 0.500000 0.250000
|
||||||
|
vt 0.500000 0.750000
|
||||||
|
vt 0.000000 0.750000
|
||||||
|
vt 0.000000 0.250000
|
||||||
|
vt 0.500000 0.250000
|
||||||
|
vt 0.000000 0.250000
|
||||||
|
vt 0.000000 0.750000
|
||||||
|
vt 0.500000 0.750000
|
||||||
|
vt 0.500000 0.250000
|
||||||
|
vt 0.500000 0.750000
|
||||||
|
vt 0.000000 0.750000
|
||||||
|
vt 0.000000 0.250000
|
||||||
|
vt 0.000000 0.250000
|
||||||
|
vt 0.500000 0.750000
|
||||||
|
vt 0.250000 0.250000
|
||||||
|
vt 0.750000 0.250000
|
||||||
|
vt 0.750000 0.750000
|
||||||
|
vt 0.250000 0.750000
|
||||||
|
vt 0.250000 0.750000
|
||||||
|
vt 0.312500 0.687500
|
||||||
|
vt 0.250000 0.250000
|
||||||
|
vt 0.312500 0.312500
|
||||||
|
vt 0.250000 0.125000
|
||||||
|
vt 0.750000 0.125000
|
||||||
|
vt 0.331332 1.093750
|
||||||
|
vt 0.668668 1.093750
|
||||||
|
vt 0.687500 1.125000
|
||||||
|
vt 0.312500 1.125000
|
||||||
|
vt 0.656250 0.666667
|
||||||
|
vt 0.656250 0.333333
|
||||||
|
vt 0.625000 0.312500
|
||||||
|
vt 0.625000 0.687500
|
||||||
|
vt 0.656250 0.333333
|
||||||
|
vt 0.656250 0.666667
|
||||||
|
vt 0.625000 0.687500
|
||||||
|
vt 0.625000 0.312500
|
||||||
|
vt 0.331332 1.093750
|
||||||
|
vt 0.668668 1.093750
|
||||||
|
vt 0.687500 1.125000
|
||||||
|
vt 0.312500 1.125000
|
||||||
|
vt 0.331332 1.156250
|
||||||
|
vt 0.668668 1.156250
|
||||||
|
vt 0.687500 1.187500
|
||||||
|
vt 0.312500 1.187500
|
||||||
|
vt 0.593750 0.666667
|
||||||
|
vt 0.593750 0.333333
|
||||||
|
vt 0.562500 0.312500
|
||||||
|
vt 0.562500 0.687500
|
||||||
|
vt 0.593750 0.333333
|
||||||
|
vt 0.593750 0.666667
|
||||||
|
vt 0.562500 0.687500
|
||||||
|
vt 0.562500 0.312500
|
||||||
|
vt 0.331332 1.156250
|
||||||
|
vt 0.668668 1.156250
|
||||||
|
vt 0.687500 1.187500
|
||||||
|
vt 0.312500 1.187500
|
||||||
|
vt 0.312500 1.062500
|
||||||
|
vt 0.687500 1.062500
|
||||||
|
vt 0.687500 0.312500
|
||||||
|
vt 0.687500 0.312500
|
||||||
|
vt 0.687500 0.687500
|
||||||
|
vt 0.312500 1.062500
|
||||||
|
vt 0.687500 1.062500
|
||||||
|
vt 0.000000 0.750000
|
||||||
|
vt 0.000000 0.250000
|
||||||
|
vt 1.000000 0.250000
|
||||||
|
vt 1.000000 0.750000
|
||||||
|
vt 1.000000 1.000000
|
||||||
|
vt -0.000000 1.000000
|
||||||
|
vt 0.000000 -0.000000
|
||||||
|
vt 1.000000 -0.000000
|
||||||
|
vt 1.000000 1.000000
|
||||||
|
vt -0.000000 1.000000
|
||||||
|
vt 0.000000 -0.000000
|
||||||
|
vt 1.000000 -0.000000
|
||||||
|
vt 0.000000 1.000000
|
||||||
|
vt 0.000000 0.000000
|
||||||
|
vt 1.000000 0.000000
|
||||||
|
vt 1.000000 1.000000
|
||||||
|
vt 1.000000 -0.000000
|
||||||
|
vt 1.000000 1.000000
|
||||||
|
vt 1.000000 1.000000
|
||||||
|
vt 0.000000 0.000000
|
||||||
|
vt -0.000000 0.000000
|
||||||
|
vn 0.0000 0.0000 -1.0000
|
||||||
|
vn 0.4442 0.8960 -0.0000
|
||||||
|
vn 0.0000 0.0000 1.0000
|
||||||
|
vn 0.0000 1.0000 -0.0000
|
||||||
|
vn 0.0000 -0.5161 0.8565
|
||||||
|
vn 0.8565 -0.5161 0.0000
|
||||||
|
vn -0.8565 -0.5161 0.0000
|
||||||
|
vn 0.0000 -0.5161 -0.8565
|
||||||
|
vn -0.0000 -1.0000 -0.0000
|
||||||
|
vn 1.0000 -0.0000 0.0000
|
||||||
|
vn -1.0000 0.0000 -0.0000
|
||||||
|
vn -0.4442 0.8960 -0.0000
|
||||||
|
vn -0.0000 0.5161 0.8565
|
||||||
|
vn 0.8565 0.5161 -0.0000
|
||||||
|
vn -0.8565 0.5161 -0.0000
|
||||||
|
vn 0.0000 0.5161 -0.8565
|
||||||
|
g Cube_Cube_Material.001_Cube_Cube_Material.001_clip
|
||||||
|
s 1
|
||||||
|
f 1/1/1 2/2/1 3/3/1 4/4/1
|
||||||
|
f 4/5/2 3/6/2 5/7/2 6/8/2
|
||||||
|
f 6/9/3 5/10/3 7/11/3 8/12/3
|
||||||
|
f 7/13/4 5/7/4 42/14/4 43/15/4
|
||||||
|
f 5/7/4 3/6/4 9/16/4 42/14/4
|
||||||
|
f 2/17/4 7/13/4 43/15/4 44/18/4
|
||||||
|
f 3/6/4 2/17/4 44/18/4 9/16/4
|
||||||
|
f 10/19/5 11/20/5 12/21/5 13/22/5
|
||||||
|
f 11/23/6 14/24/6 15/25/6 12/26/6
|
||||||
|
f 16/27/7 10/28/7 13/29/7 17/30/7
|
||||||
|
f 14/31/8 16/32/8 17/33/8 15/34/8
|
||||||
|
f 15/35/9 18/36/9 19/37/9 12/38/9
|
||||||
|
f 20/39/1 21/40/1 22/41/1 18/42/1
|
||||||
|
f 18/43/10 22/44/10 23/45/10 19/46/10
|
||||||
|
f 19/47/3 23/48/3 24/49/3 25/50/3
|
||||||
|
f 21/51/11 20/39/11 25/52/11 24/49/11
|
||||||
|
f 21/53/4 24/54/4 23/55/4 22/56/4
|
||||||
|
f 12/38/9 19/37/9 25/57/9 13/58/9
|
||||||
|
f 13/58/9 25/57/9 20/59/9 17/60/9
|
||||||
|
f 17/60/9 20/59/9 18/36/9 15/35/9
|
||||||
|
f 2/17/12 1/61/12 8/62/12 7/13/12
|
||||||
|
f 26/63/5 27/64/5 28/65/5 29/66/5
|
||||||
|
f 27/67/6 30/68/6 31/69/6 28/70/6
|
||||||
|
f 32/71/7 26/72/7 29/73/7 33/74/7
|
||||||
|
f 30/75/8 32/76/8 33/77/8 31/78/8
|
||||||
|
f 34/79/5 35/80/5 36/81/5 37/82/5
|
||||||
|
f 35/83/6 38/84/6 39/85/6 36/86/6
|
||||||
|
f 40/87/7 34/88/7 37/89/7 41/90/7
|
||||||
|
f 38/91/8 40/92/8 41/93/8 39/94/8
|
||||||
|
f 37/82/13 36/81/13 11/20/13 10/19/13
|
||||||
|
f 36/86/14 39/85/14 14/24/14 11/23/14
|
||||||
|
f 41/90/15 37/89/15 10/28/15 16/27/15
|
||||||
|
f 39/94/16 41/93/16 16/32/16 14/31/16
|
||||||
|
f 43/95/13 42/96/13 27/64/13 26/63/13
|
||||||
|
f 42/14/14 9/97/14 30/68/14 27/67/14
|
||||||
|
f 44/98/15 43/99/15 26/72/15 32/71/15
|
||||||
|
f 9/100/16 44/101/16 32/76/16 30/75/16
|
||||||
|
f 29/66/13 28/65/13 35/80/13 34/79/13
|
||||||
|
f 28/70/14 31/69/14 38/84/14 35/83/14
|
||||||
|
f 33/74/15 29/73/15 34/88/15 40/87/15
|
||||||
|
f 31/78/16 33/77/16 40/92/16 38/91/16
|
||||||
|
f 8/102/9 1/103/9 4/104/9 6/105/9
|
||||||
|
g Cube_Cube_Material.001_Cube_Cube_Material.001_sides_with_band
|
||||||
|
s off
|
||||||
|
f 47/106/10 51/107/10 52/108/10 50/109/10
|
||||||
|
f 48/110/11 49/111/11 46/112/11 45/113/11
|
||||||
|
f 47/114/9 50/115/9 48/116/9 45/117/9
|
||||||
|
f 51/118/4 46/112/4 49/111/4 52/119/4
|
||||||
|
g Cube_Cube_Material.001_Cube_Cube_Material.001_sides_without_band
|
||||||
|
f 45/113/1 46/120/1 51/107/1 47/121/1
|
||||||
|
f 50/109/3 52/119/3 49/111/3 48/122/3
|
Before Width: | Height: | Size: 226 B After Width: | Height: | Size: 202 B |
BIN
extranodes/textures/technic_steel_strut_overlay.png
Normal file
After Width: | Height: | Size: 103 B |
674
manual.md
@ -1,352 +1,241 @@
|
|||||||
Minetest technic modpack user manual
|
# Technic User Manual
|
||||||
====================================
|
|
||||||
|
|
||||||
The technic modpack extends the Minetest game with many new elements,
|
The technic modpack extends Minetest Game (shipped with Minetest by default)
|
||||||
mainly constructable machines and tools. It is a large modpack, and
|
with many new elements, mainly constructable machines and tools. This manual
|
||||||
tends to dominate gameplay when it is used. This manual describes how
|
describes how to use the modpack, mainly from a player's perspective.
|
||||||
to use the technic modpack, mainly from a player's perspective.
|
|
||||||
|
|
||||||
The technic modpack depends on some other modpacks:
|
Documentation of the mod dependencies can be found here:
|
||||||
|
|
||||||
* the basic Minetest game
|
|
||||||
* mesecons, which supports the construction of logic systems based on
|
|
||||||
signalling elements
|
|
||||||
* pipeworks, which supports the automation of item transport
|
|
||||||
* moreores, which provides some additional ore types
|
|
||||||
|
|
||||||
This manual doesn't explain how to use these other modpacks, which have
|
|
||||||
their own manuals:
|
|
||||||
|
|
||||||
* [Minetest Game Documentation](https://wiki.minetest.net/Main_Page)
|
* [Minetest Game Documentation](https://wiki.minetest.net/Main_Page)
|
||||||
* [Mesecons Documentation](http://mesecons.net/items.html)
|
* [Mesecons Documentation](http://mesecons.net/items.html)
|
||||||
* [Pipeworks Documentation](https://github.com/minetest-mods/pipeworks/wiki)
|
* [Pipeworks Documentation](https://github.com/mt-mods/pipeworks/wiki/)
|
||||||
* [Moreores Forum Post](https://forum.minetest.net/viewtopic.php?t=549)
|
* [Moreores Forum Post](https://forum.minetest.net/viewtopic.php?t=549)
|
||||||
|
* [Basic materials Repository](https://gitlab.com/VanessaE/basic_materials)
|
||||||
|
|
||||||
Recipes for constructable items in technic are generally not guessable,
|
## 1.0 Recipes
|
||||||
and are also not specifically documented here. You should use a
|
|
||||||
craft guide mod to look up the recipes in-game. For the best possible
|
|
||||||
guidance, use the unified\_inventory mod, with which technic registers
|
|
||||||
its specialised recipe types.
|
|
||||||
|
|
||||||
substances
|
Recipes for items registered by technic are not specifically documented here.
|
||||||
----------
|
Please consult a craft guide mod to look up the recipes in-game.
|
||||||
|
|
||||||
### ore ###
|
**Recommended mod:** [Unified Inventory](https://github.com/minetest-mods/unified_inventory)
|
||||||
|
|
||||||
The technic mod makes extensive use of not just the default ores but also
|
## 2.0 Substances
|
||||||
some that are added by mods. You will need to mine for all the ore types
|
|
||||||
in the course of the game. Each ore type is found at a specific range of
|
|
||||||
elevations, and while the ranges mostly overlap, some have non-overlapping
|
|
||||||
ranges, so you will ultimately need to mine at more than one elevation
|
|
||||||
to find all the ores. Also, because one of the best elevations to mine
|
|
||||||
at is very deep, you will be unable to mine there early in the game.
|
|
||||||
|
|
||||||
Elevation is measured in meters, relative to a reference plane that
|
### 2.1 Ores
|
||||||
is not quite sea level. (The standard sea level is at an elevation
|
|
||||||
of about +1.4.) Positive elevations are above the reference plane and
|
|
||||||
negative elevations below. Because elevations are always described this
|
|
||||||
way round, greater numbers when higher, we avoid the word "depth".
|
|
||||||
|
|
||||||
The ores that matter in technic are coal, iron, copper, tin, zinc,
|
Technic registers a few ores which are needed to craft machines or items.
|
||||||
chromium, uranium, silver, gold, mithril, mese, and diamond.
|
Each ore type is found at a specific range of elevations so you will
|
||||||
|
ultimately need to mine at more than one elevation to find all the ores.
|
||||||
|
|
||||||
Coal is part of the basic Minetest game. It is found from elevation
|
Elevation (Y axis) is measured in meters. The reference is usually at sea
|
||||||
+64 downwards, so is available right on the surface at the start of
|
level. Ores can generally be found more commonly by going downwards to -1000m.
|
||||||
the game, but it is far less abundant above elevation 0 than below.
|
|
||||||
It is initially used as a fuel, driving important machines in the early
|
|
||||||
part of the game. It becomes less important as a fuel once most of your
|
|
||||||
machines are electrically powered, but burning fuel remains a way to
|
|
||||||
generate electrical power. Coal is also used, usually in dust form, as
|
|
||||||
an ingredient in alloying recipes, wherever elemental carbon is required.
|
|
||||||
|
|
||||||
Iron is part of the basic Minetest game. It is found from elevation
|
Note ¹: *These ores are provided by Minetest Game. See [Ores](https://wiki.minetest.net/Ores#Ores_overview) for a rough overview*
|
||||||
+2 downwards, and its abundance increases in stages as one descends,
|
|
||||||
reaching its maximum from elevation -64 downwards. It is a common metal,
|
|
||||||
used frequently as a structural component. In technic, unlike the basic
|
|
||||||
game, iron is used in multiple forms, mainly alloys based on iron and
|
|
||||||
including carbon (coal).
|
|
||||||
|
|
||||||
Copper is part of the basic Minetest game (having migrated there from
|
Note ²: *These ores are provided by moreores. TODO: Add reference link*
|
||||||
moreores). It is found from elevation -16 downwards, but is more abundant
|
|
||||||
from elevation -64 downwards. It is a common metal, used either on its
|
#### Chromium
|
||||||
own for its electrical conductivity, or as the base component of alloys.
|
Use: stainless steel
|
||||||
|
|
||||||
|
Generated below: -100m, more commonly below -200m
|
||||||
|
|
||||||
|
#### Coal ¹
|
||||||
|
Use: Fuel, alloy as carbon
|
||||||
|
|
||||||
|
Burning coal is a way to generate electrical power. Coal is also used,
|
||||||
|
usually in dust form, as an ingredient in alloying recipes, wherever
|
||||||
|
elemental carbon is required.
|
||||||
|
|
||||||
|
#### Copper ¹
|
||||||
|
Copper is a common metal, used either on its own for its electrical
|
||||||
|
conductivity, or as the base component of alloys.
|
||||||
Although common, it is very heavily used, and most of the time it will
|
Although common, it is very heavily used, and most of the time it will
|
||||||
be the material that most limits your activity.
|
be the material that most limits your activity.
|
||||||
|
|
||||||
Tin is part of the basic Minetest game (having migrated there from
|
#### Diamond ¹
|
||||||
moreores). It is found from elevation +8 downwards, with no
|
Use: mainly for cutting machines
|
||||||
elevation-dependent variations in abundance beyond that point.
|
|
||||||
It is a common metal. Its main use in pure form is as a component
|
|
||||||
of electrical batteries. Apart from that its main purpose is
|
|
||||||
as the secondary ingredient in bronze (the base being copper), but bronze
|
|
||||||
is itself little used. Its abundance is well in excess of its usage,
|
|
||||||
so you will usually have a surplus of it.
|
|
||||||
|
|
||||||
Zinc is supplied by technic. It is found from elevation +2 downwards,
|
Diamond is a precious gemstone. It is used moderately, mainly for reasons
|
||||||
with no elevation-dependent variations in abundance beyond that point.
|
connected to its extreme hardness.
|
||||||
It is a common metal. Its main use is as the secondary ingredient
|
|
||||||
in brass (the base being copper), but brass is itself little used.
|
|
||||||
Its abundance is well in excess of its usage, so you will usually have
|
|
||||||
a surplus of it.
|
|
||||||
|
|
||||||
Chromium is supplied by technic. It is found from elevation -100
|
#### Gold ¹
|
||||||
downwards, with no elevation-dependent variations in abundance beyond
|
Use: various
|
||||||
that point. It is a moderately common metal. Its main use is as the
|
|
||||||
secondary ingredient in stainless steel (the base being iron).
|
|
||||||
|
|
||||||
Uranium is supplied by technic. It is found only from elevation -80 down
|
Generated below: -64m, more commonly below -256m
|
||||||
to -300; using it therefore requires one to mine above elevation -300 even
|
|
||||||
though deeper mining is otherwise more productive. It is a moderately
|
|
||||||
common metal, useful only for reasons related to radioactivity: it forms
|
|
||||||
the fuel for nuclear reactors, and is also one of the best radiation
|
|
||||||
shielding materials available. It is not difficult to find enough uranium
|
|
||||||
ore to satisfy these uses. Beware that the ore is slightly radioactive:
|
|
||||||
it will slightly harm you if you stand as close as possible to it.
|
|
||||||
It is safe when more than a meter away or when mined.
|
|
||||||
|
|
||||||
Silver is supplied by the moreores mod. It is found from elevation -2
|
Gold is a precious metal. It is most notably used in electrical items due to
|
||||||
downwards, with no elevation-dependent variations in abundance beyond
|
its combination of good conductivity and corrosion resistance.
|
||||||
that point. It is a semi-precious metal. It is little used, being most
|
|
||||||
notably used in electrical items due to its conductivity, being the best
|
|
||||||
conductor of all the pure elements.
|
|
||||||
|
|
||||||
Gold is part of the basic Minetest game (having migrated there from
|
#### Iron ¹
|
||||||
moreores). It is found from elevation -64 downwards, but is more
|
Use: multiple, mainly for alloys with carbon (coal).
|
||||||
abundant from elevation -256 downwards. It is a precious metal. It is
|
|
||||||
little used, being most notably used in electrical items due to its
|
|
||||||
combination of good conductivity (third best of all the pure elements)
|
|
||||||
and corrosion resistance.
|
|
||||||
|
|
||||||
Mithril is supplied by the moreores mod. It is found from elevation
|
#### Lead
|
||||||
-512 downwards, the deepest ceiling of any minable substance, with
|
Use: batteries, HV nuclear reactor layout
|
||||||
no elevation-dependent variations in abundance beyond that point.
|
|
||||||
It is a rare precious metal, and unlike all the other metals described
|
Generated below: 16m, more common below -128m
|
||||||
here it is entirely fictional, being derived from J. R. R. Tolkien's
|
|
||||||
|
#### Mese ¹
|
||||||
|
Use: various
|
||||||
|
|
||||||
|
Mese is a precious gemstone, and unlike diamond it is entirely fictional.
|
||||||
|
It is used in small quantities, wherever some magic needs to be imparted.
|
||||||
|
|
||||||
|
#### Mithril ²
|
||||||
|
Use: chests
|
||||||
|
|
||||||
|
Generated below: -512m, evenly common
|
||||||
|
|
||||||
|
Mithril is a fictional ore, being derived from J. R. R. Tolkien's
|
||||||
Middle-Earth setting. It is little used.
|
Middle-Earth setting. It is little used.
|
||||||
|
|
||||||
Mese is part of the basic Minetest game. It is found from elevation
|
#### Silver ²
|
||||||
-64 downwards. The ore is more abundant from elevation -256 downwards,
|
Use: conductors
|
||||||
and from elevation -1024 downwards there are also occasional blocks of
|
|
||||||
solid mese (each yielding as much mese as nine blocks of ore). It is a
|
|
||||||
precious gemstone, and unlike diamond it is entirely fictional. It is
|
|
||||||
used in many recipes, though mainly not in large quantities, wherever
|
|
||||||
some magical quality needs to be imparted.
|
|
||||||
|
|
||||||
Diamond is part of the basic Minetest game (having migrated there from
|
Generated below: -2m, evenly common
|
||||||
technic). It is found from elevation -128 downwards, but is more abundant
|
|
||||||
from elevation -256 downwards. It is a precious gemstone. It is used
|
|
||||||
moderately, mainly for reasons connected to its extreme hardness.
|
|
||||||
|
|
||||||
### rock ###
|
Silver is a semi-precious metal and is the best conductor of all the pure elements.
|
||||||
|
|
||||||
In addition to the ores, there are multiple kinds of rock that need to be
|
#### Tin ¹
|
||||||
mined in their own right, rather than for minerals. The rock types that
|
Use: batteries, bronze
|
||||||
matter in technic are standard stone, desert stone, marble, and granite.
|
|
||||||
|
|
||||||
Standard stone is part of the basic Minetest game. It is extremely
|
Tin is a common metal but is used rarely. Its abundance is well in excess
|
||||||
common. As in the basic game, when dug it yields cobblestone, which can
|
of its usage, so you will usually have a surplus of it.
|
||||||
be cooked to turn it back into standard stone. Cobblestone is used in
|
|
||||||
recipes only for some relatively primitive machines. Standard stone is
|
|
||||||
used in a couple of machine recipes. These rock types gain additional
|
|
||||||
significance with technic because the grinder can be used to turn them
|
|
||||||
into dirt and sand. This, especially when combined with an automated
|
|
||||||
cobblestone generator, can be an easier way to acquire sand than
|
|
||||||
collecting it where it occurs naturally.
|
|
||||||
|
|
||||||
Desert stone is part of the basic Minetest game. It is found specifically
|
#### Uranium
|
||||||
in desert biomes, and only from elevation +2 upwards. Although it is
|
Use: nuclear reactor fuel
|
||||||
easily accessible, therefore, its quantity is ultimately quite limited.
|
|
||||||
It is used in a few recipes.
|
|
||||||
|
|
||||||
Marble is supplied by technic. It is found in dense clusters from
|
Depth: -80m until -300m, more commonly between -100m and -200m
|
||||||
elevation -50 downwards. It has mainly decorative use, but also appears
|
|
||||||
in one machine recipe.
|
|
||||||
|
|
||||||
Granite is supplied by technic. It is found in dense clusters from
|
It is a moderately common metal, useful only for reasons related to radioactivity:
|
||||||
elevation -150 downwards. It is much harder to dig than standard stone,
|
it forms the fuel for nuclear reactors, and is also one of the best radiation
|
||||||
so impedes mining when it is encountered. It has mainly decorative use,
|
shielding materials available.
|
||||||
but also appears in a couple of machine recipes.
|
|
||||||
|
|
||||||
### rubber ###
|
Keep a safety distance of a meter to avoid being harmed by radiation.
|
||||||
|
|
||||||
|
#### Zinc
|
||||||
|
Use: brass
|
||||||
|
|
||||||
|
Generated below: 2m, more commonly below -32m
|
||||||
|
|
||||||
|
Zinc only has a few uses but is a common metal.
|
||||||
|
|
||||||
|
|
||||||
|
### 2.2 Rocks
|
||||||
|
|
||||||
|
This section describes the rock types added by technic. Further rock types
|
||||||
|
are supported by technic machines. These can be processed using the grinder:
|
||||||
|
|
||||||
|
* Stone (plain)
|
||||||
|
* Cobblestone
|
||||||
|
* Desert Stone
|
||||||
|
|
||||||
|
#### Marble
|
||||||
|
Depth: -50m, evenly common
|
||||||
|
|
||||||
|
Marble is found in dense clusters and has mainly decorative use, but also
|
||||||
|
appears in one machine recipe.
|
||||||
|
|
||||||
|
#### Granite
|
||||||
|
Depth: -150m, evenly common
|
||||||
|
|
||||||
|
Granite is found in dense clusters and is much harder to dig than standard
|
||||||
|
stone. It has mainly decorative use, but also appears in a couple of
|
||||||
|
machine recipes.
|
||||||
|
|
||||||
|
#### Sulfur
|
||||||
|
Uses: battery box
|
||||||
|
|
||||||
|
Sulur is generated around some lava patches (caves).
|
||||||
|
|
||||||
|
|
||||||
|
### 2.3 Rubber
|
||||||
Rubber is a biologically-derived material that has industrial uses due
|
Rubber is a biologically-derived material that has industrial uses due
|
||||||
to its electrical resistivity and its impermeability. In technic, it
|
to its electrical resistivity and its impermeability. In technic, it
|
||||||
is used in a few recipes, and it must be acquired by tapping rubber trees.
|
is used in a few recipes, and it must be acquired by tapping rubber trees.
|
||||||
|
|
||||||
If you have the moretrees mod installed, the rubber trees you need
|
Rubber trees are provided by technic if the moretrees mod is not present.
|
||||||
are those defined by that mod. If not, technic supplies a copy of the
|
|
||||||
moretrees rubber tree.
|
|
||||||
|
|
||||||
Extracting rubber requires a specific tool, a tree tap. Using the tree
|
Extract raw latex from rubber using the "Tree Tap" tool. Punch/left-click the
|
||||||
tap (by left-clicking) on a rubber tree trunk block extracts a lump of
|
tool on a rubber tree trunk to extract a lump of raw latex from the trunk.
|
||||||
raw latex from the trunk. Each trunk block can be repeatedly tapped for
|
Emptied trunks will regenerate at intervals of several minutes, which can be
|
||||||
latex, at intervals of several minutes; its appearance changes to show
|
observed by its appearance.
|
||||||
whether it is currently ripe for tapping. Each tree has several trunk
|
|
||||||
blocks, so several latex lumps can be extracted from a tree in one visit.
|
|
||||||
|
|
||||||
Raw latex isn't used directly. It must be vulcanized to produce finished
|
To obtain rubber from latex, alloy latex with coal dust.
|
||||||
rubber. This can be performed by alloying the latex with coal dust.
|
|
||||||
|
|
||||||
### metal ###
|
## 3.0 Metal processing
|
||||||
|
Generally, each metal can exist in five forms:
|
||||||
|
|
||||||
Many of the substances important in technic are metals, and there is
|
* ore -> stone containing the lump
|
||||||
a common pattern in how metals are handled. Generally, each metal can
|
* lump -> draw metal obtained by digging ("nuggets")
|
||||||
exist in five forms: ore, lump, dust, ingot, and block. With a couple of
|
* dust -> grinder output
|
||||||
tricky exceptions in mods outside technic, metals are only *used* in dust,
|
* ingot -> melted/cooked lump or dust
|
||||||
ingot, and block forms. Metals can be readily converted between these
|
* block -> placeable node
|
||||||
three forms, but can't be converted from them back to ore or lump forms.
|
|
||||||
|
|
||||||
As in the basic Minetest game, a "lump" of metal is acquired directly by
|
Metals can be converted between dust, ingot and block, but can't be converted
|
||||||
digging ore, and will then be processed into some other form for use.
|
from them back to ore or lump forms.
|
||||||
A lump is thus more akin to ore than to refined metal. (In real life,
|
|
||||||
metal ore rarely yields lumps ("nuggets") of pure metal directly.
|
|
||||||
More often the desired metal is chemically bound into the rock as an
|
|
||||||
oxide or some other compound, and the ore must be chemically processed
|
|
||||||
to yield pure metal.)
|
|
||||||
|
|
||||||
Not all metals occur directly as ore. Generally, elemental metals (those
|
### Grinding
|
||||||
consisting of a single chemical element) occur as ore, and alloys (those
|
Ores can be processed as follows:
|
||||||
consisting of a mixture of multiple elements) do not. In fact, if the
|
|
||||||
fictional mithril is taken to be elemental, this pattern is currently
|
|
||||||
followed perfectly. (It is not clear in the Middle-Earth setting whether
|
|
||||||
mithril is elemental or an alloy.) This might change in the future:
|
|
||||||
in real life some alloys do occur as ore, and some elemental metals
|
|
||||||
rarely occur naturally outside such alloys. Metals that do not occur
|
|
||||||
as ore also lack the "lump" form.
|
|
||||||
|
|
||||||
The basic Minetest game offers a single way to refine metals: cook a lump
|
* ore -> lump (digging) -> ingot (melting)
|
||||||
in a furnace to produce an ingot. With technic this refinement method
|
* ore -> lump (digging) -> 2x dust (grinding) -> 2x ingot (melting)
|
||||||
still exists, but is rarely used outside the early part of the game,
|
|
||||||
because technic offers a more efficient method once some machines have
|
|
||||||
been built. The grinder, available only in electrically-powered forms,
|
|
||||||
can grind a metal lump into two piles of metal dust. Each dust pile
|
|
||||||
can then be cooked into an ingot, yielding two ingots from one lump.
|
|
||||||
This doubling of material value means that you should only cook a lump
|
|
||||||
directly when you have no choice, mainly early in the game when you
|
|
||||||
haven't yet built a grinder.
|
|
||||||
|
|
||||||
An ingot can also be ground back to (one pile of) dust. Thus it is always
|
At the expense of some energy consumption, the grinder can extract more material
|
||||||
possible to convert metal between ingot and dust forms, at the expense
|
from the lump, resulting in 2x dust which can be melted to two ingots in total.
|
||||||
of some energy consumption. Nine ingots of a metal can be crafted into
|
|
||||||
a block, which can be used for building. The block can also be crafted
|
|
||||||
back to nine ingots. Thus it is possible to freely convert metal between
|
|
||||||
ingot and block forms, which is convenient to store the metal compactly.
|
|
||||||
Every metal has dust, ingot, and block forms.
|
|
||||||
|
|
||||||
Alloying recipes in which a metal is the base ingredient, to produce a
|
### Alloying
|
||||||
metal alloy, always come in two forms, using the metal either as dust
|
Input: two ingredients of the same form - lump or dust
|
||||||
or as an ingot. If the secondary ingredient is also a metal, it must
|
|
||||||
be supplied in the same form as the base ingredient. The output alloy
|
|
||||||
is also returned in the same form. For example, brass can be produced
|
|
||||||
by alloying two copper ingots with one zinc ingot to make three brass
|
|
||||||
ingots, or by alloying two piles of copper dust with one pile of zinc
|
|
||||||
dust to make three piles of brass dust. The two ways of alloying produce
|
|
||||||
equivalent results.
|
|
||||||
|
|
||||||
### iron and its alloys ###
|
Output: resulting alloy, as an ingot
|
||||||
|
|
||||||
Iron forms several important alloys. In real-life history, iron was the
|
Example: 2x copper ingots + 1x zinc ingot -> 3x brass ingot (alloying)
|
||||||
second metal to be used as the base component of deliberately-constructed
|
|
||||||
alloys (the first was copper), and it was the first metal whose working
|
|
||||||
required processes of any metallurgical sophistication. The game
|
|
||||||
mechanics around iron broadly imitate the historical progression of
|
|
||||||
processes around it, rather than the less-varied modern processes.
|
|
||||||
|
|
||||||
The two-component alloying system of iron with carbon is of huge
|
Note that grinding before alloying is the preferred method to gain more output.
|
||||||
importance, both in the game and in real life. The basic Minetest game
|
|
||||||
doesn't distinguish between these pure iron and these alloys at all,
|
|
||||||
but technic introduces a distinction based on the carbon content, and
|
|
||||||
renames some items of the basic game accordingly.
|
|
||||||
|
|
||||||
The iron/carbon spectrum is represented in the game by three metal
|
#### iron and its alloys
|
||||||
substances: wrought iron, carbon steel, and cast iron. Wrought iron
|
|
||||||
has low carbon content (less than 0.25%), resists shattering, and
|
|
||||||
is easily welded, but is relatively soft and susceptible to rusting.
|
|
||||||
In real-life history it was used for rails, gates, chains, wire, pipes,
|
|
||||||
fasteners, and other purposes. Cast iron has high carbon content
|
|
||||||
(2.1% to 4%), is especially hard, and resists corrosion, but is
|
|
||||||
relatively brittle, and difficult to work. Historically it was used
|
|
||||||
to build large structures such as bridges, and for cannons, cookware,
|
|
||||||
and engine cylinders. Carbon steel has medium carbon content (0.25%
|
|
||||||
to 2.1%), and intermediate properties: moderately hard and also tough,
|
|
||||||
somewhat resistant to corrosion. In real life it is now used for most
|
|
||||||
of the purposes previously satisfied by wrought iron and many of those
|
|
||||||
of cast iron, but has historically been especially important for its
|
|
||||||
use in swords, armor, skyscrapers, large bridges, and machines.
|
|
||||||
|
|
||||||
In real-life history, the first form of iron to be refined was
|
Historically iron was the first metal whose working required processes of any
|
||||||
wrought iron, which is nearly pure iron, having low carbon content.
|
metallurgical sophistication. The mod's mechanics around iron broadly imitate
|
||||||
It was produced from ore by a low-temperature furnace process (the
|
the historical progression of processes around it to get more variety.
|
||||||
"bloomery") in which the ore/iron remains solid and impurities (slag)
|
|
||||||
are progressively removed by hammering ("working", hence "wrought").
|
|
||||||
This began in the middle East, around 1800 BCE.
|
|
||||||
|
|
||||||
Historically, the next forms of iron to be refined were those of high
|
Notable alloys:
|
||||||
carbon content. This was the result of the development of a more
|
|
||||||
sophisticated kind of furnace, the blast furnace, capable of reaching
|
|
||||||
higher temperatures. The real advantage of the blast furnace is that it
|
|
||||||
melts the metal, allowing it to be cast straight into a shape supplied by
|
|
||||||
a mould, rather than having to be gradually beaten into the desired shape.
|
|
||||||
A side effect of the blast furnace is that carbon from the furnace's fuel
|
|
||||||
is unavoidably incorporated into the metal. Normally iron is processed
|
|
||||||
twice through the blast furnace: once producing "pig iron", which has
|
|
||||||
very high carbon content and lots of impurities but lower melting point,
|
|
||||||
casting it into rough ingots, then remelting the pig iron and casting it
|
|
||||||
into the final moulds. The result is called "cast iron". Pig iron was
|
|
||||||
first produced in China around 1200 BCE, and cast iron later in the 5th
|
|
||||||
century BCE. Incidentally, the Chinese did not have the bloomery process,
|
|
||||||
so this was their first iron refining process, and, unlike the rest of
|
|
||||||
the world, their first wrought iron was made from pig iron rather than
|
|
||||||
directly from ore.
|
|
||||||
|
|
||||||
Carbon steel, with intermediate carbon content, was developed much later,
|
* Wrought iron: <0.25% carbon
|
||||||
in Europe in the 17th century CE. It required a more sophisticated
|
* Resists shattering but is relatively soft.
|
||||||
process, because the blast furnace made it extremely difficult to achieve
|
* Known since: 1800 BC (approx.)
|
||||||
a controlled carbon content. Tweaks of the blast furnace would sometimes
|
* Cast iron: 2.1% to 4% carbon.
|
||||||
produce an intermediate carbon content by luck, but the first processes to
|
* Especially hard and rather corrosion-resistant
|
||||||
reliably produce steel were based on removing almost all the carbon from
|
* Known since: 1200 BC (approx.)
|
||||||
pig iron and then explicitly mixing a controlled amount of carbon back in.
|
* Carbon steel: 0.25% to 2.1% carbon.
|
||||||
|
* Intermediate of the two above.
|
||||||
|
* Known since: 1600 AD (approx.)
|
||||||
|
|
||||||
In the game, the bloomery process is represented by ordinary cooking
|
Technic introduces a distinction based on the carbon content, and renames some
|
||||||
or grinding of an iron lump. The lump represents unprocessed ore,
|
items of the basic game accordingly. Iron and Steel are now distinguished.
|
||||||
and is identified only as "iron", not specifically as wrought iron.
|
|
||||||
This standard refining process produces dust or an ingot which is
|
|
||||||
specifically identified as wrought iron. Thus the standard refining
|
|
||||||
process produces the (nearly) pure metal.
|
|
||||||
|
|
||||||
Cast iron is trickier. You might expect from the real-life notes above
|
Notable references:
|
||||||
that cooking an iron lump (representing ore) would produce pig iron that
|
|
||||||
can then be cooked again to produce cast iron. This is kind of the case,
|
|
||||||
but not exactly, because as already noted cooking an iron lump produces
|
|
||||||
wrought iron. The game doesn't distinguish between low-temperature
|
|
||||||
and high-temperature cooking processes: the same furnace is used not
|
|
||||||
just to cast all kinds of metal but also to cook food. So there is no
|
|
||||||
distinction between cooking processes to produce distinct wrought iron
|
|
||||||
and pig iron. But repeated cooking *is* available as a game mechanic,
|
|
||||||
and is indeed used to produce cast iron: re-cooking a wrought iron ingot
|
|
||||||
produces a cast iron ingot. So pig iron isn't represented in the game as
|
|
||||||
a distinct item; instead wrought iron stands in for pig iron in addition
|
|
||||||
to its realistic uses as wrought iron.
|
|
||||||
|
|
||||||
Carbon steel is produced by a more regular in-game process: alloying
|
* https://en.wikipedia.org/wiki/Iron
|
||||||
wrought iron with coal dust (which is essentially carbon). This bears
|
* https://en.wikipedia.org/wiki/Stainless_steel
|
||||||
a fair resemblance to the historical development of carbon steel.
|
* ... plus many more.
|
||||||
This alloying recipe is relatively time-consuming for the amount of
|
|
||||||
material processed, when compared against other alloying recipes, and
|
|
||||||
carbon steel is heavily used, so it is wise to alloy it in advance,
|
|
||||||
when you're not waiting for it.
|
|
||||||
|
|
||||||
There are additional recipes that permit all three of these types of iron
|
Processes:
|
||||||
to be converted into each other. Alloying carbon steel again with coal
|
|
||||||
dust produces cast iron, with its higher carbon content. Cooking carbon
|
|
||||||
steel or cast iron produces wrought iron, in an abbreviated form of the
|
|
||||||
bloomery process.
|
|
||||||
|
|
||||||
There's one more iron alloy in the game: stainless steel. It is managed
|
* Iron -> Wrought iron (melting)
|
||||||
in a completely regular manner, created by alloying carbon steel with
|
* Wrought iron -> Cast iron (melting)
|
||||||
chromium.
|
* Wrought iron + coal dust -> Carbon steel (alloying)
|
||||||
|
* Carbon steel + coal dust -> Cast iron (alloying)
|
||||||
|
* Carbon steel + chromium -> Stainless steel (alloying)
|
||||||
|
|
||||||
### uranium enrichment ###
|
Reversible processes:
|
||||||
|
|
||||||
|
* Cast iron -> Wrought iron (melting)
|
||||||
|
* Carbon steel -> Wrought iron (melting)
|
||||||
|
|
||||||
|
Check your preferred crafting guide for more information.
|
||||||
|
|
||||||
|
|
||||||
|
### Uranium enrichment
|
||||||
|
|
||||||
When uranium is to be used to fuel a nuclear reactor, it is not
|
When uranium is to be used to fuel a nuclear reactor, it is not
|
||||||
sufficient to merely isolate and refine uranium metal. It is necessary
|
sufficient to merely isolate and refine uranium metal. It is necessary
|
||||||
@ -521,35 +410,15 @@ a post and adjacent concrete block.
|
|||||||
industrial processes
|
industrial processes
|
||||||
--------------------
|
--------------------
|
||||||
|
|
||||||
### alloying ###
|
### Alloying
|
||||||
|
|
||||||
In technic, alloying is a way of combining items to create other items,
|
In Technic, alloying is a way of combining items to create other items,
|
||||||
distinct from standard crafting. Alloying always uses inputs of exactly
|
distinct from standard crafting. Alloying always uses inputs of exactly
|
||||||
two distinct types, and produces a single output. Like cooking, which
|
two distinct types, and produces a single output.
|
||||||
takes a single input, it is performed using a powered machine, known
|
|
||||||
generically as an "alloy furnace". An alloy furnace always has two
|
|
||||||
input slots, and it doesn't matter which way round the two ingredients
|
|
||||||
are placed in the slots. Many alloying recipes require one or both
|
|
||||||
slots to contain a stack of more than one of the ingredient item: the
|
|
||||||
quantity required of each ingredient is part of the recipe.
|
|
||||||
|
|
||||||
As with the furnaces used for cooking, there are multiple kinds of alloy
|
Check your preferred crafting guide for more information.
|
||||||
furnace, powered in different ways. The most-used alloy furnaces are
|
|
||||||
electrically powered. There is also an alloy furnace that is powered
|
|
||||||
by directly burning fuel, just like the basic cooking furnace. Building
|
|
||||||
almost any electrical machine, including the electrically-powered alloy
|
|
||||||
furnaces, requires a machine casing component, one ingredient of which
|
|
||||||
is brass, an alloy. It is therefore necessary to use the fuel-fired
|
|
||||||
alloy furnace in the early part of the game, on the way to building
|
|
||||||
electrical machinery.
|
|
||||||
|
|
||||||
Alloying recipes are mainly concerned with metals. These recipes
|
### Grinding, extracting, and compressing
|
||||||
combine a base metal with some other element, most often another metal,
|
|
||||||
to produce a new metal. This is discussed in the section on metal.
|
|
||||||
There are also a few alloying recipes in which the base ingredient is
|
|
||||||
non-metallic, such as the recipe for the silicon wafer.
|
|
||||||
|
|
||||||
### grinding, extracting, and compressing ###
|
|
||||||
|
|
||||||
Grinding, extracting, and compressing are three distinct, but very
|
Grinding, extracting, and compressing are three distinct, but very
|
||||||
similar, ways of converting one item into another. They are all quite
|
similar, ways of converting one item into another. They are all quite
|
||||||
@ -623,57 +492,17 @@ metal alloys. This can only be done using the dust form of the alloy.
|
|||||||
It recovers both components of binary metal/metal alloys. It can't
|
It recovers both components of binary metal/metal alloys. It can't
|
||||||
recover the carbon from steel or cast iron.
|
recover the carbon from steel or cast iron.
|
||||||
|
|
||||||
chests
|
Chests
|
||||||
------
|
------
|
||||||
|
|
||||||
The technic mod replaces the basic Minetest game's single type of
|
See [GitHub Wiki / Chests](https://github.com/minetest-mods/technic/wiki/Chests)
|
||||||
chest with a range of chests that have different sizes and features.
|
|
||||||
The chest types are identified by the materials from which they are made;
|
|
||||||
the better chests are made from more exotic materials. The chest types
|
|
||||||
form a linear sequence, each being (with one exception noted below)
|
|
||||||
strictly more powerful than the preceding one. The sequence begins with
|
|
||||||
the wooden chest from the basic game, and each later chest type is built
|
|
||||||
by upgrading a chest of the preceding type. The chest types are:
|
|
||||||
|
|
||||||
1. wooden chest: 8×4 (32) slots
|
Features of extended chests:
|
||||||
2. iron chest: 9×5 (45) slots
|
|
||||||
3. copper chest: 12×5 (60) slots
|
|
||||||
4. silver chest: 12×6 (72) slots
|
|
||||||
5. gold chest: 15×6 (90) slots
|
|
||||||
6. mithril chest: 15×6 (90) slots
|
|
||||||
|
|
||||||
The iron and later chests have the ability to sort their contents,
|
* Larger storage space
|
||||||
when commanded by a button in their interaction forms. Item types are
|
* Labelling
|
||||||
sorted in the same order used in the unified\_inventory craft guide.
|
* Advanced item sorting
|
||||||
The copper and later chests also have an auto-sorting facility that can
|
|
||||||
be enabled from the interaction form. An auto-sorting chest automatically
|
|
||||||
sorts its contents whenever a player closes the chest. The contents will
|
|
||||||
then usually be in a sorted state when the chest is opened, but may not
|
|
||||||
be if pneumatic tubes have operated on the chest while it was closed,
|
|
||||||
or if two players have the chest open simultaneously.
|
|
||||||
|
|
||||||
The silver and gold chests, but not the mithril chest, have a built-in
|
|
||||||
sign-like capability. They can be given a textual label, which will
|
|
||||||
be visible when hovering over the chest. The gold chest, but again not
|
|
||||||
the mithril chest, can be further labelled with a colored patch that is
|
|
||||||
visible from a moderate distance.
|
|
||||||
|
|
||||||
The mithril chest is currently an exception to the upgrading system.
|
|
||||||
It has only as many inventory slots as the preceding (gold) type, and has
|
|
||||||
fewer of the features. It has no feature that other chests don't have:
|
|
||||||
it is strictly weaker than the gold chest. It is planned that in the
|
|
||||||
future it will acquire some unique features, but for now the only reason
|
|
||||||
to use it is aesthetic.
|
|
||||||
|
|
||||||
The size of the largest chests is dictated by the maximum size
|
|
||||||
of interaction form that the game engine can successfully display.
|
|
||||||
If in the future the engine becomes capable of handling larger forms,
|
|
||||||
by scaling them to fit the screen, the sequence of chest sizes will
|
|
||||||
likely be revised.
|
|
||||||
|
|
||||||
As with the chest of the basic Minetest game, each chest type comes
|
|
||||||
in both locked and unlocked flavors. All of the chests work with the
|
|
||||||
pneumatic tubes of the pipeworks mod.
|
|
||||||
|
|
||||||
radioactivity
|
radioactivity
|
||||||
-------------
|
-------------
|
||||||
@ -811,115 +640,44 @@ so the positioning of holes in each layer must still be considered.
|
|||||||
Tricky shine paths can also be addressed by just keeping players out of
|
Tricky shine paths can also be addressed by just keeping players out of
|
||||||
the dangerous area.
|
the dangerous area.
|
||||||
|
|
||||||
electrical power
|
## Electrical power
|
||||||
----------------
|
|
||||||
|
|
||||||
Most machines in technic are electrically powered. To operate them it is
|
Electrical networks in Technic are defined by a single tier (see below)
|
||||||
necessary to construct an electrical power network. The network links
|
and consist of:
|
||||||
together power generators and power-consuming machines, connecting them
|
|
||||||
using power cables.
|
|
||||||
|
|
||||||
There are three tiers of electrical networking: low voltage (LV),
|
* 1x Switching Station (central management unit)
|
||||||
medium voltage (MV), and high voltage (HV). Each network must operate
|
* Any further stations are disabled automatically
|
||||||
at a single voltage, and most electrical items are specific to a single
|
* Electricity producers (PR)
|
||||||
voltage. Generally, the machines of higher tiers are more powerful,
|
* Electricity consumers/receivers (RE)
|
||||||
but consume more energy and are more expensive to build, than machines
|
* Accumulators/batteries (BA)
|
||||||
of lower tiers. It is normal to build networks of all three tiers,
|
|
||||||
in ascending order as one progresses through the game, but it is not
|
|
||||||
strictly necessary to do this. Building HV equipment requires some parts
|
|
||||||
that can only be manufactured using electrical machines, either LV or MV,
|
|
||||||
so it is not possible to build an HV network first, but it is possible
|
|
||||||
to skip either LV or MV on the way to HV.
|
|
||||||
|
|
||||||
Each voltage has its own cable type, with distinctive insulation. Cable
|
### Tiers
|
||||||
segments connect to each other and to compatible machines automatically.
|
|
||||||
Incompatible electrical items don't connect. All non-cable electrical
|
|
||||||
items must be connected via cable: they don't connect directly to each
|
|
||||||
other. Most electrical items can connect to cables in any direction,
|
|
||||||
but there are a couple of important exceptions noted below.
|
|
||||||
|
|
||||||
To be useful, an electrical network must connect at least one power
|
* LV: Low Voltage. Low material costs but is slower.
|
||||||
generator to at least one power-consuming machine. In addition to these
|
* MV: Medium Voltage. Higher processing speed.
|
||||||
items, the network must have a "switching station" in order to operate:
|
* HV: High Voltage. High material costs but is the fastest.
|
||||||
no energy will flow without one. Unlike most electrical items, the
|
|
||||||
switching station is not voltage-specific: the same item will manage
|
|
||||||
a network of any tier. However, also unlike most electrical items,
|
|
||||||
it is picky about the direction in which it is connected to the cable:
|
|
||||||
the cable must be directly below the switching station.
|
|
||||||
|
|
||||||
Hovering over a network's switching station will show the aggregate energy
|
Tiers can be converted from one to another using the Supply Converter node.
|
||||||
supply and demand, which is useful for troubleshooting. Electrical energy
|
Its top connects to the input, the bottom to the output network. Configure
|
||||||
is measured in "EU", and power (energy flow) in EU per second (EU/s).
|
the input power by right-clicking it.
|
||||||
Energy is shifted around a network instantaneously once per second.
|
|
||||||
|
|
||||||
In a simple network with only generators and consumers, if total
|
### Machine upgrade slots
|
||||||
demand exceeds total supply then no energy will flow, the machines
|
|
||||||
will do nothing, and the generators' output will be lost. To handle
|
|
||||||
this situation, it is recommended to add a battery box to the network.
|
|
||||||
A battery box will store generated energy, and when enough has been
|
|
||||||
stored to run the consumers for one second it will deliver it to the
|
|
||||||
consumers, letting them run part-time. It also stores spare energy
|
|
||||||
when supply exceeds demand, to let consumers run full-time when their
|
|
||||||
demand occasionally peaks above the supply. More battery boxes can
|
|
||||||
be added to cope with larger periods of mismatched supply and demand,
|
|
||||||
such as those resulting from using solar generators (which only produce
|
|
||||||
energy in the daytime).
|
|
||||||
|
|
||||||
When there are electrical networks of multiple tiers, it can be appealing
|
Generally, machines of MV and HV tiers have two upgrade slots.
|
||||||
to generate energy on one tier and transfer it to another. The most
|
Only specific items will have any upgrading effect. The occupied slots do
|
||||||
direct way to do this is with the "supply converter", which can be
|
count, but not the actual stack size.
|
||||||
directly wired into two networks. It is another tier-independent item,
|
|
||||||
and also particular about the direction of cable connections: it must
|
|
||||||
have the cable of one network directly above, and the cable of another
|
|
||||||
network directly below. The supply converter demands 10000 EU/s from
|
|
||||||
the network above, and when this network gives it power it supplies 9000
|
|
||||||
EU/s to the network below. Thus it is only 90% efficient, unlike most of
|
|
||||||
the electrical system which is 100% efficient in moving energy around.
|
|
||||||
To transfer more than 10000 EU/s between networks, connect multiple
|
|
||||||
supply converters in parallel.
|
|
||||||
|
|
||||||
powered machines
|
**Type 1: Energy upgrade**
|
||||||
----------------
|
|
||||||
|
|
||||||
### powered machine tiers ###
|
Consists of any battery item. Reduces the machine's power consumption
|
||||||
|
regardless the charge of the item.
|
||||||
|
|
||||||
Each powered machine takes its power in some specific form, being
|
**Type 2: Tube upgrade**
|
||||||
either fuel-fired (burning fuel directly) or electrically powered at
|
|
||||||
some specific voltage. There is a general progression through the
|
|
||||||
game from using fuel-fired machines to electrical machines, and to
|
|
||||||
higher electrical voltages. The most important kinds of machine come
|
|
||||||
in multiple variants that are powered in different ways, so the earlier
|
|
||||||
ones can be superseded. However, some machines are only available for
|
|
||||||
a specific power tier, so the tier can't be entirely superseded.
|
|
||||||
|
|
||||||
### powered machine upgrades ###
|
Consists of a control logic unit item. Ejects processed items into pneumatic
|
||||||
|
tubes for quicker processing.
|
||||||
|
|
||||||
Some machines have inventory slots that are used to upgrade them in
|
### Machines + Tubes (pipeworks)
|
||||||
some way. Generally, machines of MV and HV tiers have two upgrade slots,
|
|
||||||
and machines of lower tiers (fuel-fired and LV) do not. Any item can
|
|
||||||
be placed in an upgrade slot, but only specific items will have any
|
|
||||||
upgrading effect. It is possible to have multiple upgrades of the same
|
|
||||||
type, but this can't be achieved by stacking more than one upgrade item
|
|
||||||
in one slot: it is necessary to put the same kind of item in more than one
|
|
||||||
upgrade slot. The ability to upgrade machines is therefore very limited.
|
|
||||||
Two kinds of upgrade are currently possible: an energy upgrade and a
|
|
||||||
tube upgrade.
|
|
||||||
|
|
||||||
An energy upgrade consists of a battery item, the same kind of battery
|
|
||||||
that serves as a mobile energy store. The effect of an energy upgrade
|
|
||||||
is to improve in some way the machine's use of electrical energy, most
|
|
||||||
often by making it use less energy. The upgrade effect has no relation
|
|
||||||
to energy stored in the battery: the battery's charge level is irrelevant
|
|
||||||
and will not be affected.
|
|
||||||
|
|
||||||
A tube upgrade consists of a control logic unit item. The effect of a
|
|
||||||
tube upgrade is to make the machine able, or more able, to eject items
|
|
||||||
it has finished with into pneumatic tubes. The machines that can take
|
|
||||||
this kind of upgrade are in any case capable of accepting inputs from
|
|
||||||
pneumatic tubes. These upgrades are essential in using powered machines
|
|
||||||
as components in larger automated systems.
|
|
||||||
|
|
||||||
### tubes with powered machines ###
|
|
||||||
|
|
||||||
Generally, powered machines of MV and HV tiers can work with pneumatic
|
Generally, powered machines of MV and HV tiers can work with pneumatic
|
||||||
tubes, and those of lower tiers cannot. (As an exception, the fuel-fired
|
tubes, and those of lower tiers cannot. (As an exception, the fuel-fired
|
||||||
@ -1152,7 +910,7 @@ dig identical areas, one on each side of the square cross section.
|
|||||||
### forcefield emitter ###
|
### forcefield emitter ###
|
||||||
|
|
||||||
The forcefield emitter is an HV powered machine that generates a
|
The forcefield emitter is an HV powered machine that generates a
|
||||||
forcefield remeniscent of those seen in many science-fiction stories.
|
forcefield reminiscent of those seen in many science-fiction stories.
|
||||||
|
|
||||||
The emitter can be configured to generate a forcefield of either
|
The emitter can be configured to generate a forcefield of either
|
||||||
spherical or cubical shape, in either case centered on the emitter.
|
spherical or cubical shape, in either case centered on the emitter.
|
||||||
|
3
modpack.conf
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
name = technic
|
||||||
|
description = technic
|
||||||
|
min_minetest_version = 5.0
|
@ -1 +0,0 @@
|
|||||||
|
|
9
settingtypes.txt
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
# Safety feature for the chainsaw tool aimed to prevent cutting structures
|
||||||
|
# built by players.
|
||||||
|
#
|
||||||
|
# Trunk nodes generated by mapgen have a rotation of '0' whereas manually
|
||||||
|
# placed trunks usually have another value. However, some mods might generate
|
||||||
|
# trees with rotation != 0, which renders the chainsaw useless on them.
|
||||||
|
#
|
||||||
|
# Disabling this feature will sacrifice safety for convenience.
|
||||||
|
technic_safe_chainsaw (Chainsaw safety feature) bool true
|
@ -1,14 +1,16 @@
|
|||||||
Technic
|
# Technic (main mod)
|
||||||
=======
|
|
||||||
|
|
||||||
License
|
|
||||||
-------
|
## License
|
||||||
|
|
||||||
|
### Code
|
||||||
|
|
||||||
Copyright (C) 2012-2014 Maciej Kasatkin (RealBadAngel)
|
Copyright (C) 2012-2014 Maciej Kasatkin (RealBadAngel)
|
||||||
|
|
||||||
Technic chests code is licensed under the GNU LGPLv2+.
|
Technic chests code is licensed under the GNU LGPLv2+.
|
||||||
|
|
||||||
Texture licenses:
|
|
||||||
|
### Textures
|
||||||
|
|
||||||
BlockMen modified by Zefram (CC BY-SA 3.0):
|
BlockMen modified by Zefram (CC BY-SA 3.0):
|
||||||
* technic_chernobylite_block.png
|
* technic_chernobylite_block.png
|
||||||
@ -21,15 +23,32 @@ celeron55 (Perttu Ahola) modified by Zefram (CC BY-SA 3.0):
|
|||||||
sdzen (Elise Staudter) (CC BY-SA 3.0):
|
sdzen (Elise Staudter) (CC BY-SA 3.0):
|
||||||
* most of the older 16x16 textures
|
* most of the older 16x16 textures
|
||||||
|
|
||||||
|
leftshift (CC BY-SA 3.0):
|
||||||
|
* technic_river_water_can.png
|
||||||
|
|
||||||
|
Neuromancer vis Minetest Game (CC BY-SA 3.0)
|
||||||
|
* `technic_*_electric_furnace_*.png` (derived)
|
||||||
|
|
||||||
|
[LB Photo Realism Reload](https://www.curseforge.com/minecraft/texture-packs/lb-photo-realism-reload) (CC 0)
|
||||||
|
* `technic_geothermal_*.png` (derived)
|
||||||
|
* `technic_water_mill_*.png` (derived)
|
||||||
|
* `technic_*_alloy_furnace_*.png` (derived)
|
||||||
|
* `technic_*_compressor_*.png` (derived)
|
||||||
|
* `technic_*_grinder_*.png` (derived)
|
||||||
|
|
||||||
RealBadAngel: (WTFPL)
|
RealBadAngel: (WTFPL)
|
||||||
* Everything else.
|
* Everything else.
|
||||||
|
|
||||||
CC BY-SA 3.0: <http://creativecommons.org/licenses/by-sa/3.0/>
|
|
||||||
|
|
||||||
Sound licenses:
|
### Sounds
|
||||||
|
|
||||||
veikk0 (Veikko Mäkelä) (CC BY-SA 4.0):
|
veikk0 (Veikko Mäkelä) (CC BY-SA 4.0):
|
||||||
* technic_hv_nuclear_reactor_siren_danger_loop.ogg
|
* 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/>
|
* 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/>
|
|
||||||
|
### References
|
||||||
|
|
||||||
|
CC BY-SA 3.0: http://creativecommons.org/licenses/by-sa/3.0/
|
||||||
|
|
||||||
|
CC BY-SA 4.0: https://creativecommons.org/licenses/by-sa/4.0/
|
||||||
|
@ -7,6 +7,13 @@ minetest.clear_craft({
|
|||||||
type = "shapeless",
|
type = "shapeless",
|
||||||
output = "default:bronze_ingot"
|
output = "default:bronze_ingot"
|
||||||
})
|
})
|
||||||
|
-- Restore recipe for bronze block to ingots
|
||||||
|
minetest.register_craft({
|
||||||
|
output = "default:bronze_ingot 9",
|
||||||
|
recipe = {
|
||||||
|
{"default:bronzeblock"}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
-- Accelerator tube
|
-- Accelerator tube
|
||||||
if pipeworks.enable_accelerator_tube then
|
if pipeworks.enable_accelerator_tube then
|
||||||
@ -38,6 +45,18 @@ if pipeworks.enable_teleport_tube then
|
|||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- basic materials' brass ingot
|
||||||
|
|
||||||
|
minetest.clear_craft({
|
||||||
|
output = "basic_materials:brass_ingot",
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft( {
|
||||||
|
type = "shapeless",
|
||||||
|
output = "basic_materials:brass_ingot 9",
|
||||||
|
recipe = { "basic_materials:brass_block" },
|
||||||
|
})
|
||||||
|
|
||||||
-- tubes crafting recipes
|
-- tubes crafting recipes
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
@ -71,54 +90,24 @@ minetest.register_craft({
|
|||||||
output = 'technic:red_energy_crystal',
|
output = 'technic:red_energy_crystal',
|
||||||
recipe = {
|
recipe = {
|
||||||
{'moreores:silver_ingot', 'technic:battery', 'dye:red'},
|
{'moreores:silver_ingot', 'technic:battery', 'dye:red'},
|
||||||
{'technic:battery', 'default:diamondblock', 'technic:battery'},
|
{'technic:battery', 'basic_materials:energy_crystal_simple', 'technic:battery'},
|
||||||
{'dye:red', 'technic:battery', 'moreores:silver_ingot'},
|
{'dye:red', 'technic:battery', 'moreores:silver_ingot'},
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = 'technic:fine_copper_wire 2',
|
|
||||||
recipe = {
|
|
||||||
{'', 'default:copper_ingot', ''},
|
|
||||||
{'', 'default:copper_ingot', ''},
|
|
||||||
{'', 'default:copper_ingot', ''},
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = 'technic:fine_gold_wire 2',
|
|
||||||
recipe = {
|
|
||||||
{'', 'default:gold_ingot', ''},
|
|
||||||
{'', 'default:gold_ingot', ''},
|
|
||||||
{'', 'default:gold_ingot', ''},
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = 'technic:fine_silver_wire 2',
|
|
||||||
recipe = {
|
|
||||||
{'', 'moreores:silver_ingot', ''},
|
|
||||||
{'', 'moreores:silver_ingot', ''},
|
|
||||||
{'', 'moreores:silver_ingot', ''},
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = 'technic:copper_coil 1',
|
output = 'technic:copper_coil 1',
|
||||||
recipe = {
|
recipe = {
|
||||||
{'technic:fine_copper_wire', 'technic:wrought_iron_ingot', 'technic:fine_copper_wire'},
|
{'basic_materials:copper_wire', 'technic:wrought_iron_ingot', 'basic_materials:copper_wire'},
|
||||||
{'technic:wrought_iron_ingot', '', 'technic:wrought_iron_ingot'},
|
{'technic:wrought_iron_ingot', '', 'technic:wrought_iron_ingot'},
|
||||||
{'technic:fine_copper_wire', 'technic:wrought_iron_ingot', 'technic:fine_copper_wire'},
|
{'basic_materials:copper_wire', 'technic:wrought_iron_ingot', 'basic_materials:copper_wire'},
|
||||||
}
|
},
|
||||||
})
|
replacements = {
|
||||||
|
{"basic_materials:copper_wire", "basic_materials:empty_spool"},
|
||||||
minetest.register_craft({
|
{"basic_materials:copper_wire", "basic_materials:empty_spool"},
|
||||||
output = 'technic:motor',
|
{"basic_materials:copper_wire", "basic_materials:empty_spool"},
|
||||||
recipe = {
|
{"basic_materials:copper_wire", "basic_materials:empty_spool"}
|
||||||
{'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'},
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
|
|
||||||
local isolation = mesecons_materials and "mesecons_materials:fiber" or "technic:rubber"
|
local isolation = mesecons_materials and "mesecons_materials:fiber" or "technic:rubber"
|
||||||
@ -153,10 +142,11 @@ minetest.register_craft({
|
|||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = 'technic:control_logic_unit',
|
output = 'technic:control_logic_unit',
|
||||||
recipe = {
|
recipe = {
|
||||||
{'', 'technic:fine_gold_wire', ''},
|
{'', 'basic_materials:gold_wire', ''},
|
||||||
{'default:copper_ingot', 'technic:silicon_wafer', 'default:copper_ingot'},
|
{'default:copper_ingot', 'technic:silicon_wafer', 'default:copper_ingot'},
|
||||||
{'', 'technic:chromium_ingot', ''},
|
{'', 'technic:chromium_ingot', ''},
|
||||||
}
|
},
|
||||||
|
replacements = { {"basic_materials:gold_wire", "basic_materials:empty_spool"}, },
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
@ -179,12 +169,11 @@ minetest.register_craft({
|
|||||||
output = "technic:machine_casing",
|
output = "technic:machine_casing",
|
||||||
recipe = {
|
recipe = {
|
||||||
{ "technic:cast_iron_ingot", "technic:cast_iron_ingot", "technic:cast_iron_ingot" },
|
{ "technic:cast_iron_ingot", "technic:cast_iron_ingot", "technic:cast_iron_ingot" },
|
||||||
{ "technic:cast_iron_ingot", "technic:brass_ingot", "technic:cast_iron_ingot" },
|
{ "technic:cast_iron_ingot", "basic_materials:brass_ingot", "technic:cast_iron_ingot" },
|
||||||
{ "technic:cast_iron_ingot", "technic:cast_iron_ingot", "technic:cast_iron_ingot" },
|
{ "technic:cast_iron_ingot", "technic:cast_iron_ingot", "technic:cast_iron_ingot" },
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "default:dirt 2",
|
output = "default:dirt 2",
|
||||||
type = "shapeless",
|
type = "shapeless",
|
||||||
@ -196,3 +185,25 @@ minetest.register_craft({
|
|||||||
"group:sand",
|
"group:sand",
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = "technic:rubber_goo",
|
||||||
|
type = "shapeless",
|
||||||
|
recipe = {
|
||||||
|
"technic:raw_latex",
|
||||||
|
"default:coal_lump",
|
||||||
|
"default:coal_lump",
|
||||||
|
"default:coal_lump",
|
||||||
|
"default:coal_lump",
|
||||||
|
"default:coal_lump",
|
||||||
|
"default:coal_lump",
|
||||||
|
"default:coal_lump",
|
||||||
|
"default:coal_lump",
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = "technic:rubber",
|
||||||
|
type = "cooking",
|
||||||
|
recipe = "technic:rubber_goo",
|
||||||
|
})
|
||||||
|
@ -1,12 +0,0 @@
|
|||||||
default
|
|
||||||
pipeworks
|
|
||||||
technic_worldgen
|
|
||||||
bucket?
|
|
||||||
screwdriver?
|
|
||||||
mesecons?
|
|
||||||
mesecons_mvps?
|
|
||||||
digilines?
|
|
||||||
digiline_remote?
|
|
||||||
intllib?
|
|
||||||
unified_inventory?
|
|
||||||
vector_extras?
|
|
@ -1,41 +1,179 @@
|
|||||||
This file is fairly incomplete. Help is welcome.
|
# technic API
|
||||||
|
|
||||||
Tiers
|
This file documents the functions within the technic modpack for use in mods.
|
||||||
-----
|
|
||||||
The tier is a string, currently `"LV"`, `"MV"` and `"HV"` are supported.
|
|
||||||
|
|
||||||
Network
|
[Switch to plaintext format](https://raw.githubusercontent.com/minetest-mods/technic/master/technic/doc/api.md)
|
||||||
-------
|
|
||||||
The network is the cable with the connected machine nodes. Currently the
|
**Undocumented API may change at any time.**
|
||||||
switching station handles the network activity.
|
|
||||||
|
|
||||||
|
## Tiers
|
||||||
|
Tier are network types. List of pre-registered tiers:
|
||||||
|
|
||||||
|
* `"LV"`, Low Voltage
|
||||||
|
* `"MV"`, Medium Voltage
|
||||||
|
* `"HV"`, High Voltage
|
||||||
|
|
||||||
|
Available functions:
|
||||||
|
|
||||||
|
* `technic.register_tier(tier, description)`
|
||||||
|
* Registers a network type (tier)
|
||||||
|
* `tier`: string, short name (ex. `LV`)
|
||||||
|
* `description`: string, long name (ex. `Low Voltage`)
|
||||||
|
* See also `tiers`
|
||||||
|
|
||||||
|
|
||||||
|
## Cables
|
||||||
|
* `technic.register_cable(tier, size)`
|
||||||
|
* Registers an existing node as cable
|
||||||
|
* `tier`: string
|
||||||
|
* `size`: number, visual size of the wire
|
||||||
|
* `technic.get_cable_tier(nodename)`
|
||||||
|
* Retrieves the tier assigned to the provided node name
|
||||||
|
* `nodename`: string, name of the node
|
||||||
|
* Returns the tier (string) or `nil`
|
||||||
|
* `technic.is_tier_cable(nodename, tier)`
|
||||||
|
* Tells whether the node `nodename` is the cable of the tier `tier`.
|
||||||
|
* Short version of `technic.get_cable_tier(nodename) == tier`
|
||||||
|
* `technic.register_cable_tier(nodename, tier)`
|
||||||
|
* Register user defined cable to list of known tier cables.
|
||||||
|
* `nodename`: string, name of the node
|
||||||
|
* `tier`: string, tier name
|
||||||
|
|
||||||
|
|
||||||
|
## Machines
|
||||||
|
The machine type indicates the direction of power flow.
|
||||||
|
List of pre-registered machine types:
|
||||||
|
|
||||||
|
* `technic.receiver = "RE"`: consumes energy. e.g. grinder
|
||||||
|
* `technic.producer = "PR"`: provides energy. e.g. solar panel
|
||||||
|
* `technic.producer_receiver = "PR_RE"` supply converter
|
||||||
|
* `technic.battery = "BA"`: stores energy. e.g. LV battery box
|
||||||
|
|
||||||
|
Available functions:
|
||||||
|
|
||||||
|
* `technic.register_base_machine(data)`
|
||||||
|
* Registers a new node and defines the underlying machine behaviour. `data` fields:
|
||||||
|
* `tier`: string, see #Tiers
|
||||||
|
* `typename`: string, equivalent to the processing type registered
|
||||||
|
by `technic.register_recipe`. Examples: `"cooking"` `"alloy"`
|
||||||
|
* `machine_name`: string, node name
|
||||||
|
* `machine_desc`: string, node description
|
||||||
|
* `demand`: table, EU consumption values for each upgrade level.
|
||||||
|
Up to three indices. Index 1 == no upgrade. Example: `{3000, 2000, 1000}`.
|
||||||
|
* `upgrade`: (boolean), whether to add upgrade slots
|
||||||
|
* `modname`: (string), mod origin
|
||||||
|
* `tube`: (boolean), whether the machine has Pipeworks connectivity
|
||||||
|
* `can_insert`: (func), see Pipeworks documentation
|
||||||
|
* Accepts all inputs by default, if `tube = 1`
|
||||||
|
* See also: `technic.can_insert_unique_stack`
|
||||||
|
* `insert_object`: (func), see Pipeworks documentation
|
||||||
|
* Accepts all inputs by default, if `tube = 1`
|
||||||
|
* See also: `technic.insert_object_unique_stack`
|
||||||
|
* `connect_sides`: (table), see Lua API documentation. Defaults to all directions but front.
|
||||||
|
* `technic.register_machine(tier, nodename, machine_type)`
|
||||||
|
* Register an existing node as machine, bound to the network tier
|
||||||
|
* `tier`: string, see #Tiers
|
||||||
|
* `nodename`: string, node name
|
||||||
|
* `machine_type`: string, following options are possible:
|
||||||
|
* `technic.receiver = "RE"`: Consumes energy
|
||||||
|
* `technic.producer = "PR"`: Provides energy
|
||||||
|
* `technic.battery = "BA"`: Energy storage
|
||||||
|
* See also `Machine types`
|
||||||
|
|
||||||
|
Callbacks for pipeworks item transfer:
|
||||||
|
|
||||||
|
* `technic.can_insert_unique_stack(pos, node, stack, direction)`
|
||||||
|
* `technic.insert_object_unique_stack(pos, node, stack, direction)`
|
||||||
|
* Functions for the parameters `can_insert` and `insert_object` to avoid
|
||||||
|
filling multiple inventory slots with same type of item.
|
||||||
|
|
||||||
|
### Recipes
|
||||||
|
|
||||||
|
* `technic.register_recipe_type(typename, recipedef)`
|
||||||
|
* Registers a new recipe type used for machine processing
|
||||||
|
* `typename`: string, name of the recipe type
|
||||||
|
* Fields of `recipedef`:
|
||||||
|
* `description`: string, descriptor of the recipe type
|
||||||
|
* `input_size`: (numeric), count of input ItemStacks. default 1
|
||||||
|
* `output_size`: (numeric), count of output ItemStacks. default 1
|
||||||
|
* `technic.register_recipe(recipe)`
|
||||||
|
* Registers a individual input/output recipe. Fields of `recipe`:
|
||||||
|
* `input`: table, integer-indexed list of input ItemStacks.
|
||||||
|
* `output`: table/ItemStack, single output or list of output ItemStacks.
|
||||||
|
* `time`: numeric, process time in seconds.
|
||||||
|
* `technic.get_recipe(typename, items)`
|
||||||
|
* `typename`: string, see `technic.register_recipe_type`
|
||||||
|
* `items`: table, integer-indexed list of input ItemStacks.
|
||||||
|
* Returns: `recipe` table on success, `nil` otherwise
|
||||||
|
|
||||||
|
|
||||||
|
The following functions can be used to register recipes for
|
||||||
|
a specific machine type:
|
||||||
|
|
||||||
|
* Centrifuge
|
||||||
|
* `technic.register_separating_recipe(recipe)`
|
||||||
|
* Compressor
|
||||||
|
* `technic.register_compressor_recipe(recipe)`
|
||||||
|
* Furnaces (electric, normal)
|
||||||
|
* `minetest.register_recipe(recipe)`
|
||||||
|
* Extractor
|
||||||
|
* `technic.register_extractor_recipe(recipe)`
|
||||||
|
* Freezer
|
||||||
|
* `technic.register_freezer_recipe(recipe)`
|
||||||
|
* Grinder
|
||||||
|
* `technic.register_grinder_recipe(recipe)`
|
||||||
|
|
||||||
|
|
||||||
|
## Tools
|
||||||
|
* `technic.register_power_tool(itemname, max_charge)`
|
||||||
|
* Register or configure the maximal charge held by an existing item
|
||||||
|
* `craftitem`: string, item or node name
|
||||||
|
* `max_charge`: number, maximal EU capacity
|
||||||
|
|
||||||
|
|
||||||
|
## Helper functions
|
||||||
|
Unsorted functions:
|
||||||
|
|
||||||
Helper functions
|
|
||||||
----------------
|
|
||||||
* `technic.EU_string(num)`
|
* `technic.EU_string(num)`
|
||||||
* Converts num to a human-readable string (see pretty_num)
|
* Converts num to a human-readable string (see `pretty_num`)
|
||||||
and adds the `EU` unit
|
and adds the `EU` unit
|
||||||
* Use this function when showing players energy values
|
* Use this function when showing players energy values
|
||||||
* `technic.pretty_num(num)`
|
* `technic.pretty_num(num)`
|
||||||
* Converts the number `num` to a human-readable string with SI prefixes
|
* Converts the number `num` to a human-readable string with SI prefixes
|
||||||
* `technic.swap_node(pos, nodename)`
|
* `technic.config:get(name)`
|
||||||
* Same as `mintest.swap_node` but it only changes the nodename.
|
* Some configuration function
|
||||||
* It uses `minetest.get_node` before swapping to ensure the new nodename
|
* `technic.tube_inject_item(pos, start_pos, velocity, item)`
|
||||||
is not the same as the current one.
|
* Same as `pipeworks.tube_inject_item`
|
||||||
* `technic.get_or_load_node(pos)`
|
|
||||||
* If the mapblock is loaded, it returns the node at pos,
|
### Energy modifiers
|
||||||
else it loads the chunk and returns `nil`.
|
|
||||||
* `technic.set_RE_wear(itemstack, item_load, max_charge)`
|
* `technic.set_RE_wear(itemstack, item_load, max_charge)`
|
||||||
* If the `wear_represents` field in the item's nodedef is
|
* Modifies the power tool wear of the given itemstack
|
||||||
`"technic_RE_charge"`, this function does nothing.
|
* `itemstack`: ItemStack to modify
|
||||||
|
* `item_load`: number, used energy in EU
|
||||||
|
* `max_charge`: number, maximal EU capacity of the tool
|
||||||
|
* The itemdef field `wear_represents` must be set to `"technic_RE_charge"`,
|
||||||
|
otherwise this function will do nothing.
|
||||||
|
* Returns the modified itemstack
|
||||||
* `technic.refill_RE_charge(itemstack)`
|
* `technic.refill_RE_charge(itemstack)`
|
||||||
* This function fully recharges an RE chargeable item.
|
* This function fully recharges an RE chargeable item.
|
||||||
* If `technic.power_tools[itemstack:get_name()]` is `nil` (or `false`), this
|
* If `technic.power_tools[itemstack:get_name()]` is `nil` (or `false`), this
|
||||||
function does nothing, else that value is the maximum charge.
|
function does nothing, else that value is the maximum charge.
|
||||||
* The itemstack metadata is changed to contain the charge.
|
* The itemstack metadata is changed to contain the charge.
|
||||||
* `technic.is_tier_cable(nodename, tier)`
|
* `technic.get_charge(itemstack)`
|
||||||
* Tells whether the node `nodename` is the cable of the tier `tier`.
|
* Returns the charge and max charge of the given itemstack.
|
||||||
* `technic.get_cable_tier(nodename)`
|
* If the itemstack is not an RE chargeable item, both return values will be zero.
|
||||||
* Returns the tier of the cable `nodename` or `nil`.
|
* `technic.set_charge(itemstack, charge)`
|
||||||
|
* Modifies the charge of the given itemstack.
|
||||||
|
|
||||||
|
### Node-specific
|
||||||
|
* `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.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.trace_node_ray(pos, dir, range)`
|
* `technic.trace_node_ray(pos, dir, range)`
|
||||||
* Returns an iteration function (usable in the for loop) to iterate over the
|
* Returns an iteration function (usable in the for loop) to iterate over the
|
||||||
node positions along the specified ray.
|
node positions along the specified ray.
|
||||||
@ -43,91 +181,97 @@ Helper functions
|
|||||||
* `technic.trace_node_ray_fat(pos, dir, range)`
|
* `technic.trace_node_ray_fat(pos, dir, range)`
|
||||||
* Like `technic.trace_node_ray` but includes extra positions near the ray.
|
* Like `technic.trace_node_ray` but includes extra positions near the ray.
|
||||||
* The node ray functions are used for mining lasers.
|
* 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
|
## Item Definition fields
|
||||||
* `technic.register_solar_array(data)`
|
Groups:
|
||||||
* data is a table
|
|
||||||
|
|
||||||
Used itemdef fields
|
* `technic_<tier> = 1`
|
||||||
-------------------
|
* Makes the node connect to the cables of the matching tier name
|
||||||
* groups:
|
* `<tier>`: name of the tier, in lowercase (ex. `lv`)
|
||||||
* `technic_<ltier> = 1` ltier is a tier in small letters; this group makes
|
* `technic_machine = 1`
|
||||||
the node connect to the cable(s) of the right tier.
|
* UNRELIABLE. Indicates whether the item or node belongs to technic
|
||||||
* `technic_machine = 1` Currently used for
|
* `connect_sides = {"top", "left", ...}`
|
||||||
* `connect_sides`
|
* Extends the Minetest API. Indicates where the machine can be connected.
|
||||||
* In addition to the default use (see lua_api.txt), this tells where the
|
|
||||||
machine can be connected.
|
Additional definition fields:
|
||||||
#
|
|
||||||
#
|
* `<itemdef>.wear_represents = "string"`
|
||||||
* `technic_run(pos, node)`
|
* Specifies how the tool wear level is handled. Available modes:
|
||||||
* This function is currently used to update the node.
|
* `"mechanical_wear"`: represents physical damage
|
||||||
|
* `"technic_RE_charge"`: represents electrical charge
|
||||||
|
* `<itemdef>.technic_run = function(pos, node) ...`
|
||||||
|
* This callback is used to update the node.
|
||||||
Modders have to manually change the information about supply etc. in the
|
Modders have to manually change the information about supply etc. in the
|
||||||
node metadata.
|
node metadata.
|
||||||
|
* Technic-registered machines use this callback by default.
|
||||||
|
* `<itemdef>.technic_disabled_machine_name = "string"`
|
||||||
|
* Specifies the machine's node name to use when it's not connected connected to a network
|
||||||
|
* `<itemdef>.technic_on_disable = function(pos, node) ...`
|
||||||
|
* This callback is run when the machine is no longer connected to a technic-powered network.
|
||||||
|
* `<itemdef>.technic_get_charge = function(itemstack) ...`
|
||||||
|
* Optional callback to overwrite the default charge behaviour.
|
||||||
|
* `itemstack`: ItemStack, the tool to analyse
|
||||||
|
* Return values:
|
||||||
|
* `charge`: Electrical charge of the tool
|
||||||
|
* `max_charge`: Upper charge limit
|
||||||
|
* Etc. `local charge, maxcharge = itemdef.technic_get_charge(itemstack)`
|
||||||
|
* `<itemdef>.technic_set_charge = function(itemstack, charge) ...`
|
||||||
|
* Optional callback to overwrite the default charge behaviour.
|
||||||
|
* `itemstack`: ItemStack, the tool to update
|
||||||
|
* `charge`: numeric, value between `0` and `max_charge`
|
||||||
|
|
||||||
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
|
## Node Metadata fields
|
||||||
-----------------
|
|
||||||
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
|
Nodes connected to the network will have one or more of these parameters as meta
|
||||||
data:
|
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
|
* `<tier>_EU_supply` - direction: output
|
||||||
could require several supplies to work.
|
* For nodes registered as `PR` or `BA` tier
|
||||||
This way the supplies are separated per network.
|
* This is the EU value supplied by the node.
|
||||||
|
* `<tier>_EU_demand` - direction: output
|
||||||
|
* For nodes registered as `RE` or `BA` tier
|
||||||
|
* This is the EU value the node requires to run.
|
||||||
|
* `<tier>_EU_input` - direction: input
|
||||||
|
* For nodes registered as `RE` or `BA` tier
|
||||||
|
* This is the actual EU value the network can give the node.
|
||||||
|
|
||||||
|
`<tier>` corresponds to the tier name registered using
|
||||||
|
`technic.register_tier` (ex. `LV`). It is possible for the machine to depend on
|
||||||
|
multiple tiers (or networks).
|
||||||
|
|
||||||
|
|
||||||
|
## Manual: Network basics
|
||||||
|
|
||||||
|
The switching station is the center of all power distribution on an electric
|
||||||
|
network. This node is used to calculate the power supply of the network and
|
||||||
|
to distribute the power across nodes.
|
||||||
|
|
||||||
|
The switching station is the center of all electricity distribution. It collects
|
||||||
|
power from sources (PR), distributes it to sinks (RE), and uses the
|
||||||
|
excess/shortfall to charge and discharge batteries (BA).
|
||||||
|
|
||||||
|
As a thumb of rule, "EU" (energy unit) values are expressed in kW.
|
||||||
|
|
||||||
|
Network functionality:
|
||||||
|
|
||||||
|
1. All PR, BA, RE nodes are indexed and tagged with one switching station.
|
||||||
|
The tagging is a workaround to allow more stations to be built without allowing
|
||||||
|
a cheat with duplicating power.
|
||||||
|
2. All the RE nodes are queried for their current EU demand.
|
||||||
|
If the total demand is less than the available power they are all updated
|
||||||
|
with the demand number.
|
||||||
|
3. BA nodes are evenly charged from energy surplus.
|
||||||
|
4. Excess power draw will discharge batteries evenly.
|
||||||
|
5. If the total demand is more than the available power all RE nodes will be shut
|
||||||
|
down. We have a brown-out situation.
|
||||||
|
|
||||||
|
## Deprecated functions
|
||||||
|
|
||||||
|
Following functions are either no longer used by technic, or are planned to
|
||||||
|
be removed soon. Please update mods depending on technic accordingly.
|
||||||
|
|
||||||
|
* `technic.get_RE_item_load`
|
||||||
|
* Scales the tool wear to a certain numeric range
|
||||||
|
* `technic.set_RE_item_load`
|
||||||
|
* Scales a certain numeric range to the tool wear
|
||||||
|
@ -65,15 +65,26 @@ function technic.swap_node(pos, name)
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
--- Returns the meta of an item
|
||||||
|
-- Gets overridden when legacy.lua is loaded
|
||||||
|
function technic.get_stack_meta(itemstack)
|
||||||
|
return itemstack:get_meta()
|
||||||
|
end
|
||||||
|
|
||||||
|
--- Same as technic.get_stack_meta for cans
|
||||||
|
function technic.get_stack_meta_cans(itemstack)
|
||||||
|
return itemstack:get_meta()
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
--- Fully charge RE chargeable item.
|
--- Fully charge RE chargeable item.
|
||||||
-- Must be defined early to reference in item definitions.
|
-- Must be defined early to reference in item definitions.
|
||||||
function technic.refill_RE_charge(stack)
|
function technic.refill_RE_charge(stack)
|
||||||
local max_charge = technic.power_tools[stack:get_name()]
|
local max_charge = technic.power_tools[stack:get_name()]
|
||||||
if not max_charge then return stack end
|
if not max_charge then return stack end
|
||||||
|
local meta = technic.get_stack_meta(stack)
|
||||||
|
meta:set_int("technic:charge", max_charge)
|
||||||
technic.set_RE_wear(stack, max_charge, max_charge)
|
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
|
return stack
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -83,7 +94,7 @@ function technic.get_or_load_node(pos)
|
|||||||
local node = minetest.get_node_or_nil(pos)
|
local node = minetest.get_node_or_nil(pos)
|
||||||
if node then return node end
|
if node then return node end
|
||||||
local vm = VoxelManip()
|
local vm = VoxelManip()
|
||||||
local MinEdge, MaxEdge = vm:read_from_map(pos, pos)
|
local _, _ = vm:read_from_map(pos, pos)
|
||||||
return nil
|
return nil
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -91,8 +102,8 @@ end
|
|||||||
technic.tube_inject_item = pipeworks.tube_inject_item or function(pos, start_pos, velocity, item)
|
technic.tube_inject_item = pipeworks.tube_inject_item or function(pos, start_pos, velocity, item)
|
||||||
local tubed = pipeworks.tube_item(vector.new(pos), item)
|
local tubed = pipeworks.tube_item(vector.new(pos), item)
|
||||||
tubed:get_luaentity().start_pos = vector.new(start_pos)
|
tubed:get_luaentity().start_pos = vector.new(start_pos)
|
||||||
tubed:setvelocity(velocity)
|
tubed:set_velocity(velocity)
|
||||||
tubed:setacceleration(vector.new(0, 0, 0))
|
tubed:set_acceleration(vector.new(0, 0, 0))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
@ -221,4 +232,3 @@ function technic.trace_node_ray_fat(pos, dir, range)
|
|||||||
return p
|
return p
|
||||||
end, vector.round(pos)
|
end, vector.round(pos)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -1,7 +1,11 @@
|
|||||||
-- Minetest 0.4.7 mod: technic
|
|
||||||
-- namespace: technic
|
-- namespace: technic
|
||||||
-- (c) 2012-2013 by RealBadAngel <mk@realbadangel.pl>
|
-- (c) 2012-2013 by RealBadAngel <mk@realbadangel.pl>
|
||||||
|
|
||||||
|
if not minetest.get_translator then
|
||||||
|
error("[technic] Your Minetest version is no longer supported."
|
||||||
|
.. " (version < 5.0.0)")
|
||||||
|
end
|
||||||
|
|
||||||
local load_start = os.clock()
|
local load_start = os.clock()
|
||||||
|
|
||||||
technic = rawget(_G, "technic") or {}
|
technic = rawget(_G, "technic") or {}
|
||||||
@ -16,7 +20,17 @@ technic.modpath = modpath
|
|||||||
if rawget(_G, "intllib") then
|
if rawget(_G, "intllib") then
|
||||||
technic.getter = intllib.Getter()
|
technic.getter = intllib.Getter()
|
||||||
else
|
else
|
||||||
technic.getter = function(s,a,...)if a==nil then return s end a={a,...}return s:gsub("(@?)@(%(?)(%d+)(%)?)",function(e,o,n,c)if e==""then return a[tonumber(n)]..(o==""and c or"")else return"@"..o..n..c end end) end
|
-- Intllib copypasta: TODO replace with the client-side translation API
|
||||||
|
technic.getter = function(s,a,...)
|
||||||
|
if a==nil then return s end
|
||||||
|
a={a,...}
|
||||||
|
return s:gsub("(@?)@(%(?)(%d+)(%)?)", function(e,o,n,c)
|
||||||
|
if e==""then
|
||||||
|
return a[tonumber(n)]..(o==""and c or"")
|
||||||
|
end
|
||||||
|
return "@"..o..n..c
|
||||||
|
end)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
local S = technic.getter
|
local S = technic.getter
|
||||||
|
|
||||||
|
@ -69,32 +69,11 @@ minetest.register_tool("technic:red_energy_crystal", {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
minetest.register_craftitem("technic:fine_copper_wire", {
|
|
||||||
description = S("Fine Copper Wire"),
|
|
||||||
inventory_image = "technic_fine_copper_wire.png",
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craftitem("technic:fine_gold_wire", {
|
|
||||||
description = S("Fine Gold Wire"),
|
|
||||||
inventory_image = "technic_fine_gold_wire.png",
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craftitem("technic:fine_silver_wire", {
|
|
||||||
description = S("Fine Silver Wire"),
|
|
||||||
inventory_image = "technic_fine_silver_wire.png",
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craftitem("technic:copper_coil", {
|
minetest.register_craftitem("technic:copper_coil", {
|
||||||
description = S("Copper Coil"),
|
description = S("Copper Coil"),
|
||||||
inventory_image = "technic_copper_coil.png",
|
inventory_image = "technic_copper_coil.png",
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craftitem("technic:motor", {
|
|
||||||
description = S("Electric Motor"),
|
|
||||||
inventory_image = "technic_motor.png",
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craftitem("technic:lv_transformer", {
|
minetest.register_craftitem("technic:lv_transformer", {
|
||||||
description = S("Low Voltage Transformer"),
|
description = S("Low Voltage Transformer"),
|
||||||
inventory_image = "technic_lv_transformer.png",
|
inventory_image = "technic_lv_transformer.png",
|
||||||
@ -155,6 +134,11 @@ minetest.register_node("technic:machine_casing", {
|
|||||||
sounds = default.node_sound_stone_defaults(),
|
sounds = default.node_sound_stone_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
|
minetest.register_craftitem("technic:rubber_goo", {
|
||||||
|
description = S("Rubber Goo"),
|
||||||
|
inventory_image = "technic_rubber_goo.png",
|
||||||
|
})
|
||||||
|
|
||||||
for p = 0, 35 do
|
for p = 0, 35 do
|
||||||
local nici = (p ~= 0 and p ~= 7 and p ~= 35) and 1 or nil
|
local nici = (p ~= 0 and p ~= 7 and p ~= 35) and 1 or nil
|
||||||
local psuffix = p == 7 and "" or p
|
local psuffix = p == 7 and "" or p
|
||||||
|
@ -39,3 +39,40 @@ for i = 0, 64 do
|
|||||||
minetest.register_alias("technic:lv_cable"..i, "technic:lv_cable")
|
minetest.register_alias("technic:lv_cable"..i, "technic:lv_cable")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Item meta
|
||||||
|
|
||||||
|
-- Meta keys that have changed
|
||||||
|
technic.legacy_meta_keys = {
|
||||||
|
["charge"] = "technic:charge",
|
||||||
|
}
|
||||||
|
|
||||||
|
-- Converts legacy itemstack metadata string to itemstack meta and returns the ItemStackMetaRef
|
||||||
|
function technic.get_stack_meta(itemstack)
|
||||||
|
local meta = itemstack:get_meta()
|
||||||
|
local legacy_string = meta:get("") -- Get deprecated metadata
|
||||||
|
if legacy_string then
|
||||||
|
local legacy_table = minetest.deserialize(legacy_string)
|
||||||
|
if legacy_table then
|
||||||
|
local table = meta:to_table()
|
||||||
|
for k, v in pairs(legacy_table) do
|
||||||
|
table.fields[technic.legacy_meta_keys[k] or k] = v
|
||||||
|
end
|
||||||
|
meta:from_table(table)
|
||||||
|
end
|
||||||
|
meta:set_string("", "") -- Remove deprecated metadata
|
||||||
|
end
|
||||||
|
return meta
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Same as technic.get_stack_meta for cans.
|
||||||
|
-- (Cans didn't store a serialized table in the legacy metadata string, but just a number.)
|
||||||
|
function technic.get_stack_meta_cans(itemstack)
|
||||||
|
local meta = itemstack:get_meta()
|
||||||
|
local legacy_string = meta:get("") -- Get deprecated metadata
|
||||||
|
if legacy_string then
|
||||||
|
meta:set_string("can_level", legacy_string)
|
||||||
|
meta:set_string("", "") -- Remove deprecated metadata
|
||||||
|
return meta
|
||||||
|
end
|
||||||
|
return meta
|
||||||
|
end
|
||||||
|
@ -67,7 +67,6 @@ Disabled =
|
|||||||
%s Alloy Furnace = %s Legierungsofen
|
%s Alloy Furnace = %s Legierungsofen
|
||||||
%s Battery Box = %s Batteriebox
|
%s Battery Box = %s Batteriebox
|
||||||
%s Cable = %s Kabel
|
%s Cable = %s Kabel
|
||||||
%s CNC Machine = %s CNC-Maschine
|
|
||||||
%s Compressor = %s Kompressor
|
%s Compressor = %s Kompressor
|
||||||
%s Extractor = %s Extraktor
|
%s Extractor = %s Extraktor
|
||||||
%s Forcefield Emitter = %s Kraftfeld-Emitter
|
%s Forcefield Emitter = %s Kraftfeld-Emitter
|
||||||
@ -121,41 +120,6 @@ Digging finished =
|
|||||||
Digging %d m above machine =
|
Digging %d m above machine =
|
||||||
Digging %d m below machine =
|
Digging %d m below machine =
|
||||||
|
|
||||||
## CNC
|
|
||||||
Cylinder = Zylinder
|
|
||||||
Element Cross = Halbes Kreuzelement
|
|
||||||
Element Cross Double = Kreuzelement
|
|
||||||
Element Edge = Halbes Eckelement
|
|
||||||
Element Edge Double = Eckelement
|
|
||||||
Element End = Halbes Endelement
|
|
||||||
Element End Double = Endelement
|
|
||||||
Element Straight = Halbes aufrechtes Element
|
|
||||||
Element Straight Double = Aufrechtes Element
|
|
||||||
Element T = Halbes T-Element
|
|
||||||
Element T Double = T-Element
|
|
||||||
Horizontal Cylinder = Liegender Zylinder
|
|
||||||
One Curved Edge Block = Block mit einer abgerundeten Kante
|
|
||||||
Pyramid = Pyramide
|
|
||||||
Slope = Schraege
|
|
||||||
Slope Edge = Schraege mit Ecke
|
|
||||||
Slope Inner Edge = Schraege mit Innenecke
|
|
||||||
Slope Lying = Liegende Schraege
|
|
||||||
Slope Upside Down = Umgedrehte Schraege
|
|
||||||
Slope Upside Down Edge = Umgedrehte Schraege mit Ecke
|
|
||||||
Slope Upside Down Inner Edge = Umgedrehte Schraege mit Innenecke
|
|
||||||
Sphere = Kugel
|
|
||||||
Spike = Spitze
|
|
||||||
Stick = Stange
|
|
||||||
Two Curved Edge Block = Block mit zwei abgerundeten Kanten
|
|
||||||
Brick = Ziegel:
|
|
||||||
Cobble = Pflasterstein:
|
|
||||||
Dirt = Erde:
|
|
||||||
Leaves = Laub:
|
|
||||||
Sandstone = Sandstein:
|
|
||||||
Stone = Stein:
|
|
||||||
Tree = Baumstamm:
|
|
||||||
Wooden = Holz:
|
|
||||||
|
|
||||||
## Grinder Recipes
|
## Grinder Recipes
|
||||||
# $1: Name
|
# $1: Name
|
||||||
%s Dust = %sstaub
|
%s Dust = %sstaub
|
||||||
|
@ -63,7 +63,6 @@ Disabled =
|
|||||||
%s Alloy Furnace = Horno de Aleacion %s
|
%s Alloy Furnace = Horno de Aleacion %s
|
||||||
%s Battery Box = Caja de Bateria %s
|
%s Battery Box = Caja de Bateria %s
|
||||||
%s Cable = Cable %s
|
%s Cable = Cable %s
|
||||||
%s CNC Machine = Maquina CNC %s
|
|
||||||
%s Compressor = Compresor %s
|
%s Compressor = Compresor %s
|
||||||
%s Extractor = Extractor %s
|
%s Extractor = Extractor %s
|
||||||
%s Forcefield Emitter = Emisor de Campo de Fuerza %s
|
%s Forcefield Emitter = Emisor de Campo de Fuerza %s
|
||||||
@ -115,40 +114,6 @@ Digging finished =
|
|||||||
Digging %d m above machine =
|
Digging %d m above machine =
|
||||||
Digging %d m below machine =
|
Digging %d m below machine =
|
||||||
|
|
||||||
## CNC Machine
|
|
||||||
Element Edge = Elemento Borde
|
|
||||||
Tree = Arbol
|
|
||||||
Element Cross Double = Elemento Cruz Doble
|
|
||||||
Spike = Pica
|
|
||||||
Element Edge Double = Elemento Borde Doble
|
|
||||||
Two Curved Edge Block = Dos Bloques de Borde Curvados
|
|
||||||
Pyramid = Piramide
|
|
||||||
Slope Upside Down Inner Edge = Borde Interno de Rampa Al Reves
|
|
||||||
Slope Upside Down Edge = Borde de Rampa Al Reves
|
|
||||||
Element Straight Double = Elemento Doble Recto
|
|
||||||
Sphere = Esfera
|
|
||||||
Element End Double = Doble Fin de Elemento
|
|
||||||
Element Straight = Recta de Elemento
|
|
||||||
Horizontal Cylinder = Cilindro Horizontal
|
|
||||||
Slope Inner Edge = Borde Interno de Rampa
|
|
||||||
One Curved Edge Block = Un Bloque de Borde Curvado
|
|
||||||
Element Cross = Cruce de Elementos
|
|
||||||
Stick = Varita
|
|
||||||
Element End = Fin de Elemento
|
|
||||||
Slope Lying = Rampa en Reposo
|
|
||||||
Slope Upside Down = Rampa Al Reves
|
|
||||||
Slope Edge = Borde de Rampa
|
|
||||||
Slope = Rampa
|
|
||||||
Element T = Elemento T
|
|
||||||
Cylinder = Cilindro
|
|
||||||
Cobble = Adoquines
|
|
||||||
Stone = Piedra
|
|
||||||
Brick = Ladrillo
|
|
||||||
Dirt = Tierra
|
|
||||||
Sandstone = Arenisca
|
|
||||||
Wooden = Madera
|
|
||||||
Leaves = Hojas
|
|
||||||
|
|
||||||
## Grinder Recipes
|
## Grinder Recipes
|
||||||
# $1: Name
|
# $1: Name
|
||||||
%s Dust = Polvo de %s
|
%s Dust = Polvo de %s
|
||||||
|
215
technic/locale/fr.txt
Normal file
@ -0,0 +1,215 @@
|
|||||||
|
# template.txt
|
||||||
|
# Template for translations of Technic
|
||||||
|
|
||||||
|
## Misc
|
||||||
|
[Technic] Loaded in %f seconds = [Technic] Chargement en %f secondes
|
||||||
|
|
||||||
|
## Items
|
||||||
|
Silicon Wafer = Tranche de silicium
|
||||||
|
Doped Silicon Wafer = Tranche de silicium doppée
|
||||||
|
Enriched Uranium = Uranium enrichi
|
||||||
|
Uranium Fuel = Uranium 235
|
||||||
|
Diamond Drill Head = Tête de forage en diamant
|
||||||
|
Blue Energy Crystal = Cristal d'énergie bleu
|
||||||
|
Green Energy Crystal = Cristal d'énergie vert
|
||||||
|
Red Energy Crystal = Cristal d'énergie rouge
|
||||||
|
Fine Copper Wire = Fil en cuivre fin
|
||||||
|
Fine Gold Wire = Fil en or fin
|
||||||
|
Fine Silver Wire = Fil en argent fin
|
||||||
|
Copper Coil = Bobine de cuivre
|
||||||
|
Electric Motor = Moteur électrique
|
||||||
|
Low Voltage Transformer = Transformateur basse tension
|
||||||
|
Medium Voltage Transformer = Transformateur moyenne tension
|
||||||
|
High Voltage Transformer = Transformateur haute tension
|
||||||
|
Control Logic Unit = Unité de contrôle logique
|
||||||
|
Mixed Metal Ingot = Lingot de métal allié
|
||||||
|
Composite Plate = Plaque composite
|
||||||
|
Copper Plate = Plaque de cuivre
|
||||||
|
Carbon Plate = Plaque de carbone
|
||||||
|
Graphite = Graphite
|
||||||
|
Carbon Cloth = Fibre de carbone
|
||||||
|
Raw Latex = Latex brut
|
||||||
|
Rubber Fiber = Fibre de caoutchouc
|
||||||
|
%.1f%%-Fissile Uranium Ingot = Lingot d'uranium fissile (%.1f%%)
|
||||||
|
%.1f%%-Fissile Uranium Block = Bloc d'uranium fissile (%.1f%%)
|
||||||
|
|
||||||
|
## Machine misc
|
||||||
|
Machine cannot be removed because it is not empty = La machine ne peut pas être retirée car elle n'est pas vide
|
||||||
|
Inventory move disallowed due to protection = Le mouvement d'inventaire n'est pas autorisé en raison de la protection
|
||||||
|
|
||||||
|
# $1: Machine name (Includes tier)
|
||||||
|
@1 Active (@2 EU) = @1 Active (@2 EU)
|
||||||
|
%s Active = %s actif
|
||||||
|
%s Disabled = %s désactivé
|
||||||
|
%s Enabled = %s activé
|
||||||
|
%s Idle = %s au repos
|
||||||
|
%s Improperly Placed = %s est mal placé
|
||||||
|
%s is empty = %s est vide
|
||||||
|
%s Unpowered = %s non alimenté en énergie
|
||||||
|
%s Out Of Fuel = %s plus de carburant
|
||||||
|
%s Has Bad Cabling = %s est mal cablé
|
||||||
|
%s (Slave) = %s (esclave)
|
||||||
|
%s Has No Network = %s n'a pas de réseau
|
||||||
|
%s Finished = %s a fini
|
||||||
|
Enable/Disable = Activer/Désactiver
|
||||||
|
Range = Plage
|
||||||
|
Upgrade Slots = Emplacement d'amélioration
|
||||||
|
In: = Entrée :
|
||||||
|
Out: = Sortie :
|
||||||
|
Slot %d = Emplacement %d
|
||||||
|
Itemwise = Item par Item
|
||||||
|
Stackwise = Stack par Stack
|
||||||
|
Ignoring Mesecon Signal = Ignorer le signal Mesecon
|
||||||
|
Controlled by Mesecon Signal = Contrôlé par signal Mesecon
|
||||||
|
Owner: = Propriétaire :
|
||||||
|
Unlocked = Déverrouillé
|
||||||
|
Locked = Verrouillé
|
||||||
|
Radius: = Rayon :
|
||||||
|
Enabled = Activé
|
||||||
|
Disabled = Désactivé
|
||||||
|
|
||||||
|
## Machine names
|
||||||
|
# $1: Tier
|
||||||
|
%s Alloy Furnace = Four à alliage %s
|
||||||
|
%s Battery Box = Batterie %s
|
||||||
|
%s Cable = Câble %s
|
||||||
|
%s CNC Machine = Machine-outils %s
|
||||||
|
%s Centrifuge = Centrifugeuse %s
|
||||||
|
%s Compressor = Compresseur %s
|
||||||
|
%s Extractor = Extracteur %s
|
||||||
|
%s Forcefield Emitter = Emetteur de champ de force %s
|
||||||
|
%s Furnace = Four %s
|
||||||
|
%s Grinder = Broyeur %s
|
||||||
|
%s Music Player = Grammophone %s
|
||||||
|
%s Quarry = Carrière %s
|
||||||
|
%s Tool Workshop = Atelier d'outillage %s
|
||||||
|
Arrayed Solar %s Generator = Générateur solaire %s
|
||||||
|
Fuel-Fired %s Generator = Générateur thermique %s
|
||||||
|
Geothermal %s Generator = Géénarteur géothermique %s
|
||||||
|
Hydro %s Generator = Générateur hydroélectrique %s
|
||||||
|
Nuclear %s Generator Core = Générateur nucléaire %
|
||||||
|
Small Solar %s Generator = Petit générateur solaire %s
|
||||||
|
Wind %s Generator = Générateur éolien %s
|
||||||
|
Self-Contained Injector = Injecteur autonome
|
||||||
|
Constructor Mk%d = Constructeur Mk%d
|
||||||
|
Frame = Cadre
|
||||||
|
Frame Motor = Cadre de moteur
|
||||||
|
Template = Modèle
|
||||||
|
Template (replacing) =
|
||||||
|
Template Motor =
|
||||||
|
Template Tool =
|
||||||
|
Battery Box = Compartiment à batterie
|
||||||
|
Supply Converter = Convertisseur de tension
|
||||||
|
Switching Station = Station de commutation
|
||||||
|
Fuel-Fired Alloy Furnace = Four à alliage à carburant
|
||||||
|
Fuel-Fired Furnace = Four à carburant
|
||||||
|
Wind Mill Frame = Cadre d'éolienne
|
||||||
|
Forcefield = Champ de force
|
||||||
|
Nuclear Reactor Rod Compartment = Compartiment à barres du réacteur nucléaire
|
||||||
|
Administrative World Anchor =
|
||||||
|
|
||||||
|
## Machine-specific
|
||||||
|
# $1: Pruduced EU
|
||||||
|
Charge = Charger
|
||||||
|
Discharge = Décharger
|
||||||
|
Power level = Niveau d'énergie
|
||||||
|
|
||||||
|
# $1: Tier $2: current_charge $3: max_charge
|
||||||
|
@1 Battery Box: @2/@3 = @1 batterie : @2/@3
|
||||||
|
|
||||||
|
# $1: Machine name $2: Supply $3: Demand
|
||||||
|
@1. Supply: @2 Demand: @3 = @1. fournit : @2 demande : @3
|
||||||
|
Production at %d%% = Production à %d%%
|
||||||
|
Choose Milling Program: = Choisissez le programme de fraisage :
|
||||||
|
Slim Elements half / normal height: =
|
||||||
|
Current track %s = Morceau actuel %s
|
||||||
|
Stopped = Arrêté
|
||||||
|
Keeping %d/%d map blocks loaded =
|
||||||
|
Digging not started = Creusement non démarré
|
||||||
|
Digging finished = Creusement terminé
|
||||||
|
Digging %d m above machine = Creusement à %dm au dessus de la machine
|
||||||
|
Digging %d m below machine = Creusement à %dm en dessous de la machine
|
||||||
|
@1 (@2 @3 -> @4 @5) = @1 (@2 @3 -> @4 @5)
|
||||||
|
|
||||||
|
## CNC
|
||||||
|
Cylinder =
|
||||||
|
Element Cross = Elément croisé
|
||||||
|
Element Cross Double = Elément croisé (double)
|
||||||
|
Element Edge = Elément de bordure
|
||||||
|
Element Edge Double = Elément de bordure (double)
|
||||||
|
Element End = Elément de fin
|
||||||
|
Element End Double = Elément de fin (double)
|
||||||
|
Element Straight = Elément droit
|
||||||
|
Element Straight Double = Elément droit (double)
|
||||||
|
Element T = Elément en T
|
||||||
|
Element T Double = Elément en T (double)
|
||||||
|
Horizontal Cylinder = Cylindre horizontal
|
||||||
|
One Curved Edge Block = Bloc à un bord incurvé
|
||||||
|
Pyramid = Pyramide
|
||||||
|
Slope = Pente
|
||||||
|
Slope Edge =
|
||||||
|
Slope Inner Edge =
|
||||||
|
Slope Lying =
|
||||||
|
Slope Upside Down =
|
||||||
|
Slope Upside Down Edge =
|
||||||
|
Slope Upside Down Inner Edge =
|
||||||
|
Sphere = Sphère
|
||||||
|
Spike = Pointe
|
||||||
|
Stick = Bâton
|
||||||
|
Two Curved Edge Block = Bloc à deux bords incurvés
|
||||||
|
Brick = Brique
|
||||||
|
Cobble = Pierre taillée
|
||||||
|
Dirt = Terre
|
||||||
|
Leaves = Feuilles
|
||||||
|
Sandstone = Grès
|
||||||
|
Stone = Pierre
|
||||||
|
Tree = Arbre
|
||||||
|
Wooden = Bois
|
||||||
|
|
||||||
|
## Grinder Recipes
|
||||||
|
# $1: Name
|
||||||
|
%s Dust = Poudre de %s
|
||||||
|
Akalin =
|
||||||
|
Alatro =
|
||||||
|
Arol =
|
||||||
|
Brass = Laiton
|
||||||
|
Bronze = Bronze
|
||||||
|
Carbon Steel = Acier au carbone
|
||||||
|
Cast Iron = Fonte
|
||||||
|
Chromium = Chrome
|
||||||
|
Coal = Charbon
|
||||||
|
Copper = Cuivre
|
||||||
|
Gold = Or
|
||||||
|
Mithril = Mithril
|
||||||
|
Silver = Argent
|
||||||
|
Stainless Steel = Acier inoxydable
|
||||||
|
Talinite = Talanite
|
||||||
|
Tin = Etain
|
||||||
|
Wrought Iron = Fer
|
||||||
|
Zinc = Zinc
|
||||||
|
%.1f%%-Fissile Uranium = Uranium fissile (%.1f%%)
|
||||||
|
|
||||||
|
## Tools
|
||||||
|
RE Battery = Batterie RE
|
||||||
|
Water Can = Jerrycan d'eau
|
||||||
|
Lava Can = Jerrycan de lave
|
||||||
|
Chainsaw = Tronçonneuse
|
||||||
|
Flashlight = Lampe-torche
|
||||||
|
3 nodes deep. =
|
||||||
|
3 nodes tall. =
|
||||||
|
3 nodes wide. =
|
||||||
|
3x3 nodes. =
|
||||||
|
Use while sneaking to change Mining Drill Mk%d modes. =
|
||||||
|
Mining Drill Mk%d Mode %d = Foreuse Mk%d Mode %d
|
||||||
|
Mining Drill Mk%d = Foreuse Mk%d
|
||||||
|
Mining Laser Mk%d = Foreuse laser Mk%d
|
||||||
|
Single node. = Mode simple.
|
||||||
|
Sonic Screwdriver = Tournevis supersonique
|
||||||
|
Tree Tap = Robinet à sève
|
||||||
|
|
||||||
|
## Craft descriptions
|
||||||
|
Alloy cooking = Fonderie d'alliage
|
||||||
|
Grinding = Broyage
|
||||||
|
Compressing = Compression
|
||||||
|
Extracting = Extraction
|
||||||
|
Separating = Séparation
|
@ -64,7 +64,6 @@ Disabled = Disabilitato
|
|||||||
%s Alloy Furnace = %s Fornace per leghe
|
%s Alloy Furnace = %s Fornace per leghe
|
||||||
%s Battery Box = %s Box batterie
|
%s Battery Box = %s Box batterie
|
||||||
%s Cable = Cavo %s
|
%s Cable = Cavo %s
|
||||||
%s CNC Machine = Tornio CNC %s
|
|
||||||
%s Compressor = Compressore %s
|
%s Compressor = Compressore %s
|
||||||
%s Extractor = Estrattore %s
|
%s Extractor = Estrattore %s
|
||||||
%s Forcefield Emitter = Emettitore di campo di forza %s
|
%s Forcefield Emitter = Emettitore di campo di forza %s
|
||||||
@ -118,41 +117,6 @@ Digging finished = Scavo finito
|
|||||||
Digging %d m above machine = Scavo di %d m sopra la macchina
|
Digging %d m above machine = Scavo di %d m sopra la macchina
|
||||||
Digging %d m below machine = Scavo di %d m sotto la macchina
|
Digging %d m below machine = Scavo di %d m sotto la macchina
|
||||||
|
|
||||||
## CNC
|
|
||||||
Cylinder = Cilindro
|
|
||||||
Element Cross = Elemento a croce
|
|
||||||
Element Cross Double = Elemento a croce doppio
|
|
||||||
Element Edge = Elemento bordo
|
|
||||||
Element Edge Double = Elemento bordo doppio
|
|
||||||
Element End = Elemento finale
|
|
||||||
Element End Double = Elemento finale doppio
|
|
||||||
Element Straight = Elemento dritto
|
|
||||||
Element Straight Double = Elemento dritto doppio
|
|
||||||
Element T = Elemento a T
|
|
||||||
Element T Double = Elemento a T doppio
|
|
||||||
Horizontal Cylinder = Cilindro orizzontale
|
|
||||||
One Curved Edge Block = Blocco con bordo curvo
|
|
||||||
Pyramid = Piramide
|
|
||||||
Slope = Inclinato
|
|
||||||
Slope Edge = Bordo inclinato
|
|
||||||
Slope Inner Edge = Bordo interno inclinato
|
|
||||||
Slope Lying = Pendenza bugiarda
|
|
||||||
Slope Upside Down = Pendenza capovolta
|
|
||||||
Slope Upside Down Edge = Bordo inclinato capovolto
|
|
||||||
Slope Upside Down Inner Edge = Bordo interno inclinato capovolto
|
|
||||||
Sphere = Sfera
|
|
||||||
Spike = Spuntone
|
|
||||||
Stick = Bastone
|
|
||||||
Two Curved Edge Block = Blocco con bordo a doppia curva
|
|
||||||
Brick = Mattone
|
|
||||||
Cobble = Ciottolato
|
|
||||||
Dirt = Terra
|
|
||||||
Leaves = Foglie
|
|
||||||
Sandstone = Arenaria
|
|
||||||
Stone = Pietra
|
|
||||||
Tree = Albero
|
|
||||||
Wooden = Legno
|
|
||||||
|
|
||||||
## Grinder Recipes
|
## Grinder Recipes
|
||||||
# $1: Name
|
# $1: Name
|
||||||
%s Dust = Polvere di %s
|
%s Dust = Polvere di %s
|
||||||
|
175
technic/locale/pl.txt
Normal file
@ -0,0 +1,175 @@
|
|||||||
|
# Polish Translation for Technic mod
|
||||||
|
# Polskie tłumaczenie Technic mod
|
||||||
|
# by mat9117
|
||||||
|
|
||||||
|
## Misc
|
||||||
|
[Technic] Loaded in %f seconds = [Technic] Wczytany w %f sekund
|
||||||
|
|
||||||
|
## Items
|
||||||
|
Silicon Wafer = Płytka krzemowa
|
||||||
|
Doped Silicon Wafer = Domieszkowana płytka krzemowa
|
||||||
|
Enriched Uranium = Wzbogacony uran
|
||||||
|
Uranium Fuel = Paliwo uranowe
|
||||||
|
Diamond Drill Head = Diamentowa głowica wiertła
|
||||||
|
Blue Energy Crystal = Niebieski kryształ energii
|
||||||
|
Green Energy Crystal = Zielony kryształ energii
|
||||||
|
Red Energy Crystal = Czerwony kryształ energii
|
||||||
|
Fine Copper Wire = Cienki miedziany drut
|
||||||
|
Copper Coil = Miedziana cewka
|
||||||
|
Electric Motor = Silnik elektryczny
|
||||||
|
Low Voltage Transformer = Transformator niskiego napięcia
|
||||||
|
Medium Voltage Transformer = Transformator średniego napięcia
|
||||||
|
High Voltage Transformer = Transformator wysokiego napięcia
|
||||||
|
Control Logic Unit = Jednostka sterująca
|
||||||
|
Mixed Metal Ingot = Sztabka zmieszanych metali
|
||||||
|
Composite Plate = Płytka kompozytowa
|
||||||
|
Copper Plate = Płytka miedziana
|
||||||
|
Carbon Plate = Płytka węglowa
|
||||||
|
Graphite = Grafit
|
||||||
|
Carbon Cloth = Włókno węglowe
|
||||||
|
Raw Latex = Lateks naturalny
|
||||||
|
Rubber Fiber = Włókno gumowe
|
||||||
|
%.1f%%-Fissile Uranium Ingot = %.1f%% Sztabka uranu
|
||||||
|
%.1f%%-Fissile Uranium Block = %.1f%% Blok uranu
|
||||||
|
|
||||||
|
## Machine misc
|
||||||
|
Machine cannot be removed because it is not empty = Nie można usunąć maszyny, ponieważ nie jest pusta
|
||||||
|
Inventory move disallowed due to protection = Przenoszenie rzeczy z ekwipunku niemożliwe z powodu ochrony
|
||||||
|
# $1: Machine name (Includes tier)
|
||||||
|
@1 Active (@2 EU) = @1 Aktywny (@2 EU)
|
||||||
|
%s Active = %s Aktywny/a
|
||||||
|
%s Disabled = %s Wyłączony/a
|
||||||
|
%s Enabled = %s Włączony/a
|
||||||
|
%s Idle = %s Bezczynny/a
|
||||||
|
%s Improperly Placed = %s Ustawiony/a nieprawidłowo
|
||||||
|
%s is empty = %s jest pusty/a
|
||||||
|
%s Unpowered = %s brak zasilania
|
||||||
|
%s Out Of Fuel = %s brak paliwa
|
||||||
|
%s Has Bad Cabling = %s Źle podłączono kable
|
||||||
|
%s (Slave) =
|
||||||
|
%s Has No Network = %s Nie podłączony/a do sieci
|
||||||
|
%s Finished = %s Ukończony
|
||||||
|
Enable/Disable = Włącz/Wyłącz
|
||||||
|
Range = Zasięg
|
||||||
|
Upgrade Slots = Miejsca na ulepszenia
|
||||||
|
In: = Wejście
|
||||||
|
Out: = Wyjście
|
||||||
|
Slot %d = Otwór %d
|
||||||
|
Itemwise = Jeden przedmiot
|
||||||
|
Stackwise = Cały stack
|
||||||
|
Ignoring Mesecon Signal = Ignoruj sygnał Mesecon
|
||||||
|
Controlled by Mesecon Signal = Sterowany sygnałem Mesecon
|
||||||
|
Owner: = Właściciel:
|
||||||
|
Unlocked = Odblokowany/a
|
||||||
|
Locked = Zablokowany/a
|
||||||
|
Radius: = Promień:
|
||||||
|
Enabled = Włączony/a
|
||||||
|
Disabled = Wyłączony/a
|
||||||
|
|
||||||
|
## Machine names
|
||||||
|
# $1: Tier
|
||||||
|
%s Alloy Furnace = %s Piec stopowy
|
||||||
|
%s Battery Box = %s Skrzynka baterii
|
||||||
|
%s Cable = %s Przewód
|
||||||
|
%s Centrifuge = %s Centryfuga
|
||||||
|
%s Compressor = %s Kompresor
|
||||||
|
%s Extractor = %s Ekstraktor
|
||||||
|
%s Forcefield Emitter = %s Emiter pola siłowego
|
||||||
|
%s Furnace = %s Piec
|
||||||
|
%s Grinder = %s Młynek
|
||||||
|
%s Music Player = %s Odtwarzacz muzyki
|
||||||
|
%s Quarry = %s Kamieniołom
|
||||||
|
%s Tool Workshop = %s Warsztat narzędzi
|
||||||
|
Arrayed Solar %s Generator = %s Szeregowy generator słoneczny
|
||||||
|
Fuel-Fired %s Generator = %s Generator zasilany paliwem
|
||||||
|
Geothermal %s Generator = %s Generator geotermalny
|
||||||
|
Hydro %s Generator = %s Hydrogenerator
|
||||||
|
Nuclear %s Generator Core = %s Reaktor atomowy
|
||||||
|
Small Solar %s Generator = %s Mały generator słoneczny
|
||||||
|
Wind %s Generator = %s Generator wiatrowy
|
||||||
|
Self-Contained Injector = Samowystarczalny wtryskiwacz
|
||||||
|
Constructor Mk%d = Konstruktor Mk%d
|
||||||
|
Frame = Klatka
|
||||||
|
Frame Motor = Silnik klatkowy
|
||||||
|
Template = Szablon
|
||||||
|
Template (replacing) = Szablon (zastępczy)
|
||||||
|
Template Motor =Szablon silnika
|
||||||
|
Template Tool = Szablon narzędzia
|
||||||
|
Battery Box = Skrzynka baterii
|
||||||
|
Supply Converter = Konwerter zasilania
|
||||||
|
Switching Station = Rozdzielnia
|
||||||
|
Fuel-Fired Alloy Furnace = Piec stopowy zasilany paliwem
|
||||||
|
Fuel-Fired Furnace = Piec zasilany paliwem
|
||||||
|
Wind Mill Frame = Klatka wiatraka
|
||||||
|
Forcefield = Pole siłowe
|
||||||
|
Nuclear Reactor Rod Compartment = Komora rdzenia reaktora atomowego
|
||||||
|
Administrative World Anchor = Administracyjna kotwica świata
|
||||||
|
|
||||||
|
## Machine-specific
|
||||||
|
# $1: Pruduced EU
|
||||||
|
Charge = Ładuj
|
||||||
|
Discharge = Rozładuj
|
||||||
|
Power level = Poziom zasilania
|
||||||
|
# $1: Tier $2: current_charge $3: max_charge
|
||||||
|
@1 Battery Box: @2/@3 = @1 Skrzynka baterii: @2/@3
|
||||||
|
# $1: Machine name $2: Supply $3: Demand
|
||||||
|
@1. Supply: @2 Demand: @3 = @1. Zapas: @2 Pobór: @3
|
||||||
|
Production at %d%% = Produkowanie w %d%%
|
||||||
|
Choose Milling Program: = Wybierz program mielenia:
|
||||||
|
Slim Elements half / normal height: = Małe elementy połowa / normalna wysokość:
|
||||||
|
Current track %s =
|
||||||
|
Stopped = Zatrzymany/a
|
||||||
|
Keeping %d/%d map blocks loaded = Ciągle ładuję %d/%d bloki mapy
|
||||||
|
Digging not started = Nie rozpoczęto kopania
|
||||||
|
Digging finished = Kopanie skończone
|
||||||
|
Digging %d m above machine = Kopię %d m nad maszyną
|
||||||
|
Digging %d m below machine = Kopię %d m pod maszyną
|
||||||
|
@1 (@2 @3 -> @4 @5) = @1 (@2 @3 -> @4 @5)
|
||||||
|
|
||||||
|
## Grinder Recipes
|
||||||
|
# $1: Name
|
||||||
|
%s Dust = %s Pył
|
||||||
|
Akalin = Akalinowy
|
||||||
|
Alatro = Alatrowy
|
||||||
|
Arol = Arolowy
|
||||||
|
Brass = Mosiądzu
|
||||||
|
Bronze = Brązu
|
||||||
|
Carbon Steel = Stali węglowej
|
||||||
|
Cast Iron = Żeliwa
|
||||||
|
Chromium = Chromu
|
||||||
|
Coal = Węglowy
|
||||||
|
Copper = Miedzi
|
||||||
|
Gold = Złoty
|
||||||
|
Mithril = Mithrilu
|
||||||
|
Silver = Srebrny
|
||||||
|
Stainless Steel = Stali nierdzewnej
|
||||||
|
Talinite = Talinitu
|
||||||
|
Tin = Cyny
|
||||||
|
Wrought Iron = Kutego żelaza
|
||||||
|
Zinc = Cynku
|
||||||
|
%.1f%%-Fissile Uranium = %.1f%% Uranu
|
||||||
|
|
||||||
|
## Tools
|
||||||
|
RE Battery = Bateria ładowalna
|
||||||
|
Water Can = Kanister wody
|
||||||
|
Lava Can = Kanister lawy
|
||||||
|
Chainsaw = Piła łańcuchowa
|
||||||
|
Flashlight = Latarka
|
||||||
|
3 nodes deep. = Głęboki na 3 bloki.
|
||||||
|
3 nodes tall. = Wysoki na 3 bloki.
|
||||||
|
3 nodes wide. = Szeroki na 3 bloki.
|
||||||
|
3x3 nodes. = 3x3 bloki.
|
||||||
|
Use while sneaking to change Mining Drill Mk%d modes. = Użyj podczas skradania, aby zmienić tryby wiertła górniczego Mk%d
|
||||||
|
Mining Drill Mk%d Mode %d = Tryb wiertła górniczego Mk%d
|
||||||
|
Mining Drill Mk%d = Wiertło górnicze Mk%d
|
||||||
|
Mining Laser Mk%d = Laser górniczy Mk%d
|
||||||
|
Single node. = Pojedynczy blok.
|
||||||
|
Sonic Screwdriver = Dźwiękowy śrubokręt
|
||||||
|
Tree Tap = Nacinak drzewny
|
||||||
|
|
||||||
|
## Craft descriptions
|
||||||
|
Alloy cooking = Stapianie
|
||||||
|
Grinding = Mielenie
|
||||||
|
Compressing = Kompresowanie
|
||||||
|
Extracting = Ekstrakcja
|
||||||
|
Separating = Oddzielanie
|
211
technic/locale/pt_BR.txt
Normal file
@ -0,0 +1,211 @@
|
|||||||
|
# Braziliam portuguese translation for technic
|
||||||
|
# Tradução portuguesa brasileira para technic
|
||||||
|
# By Sires
|
||||||
|
|
||||||
|
## Misc
|
||||||
|
[Technic] Loaded in %f seconds = [Technic] Carregado em %f segundos
|
||||||
|
|
||||||
|
## Items
|
||||||
|
Silicon Wafer = Pastilha de Silício
|
||||||
|
Doped Silicon Wafer = Pastilha de Silício Dopada
|
||||||
|
Enriched Uranium = Urânio Enriquecido
|
||||||
|
Uranium Fuel = Combustivel de Urânio
|
||||||
|
Diamond Drill Head = Cabeça de Broca de Diamante
|
||||||
|
Blue Energy Crystal = Cristal de Energia Azul
|
||||||
|
Green Energy Crystal = Cristal de Energia Verde
|
||||||
|
Red Energy Crystal = Cristal de Energia Vermelho
|
||||||
|
Fine Copper Wire = Fio Fino de Cobre
|
||||||
|
Copper Coil = Bobina de Cobre
|
||||||
|
Electric Motor = Motor Elétrico
|
||||||
|
Low Voltage Transformer = Transformador de Baixa Voltagem
|
||||||
|
Medium Voltage Transformer = Transformador de Média Voltagem
|
||||||
|
High Voltage Transformer = Transformador de Alta Voltagem
|
||||||
|
Control Logic Unit = Unidade de Controle Lógico
|
||||||
|
Mixed Metal Ingot = Lingote de Metal Misturado
|
||||||
|
Composite Plate = Placa Composta
|
||||||
|
Copper Plate = Placa de Cobre
|
||||||
|
Carbon Plate = Placa de Carbono
|
||||||
|
Graphite = Grafite
|
||||||
|
Carbon Cloth = Recido de Carbono
|
||||||
|
Raw Latex = Latex bruto
|
||||||
|
Rubber Fiber = Fibra de Borracha
|
||||||
|
%.1f%%-Fissile Uranium Ingot = Lingote de Urânio %.1f%%-Físsil
|
||||||
|
%.1f%%-Fissile Uranium Block = Bloco de Urânio %.1f%%-Físsil
|
||||||
|
|
||||||
|
## Machine Misc
|
||||||
|
Machine cannot be removed because it is not empty = A máquina não pode ser removida porque ela não está vazia
|
||||||
|
Inventory move disallowed due to protection = Movimento de inventário não permitido pela proteção
|
||||||
|
# $1: Machine name (includes tier)
|
||||||
|
@1 Active (@2 EU) = @1 Ativo (@2 EU)
|
||||||
|
%s Active = %s Ativo
|
||||||
|
%s Disabled = %s Ativado
|
||||||
|
%s Enabled = %s Desativado
|
||||||
|
%s Idle = Ócio
|
||||||
|
%s Improperly Placed = %s Colocado Inapropriadamente
|
||||||
|
%s is empty = %s está vazio
|
||||||
|
%s Unpowered = %s Sem energia
|
||||||
|
%s Out Of Fuel = %s Sem Combustível
|
||||||
|
%s Has Bad Cabling = %s Tem Cabeamento Ruim
|
||||||
|
%s (Slave) = %s (Servo)
|
||||||
|
%s Has No Network = %s Não Tem Rede
|
||||||
|
%s Finished = %s Acabou
|
||||||
|
Enable/Disable = Ativar/Desativar
|
||||||
|
Range = Alcance
|
||||||
|
Upgrade Slots = Lugares para Melhoria
|
||||||
|
In: = Entrada:
|
||||||
|
Out: = Saída:
|
||||||
|
Slot %d = Lugar %d
|
||||||
|
Itemwise = Por item
|
||||||
|
Stackwise = Por pilha
|
||||||
|
Ignoring Mesecon Signal = Ignorar Sinaal de Mesecon
|
||||||
|
Controlled by Mesecon Signal = Controlado por Sinal de Mesecon
|
||||||
|
Owner: = Dono:
|
||||||
|
Unlocked = Destravado
|
||||||
|
Locked = Travado
|
||||||
|
Radius: = Raio:
|
||||||
|
Enabled = Ativado
|
||||||
|
Disabled = Desativado
|
||||||
|
|
||||||
|
## Machine names
|
||||||
|
# $1: Tier
|
||||||
|
%s Alloy Furnace = Fornalha de Liga %s
|
||||||
|
%s Battery Box = Caixa de Bateria %s
|
||||||
|
%s Cable = Cabo %s
|
||||||
|
%s CNC Machine = Máquina CNC %s
|
||||||
|
%s Centrifuge = Centrifuga %s
|
||||||
|
%s Compressor = Compresso %s
|
||||||
|
%s Extractor = Extrator %s
|
||||||
|
%s Forcefield Emitter = Emissor de Campo de Força %s
|
||||||
|
%s Furnace = Fornalha %s
|
||||||
|
%s Grinder = Triturador %s
|
||||||
|
%s Music Player = Tocador de Música %s
|
||||||
|
%s Quarry = Pedreira %s
|
||||||
|
%s Tool Workshop = Oficina de Ferramentas %s
|
||||||
|
Arrayed Solar %s Generator = Gerador Solar Equipado %s
|
||||||
|
Fuel-Fired %s Generator = Gerador Alimentado-por-Combustível %s
|
||||||
|
Geothermal %s Generator = Gerador Geotermal %s
|
||||||
|
Hydro %s Generator = Gerador Hidráulico %s
|
||||||
|
Nuclear %s Generator Core = Núcleo de Gerador Nuclear %s
|
||||||
|
Small Solar %s Generator = Gerador Solar Pequeno %s
|
||||||
|
Wind %s Generator = Gerador de Energia Eólica %s
|
||||||
|
Self-Contained Injector = Injetor Auto-Contido
|
||||||
|
Constructor Mk%d = Construtor Nv%d
|
||||||
|
Frame = Armação
|
||||||
|
Frame Motor = Motor de Armação
|
||||||
|
Template = Modelo
|
||||||
|
Template (replacing) = Modelo (recolocando)
|
||||||
|
Template Motor = Modelo de Motor
|
||||||
|
Template Tool = Modelo de Ferramenta
|
||||||
|
Battery Box = Caixa de Bateria
|
||||||
|
Supply Converter = Conversor de Energia
|
||||||
|
Switching Station = Estação de Comutação
|
||||||
|
Fuel-Fired Alloy Furnace = Fornalha de Liga Alimentada-por-Combustível
|
||||||
|
Fuel-Fired Furnace = Fornalha Alimentada-por-Combustível
|
||||||
|
Wind Mill Frame = Armação de Moinho de Vento
|
||||||
|
Forcefield = Campo de Força
|
||||||
|
Nuclear Reactor Rod Compartment = Compartimento de Barra do Reator Nuclear
|
||||||
|
Administrative World Anchor = Âncora de Mundo Administrativa
|
||||||
|
|
||||||
|
## Machine-specific
|
||||||
|
# $1: Pruduced EU
|
||||||
|
Charge = Carregar
|
||||||
|
Discharge = Descarregar
|
||||||
|
Power level = Nível de Energia
|
||||||
|
# $1: Tier $2: current_charge $3: max_charge
|
||||||
|
@1 Battery Box: @2/@3 = Caixa de Baterias @1: @2/@3
|
||||||
|
# $1: Machine name $2: Supply $3: Demand
|
||||||
|
@1. Supply: @2 Demand: @3 = @1. Suprimento: @2 Demanda: @3
|
||||||
|
Production at %d%% = Produção em %d%%
|
||||||
|
Choose Milling Program: = Escolha o Programa de Serragem:
|
||||||
|
Slim Elements half / normal height: = Metade de Elementos Finos / altura normal:
|
||||||
|
Current track %s = Música Atual %s
|
||||||
|
Stopped = Parado
|
||||||
|
Keeping %d/%d map blocks loaded = Mantendo %d/%d blocos de mapa carregados
|
||||||
|
Digging not started = Escavação não começada
|
||||||
|
Digging finished = Escavação terminada
|
||||||
|
Digging %d m above machine = Escavando %d m acima da máquina
|
||||||
|
Digging %d m below machine = Escavando %d m abaixo da máquina
|
||||||
|
@1 (@2 @3 -> @4 @5) = @1 (@2 @3 -> @4 @5)
|
||||||
|
|
||||||
|
## CNC
|
||||||
|
Cylinder = Cilindro
|
||||||
|
Element Cross = Cruz do Elemento
|
||||||
|
Element Cross Double = Cruz Dupla do Elemento
|
||||||
|
Element Edge = Borda do Elemento
|
||||||
|
Element Edge Double = Borda Dupla do Elemento
|
||||||
|
Element End = Final do Elemento
|
||||||
|
Element End Double = Final Duplo do Elemento
|
||||||
|
Element Straight = Elemento Contínuo
|
||||||
|
Element Straight Double = Elemento Contínuo duplo
|
||||||
|
Element T = Elemento em T
|
||||||
|
Element T Double = Elemento em T Duplo
|
||||||
|
Horizontal Cylinder = Cilindro Horizontal
|
||||||
|
One Curved Edge Block = Uma Borda de Bloco Curvada
|
||||||
|
Pyramid = Pirâmide
|
||||||
|
Slope = Ladeira
|
||||||
|
Slope Edge = Canto de Ladeira
|
||||||
|
Slope Inner Edge = Canto de Dentro de Ladeira
|
||||||
|
Slope Lying = Ladeira Deitada
|
||||||
|
Slope Upside Down = Ladeira de Cabeça para Baixo
|
||||||
|
Slope Upside Down Edge = Cande de Ladeira de Cabeça para Baixo
|
||||||
|
Slope Upside Down Inner Edge = Canto de Dentro de Ladeira de Cabeça para Baixo
|
||||||
|
Sphere = Esfera
|
||||||
|
Spike = Espinho
|
||||||
|
Stick = Graveto
|
||||||
|
Two Curved Edge Block = Bloco de Duas Bordas Curvadas
|
||||||
|
Brick = Tijolo
|
||||||
|
Cobble = Pedregulho
|
||||||
|
Dirt = Terra
|
||||||
|
Leaves = Folhas
|
||||||
|
Sandstone = Arenito
|
||||||
|
Stone = Pedra
|
||||||
|
Tree = Árvore
|
||||||
|
Wooden = de Madeira
|
||||||
|
|
||||||
|
## Grinder Recipes
|
||||||
|
# $1: Name
|
||||||
|
%s Dust = Pó de %s
|
||||||
|
Akalin = Akalin
|
||||||
|
Alatro = Alatro
|
||||||
|
Arol = Arol
|
||||||
|
Brass = Latão
|
||||||
|
Bronze = Bronze
|
||||||
|
Carbon Steel = Aço Carbono
|
||||||
|
Cast Iron = Ferro Fundido
|
||||||
|
Chromium = Crômio
|
||||||
|
Coal = Carvão
|
||||||
|
Copper = Cobre
|
||||||
|
Gold = Ouro
|
||||||
|
Mithril = Mithril
|
||||||
|
Silver = Prata
|
||||||
|
Stainless Steel = Aço Inoxidável
|
||||||
|
Talinite = Talinite
|
||||||
|
Tin = Estanho
|
||||||
|
Wrought Iron = Ferro Forjado
|
||||||
|
Zinc = Zinco
|
||||||
|
%.1f%%-Fissile Uranium = Urânio %.1f%%-Físsil
|
||||||
|
|
||||||
|
## Tools
|
||||||
|
RE Battery = Bateria RE
|
||||||
|
Water Can = Lata de Água
|
||||||
|
Lava Can = Lata de Lava
|
||||||
|
Chainsaw = Motosserra
|
||||||
|
Flashlight = Lanterna
|
||||||
|
3 nodes deep. = 3 nodes de profundidade.
|
||||||
|
3 nodes tall. = 3 nodes de altura.
|
||||||
|
3 nodes wide. = 3 nodes de largura.
|
||||||
|
3x3 nodes. = 3x3 nodes.
|
||||||
|
Use while sneaking to change Mining Drill Mk%d modes. = Use enquanto esgueirando para mudar os modos da Broca de Mineração Nv%d.
|
||||||
|
Mining Drill Mk%d Mode %d = Broca de Mineração Nv%d Modo %d
|
||||||
|
Mining Drill Mk%d = Broca de Mineração Nv%d
|
||||||
|
Mining Laser Mk%d = Laser de Mineração Nv%d
|
||||||
|
Single node. = Unico node.
|
||||||
|
Sonic Screwdriver = Chave de Fenda Sônica.
|
||||||
|
Tree Tap = Torneira de Árvore
|
||||||
|
|
||||||
|
## Craft descriptions
|
||||||
|
Alloy cooking = Cozinhando em liga
|
||||||
|
Grinding = Triturando
|
||||||
|
Compressing = Comprimindo
|
||||||
|
Extracting = Extraindo
|
||||||
|
Separating = Separando
|
@ -15,6 +15,8 @@ Blue Energy Crystal =
|
|||||||
Green Energy Crystal =
|
Green Energy Crystal =
|
||||||
Red Energy Crystal =
|
Red Energy Crystal =
|
||||||
Fine Copper Wire =
|
Fine Copper Wire =
|
||||||
|
Fine Gold Wire =
|
||||||
|
Fine Silver Wire =
|
||||||
Copper Coil =
|
Copper Coil =
|
||||||
Electric Motor =
|
Electric Motor =
|
||||||
Low Voltage Transformer =
|
Low Voltage Transformer =
|
||||||
@ -71,7 +73,6 @@ Disabled =
|
|||||||
%s Alloy Furnace =
|
%s Alloy Furnace =
|
||||||
%s Battery Box =
|
%s Battery Box =
|
||||||
%s Cable =
|
%s Cable =
|
||||||
%s CNC Machine =
|
|
||||||
%s Centrifuge =
|
%s Centrifuge =
|
||||||
%s Compressor =
|
%s Compressor =
|
||||||
%s Extractor =
|
%s Extractor =
|
||||||
@ -127,40 +128,6 @@ Digging %d m above machine =
|
|||||||
Digging %d m below machine =
|
Digging %d m below machine =
|
||||||
@1 (@2 @3 -> @4 @5) =
|
@1 (@2 @3 -> @4 @5) =
|
||||||
|
|
||||||
## CNC
|
|
||||||
Cylinder =
|
|
||||||
Element Cross =
|
|
||||||
Element Cross Double =
|
|
||||||
Element Edge =
|
|
||||||
Element Edge Double =
|
|
||||||
Element End =
|
|
||||||
Element End Double =
|
|
||||||
Element Straight =
|
|
||||||
Element Straight Double =
|
|
||||||
Element T =
|
|
||||||
Element T Double =
|
|
||||||
Horizontal Cylinder =
|
|
||||||
One Curved Edge Block =
|
|
||||||
Pyramid =
|
|
||||||
Slope =
|
|
||||||
Slope Edge =
|
|
||||||
Slope Inner Edge =
|
|
||||||
Slope Lying =
|
|
||||||
Slope Upside Down =
|
|
||||||
Slope Upside Down Edge =
|
|
||||||
Slope Upside Down Inner Edge =
|
|
||||||
Sphere =
|
|
||||||
Spike =
|
|
||||||
Stick =
|
|
||||||
Two Curved Edge Block =
|
|
||||||
Brick =
|
|
||||||
Cobble =
|
|
||||||
Dirt =
|
|
||||||
Leaves =
|
|
||||||
Sandstone =
|
|
||||||
Stone =
|
|
||||||
Tree =
|
|
||||||
Wooden =
|
|
||||||
|
|
||||||
## Grinder Recipes
|
## Grinder Recipes
|
||||||
# $1: Name
|
# $1: Name
|
||||||
|
@ -17,7 +17,7 @@ local cable_entry = "^technic_cable_connection_overlay.png"
|
|||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "technic:forcefield_emitter_off",
|
output = "technic:forcefield_emitter_off",
|
||||||
recipe = {
|
recipe = {
|
||||||
{"default:mese", "technic:motor", "default:mese" },
|
{"default:mese", "basic_materials:motor", "default:mese" },
|
||||||
{"technic:deployer_off", "technic:machine_casing", "technic:deployer_off"},
|
{"technic:deployer_off", "technic:machine_casing", "technic:deployer_off"},
|
||||||
{"default:mese", "technic:hv_cable", "default:mese" },
|
{"default:mese", "technic:hv_cable", "default:mese" },
|
||||||
}
|
}
|
||||||
@ -42,7 +42,7 @@ end)
|
|||||||
-- | |
|
-- | |
|
||||||
-- \___/\___/
|
-- \___/\___/
|
||||||
|
|
||||||
local function update_forcefield(pos, meta, active, first)
|
local function update_forcefield(pos, meta, active)
|
||||||
local shape = meta:get_int("shape")
|
local shape = meta:get_int("shape")
|
||||||
local range = meta:get_int("range")
|
local range = meta:get_int("range")
|
||||||
local vm = VoxelManip()
|
local vm = VoxelManip()
|
||||||
@ -86,11 +86,6 @@ local function update_forcefield(pos, meta, active, first)
|
|||||||
vm:set_data(data)
|
vm:set_data(data)
|
||||||
vm:update_liquids()
|
vm:update_liquids()
|
||||||
vm:write_to_map()
|
vm:write_to_map()
|
||||||
-- update_map is very slow, but if we don't call it we'll
|
|
||||||
-- get phantom blocks on the client.
|
|
||||||
if not active or first then
|
|
||||||
vm:update_map()
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
local function set_forcefield_formspec(meta)
|
local function set_forcefield_formspec(meta)
|
||||||
@ -117,15 +112,24 @@ local function set_forcefield_formspec(meta)
|
|||||||
else
|
else
|
||||||
formspec = formspec.."button[0,1;5,1;mesecon_mode_0;"..S("Controlled by Mesecon Signal").."]"
|
formspec = formspec.."button[0,1;5,1;mesecon_mode_0;"..S("Controlled by Mesecon Signal").."]"
|
||||||
end
|
end
|
||||||
|
-- TODO: String replacement with %s will stop working with client-side translations
|
||||||
if meta:get_int("enabled") == 0 then
|
if meta:get_int("enabled") == 0 then
|
||||||
formspec = formspec.."button[0,1.75;5,1;enable;"..S("%s Disabled"):format(S("%s Forcefield Emitter"):format("HV")).."]"
|
formspec = formspec.."button[0,1.75;5,1;enable;"..
|
||||||
|
S("%s Disabled"):format(S("%s Forcefield Emitter"):format("HV")).."]"
|
||||||
else
|
else
|
||||||
formspec = formspec.."button[0,1.75;5,1;disable;"..S("%s Enabled"):format(S("%s Forcefield Emitter"):format("HV")).."]"
|
formspec = formspec.."button[0,1.75;5,1;disable;"..
|
||||||
|
S("%s Enabled"):format(S("%s Forcefield Emitter"):format("HV")).."]"
|
||||||
end
|
end
|
||||||
meta:set_string("formspec", formspec)
|
meta:set_string("formspec", formspec)
|
||||||
end
|
end
|
||||||
|
|
||||||
local forcefield_receive_fields = function(pos, formname, fields, sender)
|
local forcefield_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 meta = minetest.get_meta(pos)
|
||||||
local range = nil
|
local range = nil
|
||||||
if fields.range then
|
if fields.range then
|
||||||
@ -273,13 +277,11 @@ local function run(pos, node)
|
|||||||
technic.swap_node(pos, "technic:forcefield_emitter_off")
|
technic.swap_node(pos, "technic:forcefield_emitter_off")
|
||||||
end
|
end
|
||||||
elseif eu_input >= power_requirement then
|
elseif eu_input >= power_requirement then
|
||||||
local first = false
|
|
||||||
if node.name == "technic:forcefield_emitter_off" then
|
if node.name == "technic:forcefield_emitter_off" then
|
||||||
first = true
|
|
||||||
technic.swap_node(pos, "technic:forcefield_emitter_on")
|
technic.swap_node(pos, "technic:forcefield_emitter_on")
|
||||||
meta:set_string("infotext", S("%s Active"):format(machine_name))
|
meta:set_string("infotext", S("%s Active"):format(machine_name))
|
||||||
end
|
end
|
||||||
update_forcefield(pos, meta, true, first)
|
update_forcefield(pos, meta, true)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -31,24 +31,26 @@ minetest.register_craft({
|
|||||||
})
|
})
|
||||||
|
|
||||||
local function make_reactor_formspec(meta)
|
local function make_reactor_formspec(meta)
|
||||||
local f = "size[8,9]"..
|
local f =
|
||||||
"label[0,0;"..S("Nuclear Reactor Rod Compartment").."]"..
|
"formspec_version[4]"..
|
||||||
"list[current_name;src;2,1;3,2;]"..
|
"size[10.75,10.75]"..
|
||||||
"list[current_player;main;0,5;8,4;]"..
|
"label[0.2,0.4;"..S("Nuclear Reactor Rod Compartment").."]"..
|
||||||
"listring[]"..
|
"list[current_name;src;1.5,1;3,2;]"..
|
||||||
"button[5.5,1.5;2,1;start;Start]"..
|
"list[current_player;main;0.5,5.5;8,4;]"..
|
||||||
"checkbox[5.5,2.5;autostart;automatic Start;"..meta:get_string("autostart").."]"
|
"listring[]"..
|
||||||
|
"button[5.7,1;2,1;start;Start]"..
|
||||||
|
"checkbox[5.7,2.75;autostart;automatic Start;"..meta:get_string("autostart").."]"
|
||||||
if not digiline_remote_path then
|
if not digiline_remote_path then
|
||||||
return f
|
return f
|
||||||
end
|
end
|
||||||
local digiline_enabled = meta:get_string("enable_digiline")
|
local digiline_enabled = meta:get_string("enable_digiline")
|
||||||
f = f.."checkbox[0.5,2.8;enable_digiline;Enable Digiline;"..digiline_enabled.."]"
|
f = f.."checkbox[1.5,3.75;enable_digiline;Enable Digiline channel;"..digiline_enabled.."]"
|
||||||
if digiline_enabled ~= "true" then
|
if digiline_enabled ~= "true" then
|
||||||
return f
|
return f
|
||||||
end
|
end
|
||||||
return f..
|
return f..
|
||||||
"button_exit[4.6,3.69;2,1;save;Save]"..
|
"field[2,4.2;4.25,1;remote_channel;;${remote_channel}]" ..
|
||||||
"field[1,4;4,1;remote_channel;Digiline Remote Channel;${remote_channel}]"
|
"button_exit[6.5,4.2;2,1;save;Save]"
|
||||||
end
|
end
|
||||||
|
|
||||||
local SS_OFF = 0
|
local SS_OFF = 0
|
||||||
@ -140,8 +142,11 @@ of a lead layer it will be converted to a lead layer.
|
|||||||
--]]
|
--]]
|
||||||
local function reactor_structure_badness(pos)
|
local function reactor_structure_badness(pos)
|
||||||
local vm = VoxelManip()
|
local vm = VoxelManip()
|
||||||
|
|
||||||
|
-- Blast-resistant Concrete Block layer outer positions
|
||||||
local pos1 = vector.subtract(pos, 3)
|
local pos1 = vector.subtract(pos, 3)
|
||||||
local pos2 = vector.add(pos, 3)
|
local pos2 = vector.add(pos, 3)
|
||||||
|
|
||||||
local MinEdge, MaxEdge = vm:read_from_map(pos1, pos2)
|
local MinEdge, MaxEdge = vm:read_from_map(pos1, pos2)
|
||||||
local data = vm:get_data()
|
local data = vm:get_data()
|
||||||
local area = VoxelArea:new({MinEdge=MinEdge, MaxEdge=MaxEdge})
|
local area = VoxelArea:new({MinEdge=MinEdge, MaxEdge=MaxEdge})
|
||||||
@ -157,16 +162,19 @@ local function reactor_structure_badness(pos)
|
|||||||
for z = pos1.z, pos2.z do
|
for z = pos1.z, pos2.z do
|
||||||
for y = pos1.y, pos2.y do
|
for y = pos1.y, pos2.y do
|
||||||
for x = pos1.x, pos2.x do
|
for x = pos1.x, pos2.x do
|
||||||
|
-- In the entire volume, make sure there is:
|
||||||
local cid = data[area:index(x, y, z)]
|
local cid = data[area:index(x, y, z)]
|
||||||
if x == pos1.x or x == pos2.x or
|
if x == pos1.x or x == pos2.x or
|
||||||
y == pos1.y or y == pos2.y or
|
y == pos1.y or y == pos2.y or
|
||||||
z == pos1.z or z == pos2.z then
|
z == pos1.z or z == pos2.z then
|
||||||
|
-- r=3 : Blast-resistant Concrete Block shell
|
||||||
if cid == c_blast_concrete then
|
if cid == c_blast_concrete then
|
||||||
blast_layer = blast_layer + 1
|
blast_layer = blast_layer + 1
|
||||||
end
|
end
|
||||||
elseif x == pos1.x+1 or x == pos2.x-1 or
|
elseif x == pos1.x+1 or x == pos2.x-1 or
|
||||||
y == pos1.y+1 or y == pos2.y-1 or
|
y == pos1.y+1 or y == pos2.y-1 or
|
||||||
z == pos1.z+1 or z == pos2.z-1 then
|
z == pos1.z+1 or z == pos2.z-1 then
|
||||||
|
-- r=2 : Lead Block shell
|
||||||
if cid == c_lead then
|
if cid == c_lead then
|
||||||
lead_layer = lead_layer + 1
|
lead_layer = lead_layer + 1
|
||||||
elseif cid == c_steel then
|
elseif cid == c_steel then
|
||||||
@ -175,6 +183,7 @@ local function reactor_structure_badness(pos)
|
|||||||
elseif x == pos1.x+2 or x == pos2.x-2 or
|
elseif x == pos1.x+2 or x == pos2.x-2 or
|
||||||
y == pos1.y+2 or y == pos2.y-2 or
|
y == pos1.y+2 or y == pos2.y-2 or
|
||||||
z == pos1.z+2 or z == pos2.z-2 then
|
z == pos1.z+2 or z == pos2.z-2 then
|
||||||
|
-- r=1 : Water cooling
|
||||||
if cid == c_water_source or cid == c_water_flowing then
|
if cid == c_water_source or cid == c_water_flowing then
|
||||||
water_layer = water_layer + 1
|
water_layer = water_layer + 1
|
||||||
end
|
end
|
||||||
@ -184,6 +193,8 @@ local function reactor_structure_badness(pos)
|
|||||||
end
|
end
|
||||||
|
|
||||||
if steel_layer >= 96 then
|
if steel_layer >= 96 then
|
||||||
|
-- Legacy: convert stainless steel to lead
|
||||||
|
-- Why don't we accept both without conversion?
|
||||||
for z = pos1.z+1, pos2.z-1 do
|
for z = pos1.z+1, pos2.z-1 do
|
||||||
for y = pos1.y+1, pos2.y-1 do
|
for y = pos1.y+1, pos2.y-1 do
|
||||||
for x = pos1.x+1, pos2.x-1 do
|
for x = pos1.x+1, pos2.x-1 do
|
||||||
@ -206,6 +217,7 @@ local function reactor_structure_badness(pos)
|
|||||||
if water_layer > 25 then water_layer = 25 end
|
if water_layer > 25 then water_layer = 25 end
|
||||||
if lead_layer > 96 then lead_layer = 96 end
|
if lead_layer > 96 then lead_layer = 96 end
|
||||||
if blast_layer > 216 then blast_layer = 216 end
|
if blast_layer > 216 then blast_layer = 216 end
|
||||||
|
-- Amount of missing blocks
|
||||||
return (25 - water_layer) + (96 - lead_layer) + (216 - blast_layer)
|
return (25 - water_layer) + (96 - lead_layer) + (216 - blast_layer)
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -217,24 +229,33 @@ end
|
|||||||
|
|
||||||
|
|
||||||
local function start_reactor(pos, meta)
|
local function start_reactor(pos, meta)
|
||||||
|
local correct_fuel_count = 6
|
||||||
|
local msg_fuel_missing = "Error: You need to insert " .. correct_fuel_count .. " pieces of Uranium Fuel."
|
||||||
|
|
||||||
if minetest.get_node(pos).name ~= "technic:hv_nuclear_reactor_core" then
|
if minetest.get_node(pos).name ~= "technic:hv_nuclear_reactor_core" then
|
||||||
return false
|
return msg_fuel_missing
|
||||||
end
|
end
|
||||||
local inv = meta:get_inventory()
|
local inv = meta:get_inventory()
|
||||||
if inv:is_empty("src") then
|
if inv:is_empty("src") then
|
||||||
return false
|
return msg_fuel_missing
|
||||||
end
|
end
|
||||||
local src_list = inv:get_list("src")
|
local src_list = inv:get_list("src")
|
||||||
local correct_fuel_count = 0
|
local fuel_count = 0
|
||||||
for _, src_stack in pairs(src_list) do
|
for _, src_stack in pairs(src_list) do
|
||||||
if src_stack and src_stack:get_name() == fuel_type then
|
if src_stack and src_stack:get_name() == fuel_type then
|
||||||
correct_fuel_count = correct_fuel_count + 1
|
fuel_count = fuel_count + 1
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
-- Check that the reactor is complete and has the correct fuel
|
-- Check that the has the correct fuel
|
||||||
if correct_fuel_count ~= 6 or reactor_structure_badness(pos) ~= 0 then
|
if fuel_count ~= correct_fuel_count then
|
||||||
return false
|
return msg_fuel_missing
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Check that the reactor is complete
|
||||||
|
if reactor_structure_badness(pos) ~= 0 then
|
||||||
|
return "Error: The power plant seems to be built incorrectly."
|
||||||
|
end
|
||||||
|
|
||||||
meta:set_int("burn_time", 1)
|
meta:set_int("burn_time", 1)
|
||||||
technic.swap_node(pos, "technic:hv_nuclear_reactor_core_active")
|
technic.swap_node(pos, "technic:hv_nuclear_reactor_core_active")
|
||||||
meta:set_int("HV_EU_supply", power_supply)
|
meta:set_int("HV_EU_supply", power_supply)
|
||||||
@ -242,7 +263,8 @@ local function start_reactor(pos, meta)
|
|||||||
src_stack:take_item()
|
src_stack:take_item()
|
||||||
inv:set_stack("src", idx, src_stack)
|
inv:set_stack("src", idx, src_stack)
|
||||||
end
|
end
|
||||||
return true
|
|
||||||
|
return nil
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
@ -281,13 +303,13 @@ local function run(pos, node)
|
|||||||
"fuel used", 6, true)
|
"fuel used", 6, true)
|
||||||
end
|
end
|
||||||
if meta:get_string("autostart") == "true" then
|
if meta:get_string("autostart") == "true" then
|
||||||
if start_reactor(pos, meta) then
|
if not start_reactor(pos, meta) then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
meta:set_int("HV_EU_supply", 0)
|
meta:set_int("HV_EU_supply", 0)
|
||||||
meta:set_int("burn_time", 0)
|
meta:set_int("burn_time", 0)
|
||||||
meta:set_string("infotext", S("%s Idle"):format(reactor_desc))
|
meta:set_string("infotext", S("@1 Idle", reactor_desc))
|
||||||
technic.swap_node(pos, "technic:hv_nuclear_reactor_core")
|
technic.swap_node(pos, "technic:hv_nuclear_reactor_core")
|
||||||
meta:set_int("structure_accumulated_badness", 0)
|
meta:set_int("structure_accumulated_badness", 0)
|
||||||
siren_clear(pos, meta)
|
siren_clear(pos, meta)
|
||||||
@ -313,11 +335,11 @@ local nuclear_reactor_receive_fields = function(pos, formname, fields, sender)
|
|||||||
meta:set_string("remote_channel", fields.remote_channel)
|
meta:set_string("remote_channel", fields.remote_channel)
|
||||||
end
|
end
|
||||||
if fields.start then
|
if fields.start then
|
||||||
local b = start_reactor(pos, meta)
|
local start_error_msg = start_reactor(pos, meta)
|
||||||
if b then
|
if not start_error_msg then
|
||||||
minetest.chat_send_player(player_name, "Start successful")
|
minetest.chat_send_player(player_name, "Start successful")
|
||||||
else
|
else
|
||||||
minetest.chat_send_player(player_name, "Error")
|
minetest.chat_send_player(player_name, start_error_msg)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if fields.autostart then
|
if fields.autostart then
|
||||||
@ -385,11 +407,11 @@ local digiline_remote_def = function(pos, channel, msg)
|
|||||||
melt_down_reactor(pos)
|
melt_down_reactor(pos)
|
||||||
end
|
end
|
||||||
elseif msg.command == "start" then
|
elseif msg.command == "start" then
|
||||||
local b = start_reactor(pos, meta)
|
local start_error_msg = start_reactor(pos, meta)
|
||||||
if b then
|
if not start_error_msg then
|
||||||
digiline_remote.send_to_node(pos, channel, "Start successful", 6, true)
|
digiline_remote.send_to_node(pos, channel, "Start successful", 6, true)
|
||||||
else
|
else
|
||||||
digiline_remote.send_to_node(pos, channel, "Error", 6, true)
|
digiline_remote.send_to_node(pos, channel, start_error_msg, 6, true)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -455,7 +477,7 @@ minetest.register_node("technic:hv_nuclear_reactor_core_active", {
|
|||||||
technic_run = run,
|
technic_run = run,
|
||||||
technic_on_disable = function(pos, node)
|
technic_on_disable = function(pos, node)
|
||||||
local timer = minetest.get_node_timer(pos)
|
local timer = minetest.get_node_timer(pos)
|
||||||
timer:start(1)
|
timer:start(1)
|
||||||
end,
|
end,
|
||||||
on_timer = function(pos, node)
|
on_timer = function(pos, node)
|
||||||
local meta = minetest.get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
|
@ -7,7 +7,7 @@ local cable_entry = "^technic_cable_connection_overlay.png"
|
|||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
recipe = {
|
recipe = {
|
||||||
{"technic:carbon_plate", "pipeworks:filter", "technic:composite_plate"},
|
{"technic:carbon_plate", "pipeworks:filter", "technic:composite_plate"},
|
||||||
{"technic:motor", "technic:machine_casing", "technic:diamond_drill_head"},
|
{"basic_materials:motor", "technic:machine_casing", "technic:diamond_drill_head"},
|
||||||
{"technic:carbon_steel_block", "technic:hv_cable", "technic:carbon_steel_block"}},
|
{"technic:carbon_steel_block", "technic:hv_cable", "technic:carbon_steel_block"}},
|
||||||
output = "technic:quarry",
|
output = "technic:quarry",
|
||||||
})
|
})
|
||||||
@ -47,19 +47,30 @@ local function set_quarry_demand(meta)
|
|||||||
local radius = meta:get_int("size")
|
local radius = meta:get_int("size")
|
||||||
local diameter = radius*2 + 1
|
local diameter = radius*2 + 1
|
||||||
local machine_name = S("%s Quarry"):format("HV")
|
local machine_name = S("%s Quarry"):format("HV")
|
||||||
if meta:get_int("enabled") == 0 or meta:get_int("purge_on") == 1 then
|
local do_purge = meta:get_int("purge_on") == 1
|
||||||
meta:set_string("infotext", S(meta:get_int("purge_on") == 1 and "%s purging cache" or "%s Disabled"):format(machine_name))
|
if meta:get_int("enabled") == 0 or do_purge then
|
||||||
|
local infotext = do_purge and
|
||||||
|
S("%s purging cache") or S("%s Disabled")
|
||||||
|
meta:set_string("infotext", infotext:format(machine_name))
|
||||||
meta:set_int("HV_EU_demand", 0)
|
meta:set_int("HV_EU_demand", 0)
|
||||||
elseif meta:get_int("dug") == diameter*diameter * (quarry_dig_above_nodes+1+quarry_max_depth) then
|
elseif meta:get_int("dug") == diameter*diameter * (quarry_dig_above_nodes+1+quarry_max_depth) then
|
||||||
meta:set_string("infotext", S("%s Finished"):format(machine_name))
|
meta:set_string("infotext", S("%s Finished"):format(machine_name))
|
||||||
meta:set_int("HV_EU_demand", 0)
|
meta:set_int("HV_EU_demand", 0)
|
||||||
else
|
else
|
||||||
meta:set_string("infotext", S(meta:get_int("HV_EU_input") >= quarry_demand and "%s Active" or "%s Unpowered"):format(machine_name))
|
local infotext = meta:get_int("HV_EU_input") >= quarry_demand
|
||||||
|
and S("%s Active") or S("%s Unpowered")
|
||||||
|
meta:set_string("infotext", infotext:format(machine_name))
|
||||||
meta:set_int("HV_EU_demand", quarry_demand)
|
meta:set_int("HV_EU_demand", quarry_demand)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local function quarry_receive_fields(pos, formname, fields, sender)
|
local function quarry_receive_fields(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 meta = minetest.get_meta(pos)
|
||||||
if fields.size and string.find(fields.size, "^[0-9]+$") then
|
if fields.size and string.find(fields.size, "^[0-9]+$") then
|
||||||
local size = tonumber(fields.size)
|
local size = tonumber(fields.size)
|
||||||
@ -99,6 +110,40 @@ local function quarry_handle_purge(pos)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Determines whether the quarry can dig the node at "pos"
|
||||||
|
-- "startpos" is located a few nodes above the quarry in South West direction (X-, Z-)
|
||||||
|
-- Returns the node to dig (to avoid double minetest.get_node lookup)
|
||||||
|
local function quarry_can_dig_node(startpos, pos, quarry_owner)
|
||||||
|
if minetest.is_protected(pos, quarry_owner) then
|
||||||
|
return nil
|
||||||
|
end
|
||||||
|
|
||||||
|
local node = technic.get_or_load_node(pos) or minetest.get_node(pos)
|
||||||
|
local def = minetest.registered_nodes[node.name] or {diggable=false}
|
||||||
|
-- doors mod among other thing does NOT like a nil digger...
|
||||||
|
local fakedigger = pipeworks.create_fake_player({
|
||||||
|
name = quarry_owner
|
||||||
|
})
|
||||||
|
if not def.diggable or (def.can_dig and not def.can_dig(pos, fakedigger)) then
|
||||||
|
return nil
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Find airlike nodes on top of the current node. The entire Y column must be free.
|
||||||
|
for ay = pos.y+1, startpos.y do
|
||||||
|
local checkpos = {x=pos.x, y=ay, z=pos.z}
|
||||||
|
local checknode = technic.get_or_load_node(checkpos) or minetest.get_node(checkpos)
|
||||||
|
|
||||||
|
local cdef = minetest.registered_nodes[checknode.name] or {}
|
||||||
|
local is_kind_of_gas = cdef.buildable_to and cdef.sunlight_propagates and not cdef.walkable
|
||||||
|
and not cdef.diggable and (cdef.drawtype == "airlike" or cdef.drawtype == "glasslike")
|
||||||
|
if not is_kind_of_gas then
|
||||||
|
return nil
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return node
|
||||||
|
end
|
||||||
|
|
||||||
local function quarry_run(pos, node)
|
local function quarry_run(pos, node)
|
||||||
local meta = minetest.get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
local inv = meta:get_inventory()
|
local inv = meta:get_inventory()
|
||||||
@ -112,6 +157,11 @@ local function quarry_run(pos, node)
|
|||||||
|
|
||||||
if meta:get_int("enabled") and meta:get_int("HV_EU_input") >= quarry_demand and meta:get_int("purge_on") == 0 then
|
if meta:get_int("enabled") and meta:get_int("HV_EU_input") >= quarry_demand and meta:get_int("purge_on") == 0 then
|
||||||
local pdir = minetest.facedir_to_dir(node.param2)
|
local pdir = minetest.facedir_to_dir(node.param2)
|
||||||
|
if pdir.y ~= 0 then
|
||||||
|
-- faces up or down, not valid, otherwise depth-check would run endless and hang up the server
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
local qdir = pdir.x == 1 and vector.new(0,0,-1) or
|
local qdir = pdir.x == 1 and vector.new(0,0,-1) or
|
||||||
(pdir.z == -1 and vector.new(-1,0,0) or
|
(pdir.z == -1 and vector.new(-1,0,0) or
|
||||||
(pdir.x == -1 and vector.new(0,0,1) or
|
(pdir.x == -1 and vector.new(0,0,1) or
|
||||||
@ -124,7 +174,7 @@ local function quarry_run(pos, node)
|
|||||||
vector.multiply(qdir, -radius))
|
vector.multiply(qdir, -radius))
|
||||||
local owner = meta:get_string("owner")
|
local owner = meta:get_string("owner")
|
||||||
local nd = meta:get_int("dug")
|
local nd = meta:get_int("dug")
|
||||||
while nd ~= diameter*diameter * (quarry_dig_above_nodes+1+quarry_max_depth) do
|
while nd < diameter*diameter * (quarry_dig_above_nodes+1+quarry_max_depth) do
|
||||||
local ry = math.floor(nd / (diameter*diameter))
|
local ry = math.floor(nd / (diameter*diameter))
|
||||||
local ndl = nd % (diameter*diameter)
|
local ndl = nd % (diameter*diameter)
|
||||||
if ry % 2 == 1 then
|
if ry % 2 == 1 then
|
||||||
@ -137,41 +187,11 @@ local function quarry_run(pos, node)
|
|||||||
vector.new(0, -ry, 0)),
|
vector.new(0, -ry, 0)),
|
||||||
vector.multiply(pdir, rp)),
|
vector.multiply(pdir, rp)),
|
||||||
vector.multiply(qdir, rq))
|
vector.multiply(qdir, rq))
|
||||||
local can_dig = true
|
|
||||||
if can_dig and minetest.is_protected and minetest.is_protected(digpos, owner) then
|
|
||||||
can_dig = false
|
|
||||||
end
|
|
||||||
local dignode
|
|
||||||
if can_dig then
|
|
||||||
dignode = technic.get_or_load_node(digpos) or minetest.get_node(digpos)
|
|
||||||
local dignodedef = minetest.registered_nodes[dignode.name] or {diggable=false}
|
|
||||||
-- doors mod among other thing does NOT like a nil digger...
|
|
||||||
local fakedigger = {
|
|
||||||
get_player_name = function()
|
|
||||||
return "!technic_quarry_fake_digger"
|
|
||||||
end,
|
|
||||||
is_player = function() return false end,
|
|
||||||
get_wielded_item = function()
|
|
||||||
return ItemStack("air")
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
if not dignodedef.diggable or (dignodedef.can_dig and not dignodedef.can_dig(digpos, fakedigger)) then
|
|
||||||
can_dig = false
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
if can_dig then
|
|
||||||
for ay = startpos.y, digpos.y+1, -1 do
|
|
||||||
local checkpos = {x=digpos.x, y=ay, z=digpos.z}
|
|
||||||
local checknode = technic.get_or_load_node(checkpos) or minetest.get_node(checkpos)
|
|
||||||
if checknode.name ~= "air" then
|
|
||||||
can_dig = false
|
|
||||||
break
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
nd = nd + 1
|
nd = nd + 1
|
||||||
if can_dig then
|
|
||||||
|
local dignode = quarry_can_dig_node(startpos, digpos, owner)
|
||||||
|
if dignode then
|
||||||
minetest.remove_node(digpos)
|
minetest.remove_node(digpos)
|
||||||
local drops = minetest.get_node_drops(dignode.name, "")
|
local drops = minetest.get_node_drops(dignode.name, "")
|
||||||
for _, dropped_item in ipairs(drops) do
|
for _, dropped_item in ipairs(drops) do
|
||||||
|
@ -1,230 +0,0 @@
|
|||||||
-- Technic CNC v1.0 by kpoppel
|
|
||||||
-- Based on the NonCubic Blocks MOD v1.4 by yves_de_beck
|
|
||||||
|
|
||||||
-- Idea:
|
|
||||||
-- Somehow have a tabbed/paged panel if the number of shapes should expand
|
|
||||||
-- beyond what is available in the panel today.
|
|
||||||
-- I could imagine some form of API allowing modders to come with their own node
|
|
||||||
-- box definitions and easily stuff it in the this machine for production.
|
|
||||||
|
|
||||||
local S = technic.getter
|
|
||||||
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = 'technic:cnc',
|
|
||||||
recipe = {
|
|
||||||
{'default:glass', 'technic:diamond_drill_head', 'default:glass'},
|
|
||||||
{'technic:control_logic_unit', 'technic:machine_casing', 'technic:motor'},
|
|
||||||
{'technic:carbon_steel_ingot', 'technic:lv_cable', 'technic:carbon_steel_ingot'},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
local shape = {}
|
|
||||||
local onesize_products = {
|
|
||||||
slope = 2,
|
|
||||||
slope_edge = 1,
|
|
||||||
slope_inner_edge = 1,
|
|
||||||
pyramid = 2,
|
|
||||||
spike = 1,
|
|
||||||
cylinder = 2,
|
|
||||||
oblate_spheroid = 1,
|
|
||||||
sphere = 1,
|
|
||||||
stick = 8,
|
|
||||||
slope_upsdown = 2,
|
|
||||||
slope_edge_upsdown = 1,
|
|
||||||
slope_inner_edge_upsdown = 1,
|
|
||||||
cylinder_horizontal = 2,
|
|
||||||
slope_lying = 2,
|
|
||||||
onecurvededge = 1,
|
|
||||||
twocurvededge = 1,
|
|
||||||
}
|
|
||||||
local twosize_products = {
|
|
||||||
element_straight = 4,
|
|
||||||
element_end = 2,
|
|
||||||
element_cross = 1,
|
|
||||||
element_t = 1,
|
|
||||||
element_edge = 2,
|
|
||||||
}
|
|
||||||
|
|
||||||
local cnc_formspec =
|
|
||||||
"size[9,11;]"..
|
|
||||||
"label[1,0;"..S("Choose Milling Program:").."]"..
|
|
||||||
"image_button[1,0.5;1,1;technic_cnc_slope.png;slope; ]"..
|
|
||||||
"image_button[2,0.5;1,1;technic_cnc_slope_edge.png;slope_edge; ]"..
|
|
||||||
"image_button[3,0.5;1,1;technic_cnc_slope_inner_edge.png;slope_inner_edge; ]"..
|
|
||||||
"image_button[4,0.5;1,1;technic_cnc_pyramid.png;pyramid; ]"..
|
|
||||||
"image_button[5,0.5;1,1;technic_cnc_spike.png;spike; ]"..
|
|
||||||
"image_button[6,0.5;1,1;technic_cnc_cylinder.png;cylinder; ]"..
|
|
||||||
"image_button[7,0.5;1,1;technic_cnc_oblate_spheroid.png;oblate_spheroid; ]"..
|
|
||||||
"image_button[8,0.5;1,1;technic_cnc_stick.png;stick; ]"..
|
|
||||||
|
|
||||||
"image_button[1,1.5;1,1;technic_cnc_slope_upsdwn.png;slope_upsdown; ]"..
|
|
||||||
"image_button[2,1.5;1,1;technic_cnc_slope_edge_upsdwn.png;slope_edge_upsdown; ]"..
|
|
||||||
"image_button[3,1.5;1,1;technic_cnc_slope_inner_edge_upsdwn.png;slope_inner_edge_upsdown; ]"..
|
|
||||||
"image_button[4,1.5;1,1;technic_cnc_cylinder_horizontal.png;cylinder_horizontal; ]"..
|
|
||||||
"image_button[5,1.5;1,1;technic_cnc_sphere.png;sphere; ]"..
|
|
||||||
|
|
||||||
"image_button[1,2.5;1,1;technic_cnc_slope_lying.png;slope_lying; ]"..
|
|
||||||
"image_button[2,2.5;1,1;technic_cnc_onecurvededge.png;onecurvededge; ]"..
|
|
||||||
"image_button[3,2.5;1,1;technic_cnc_twocurvededge.png;twocurvededge; ]"..
|
|
||||||
|
|
||||||
"label[1,3.5;"..S("Slim Elements half / normal height:").."]"..
|
|
||||||
|
|
||||||
"image_button[1,4;1,0.5;technic_cnc_full.png;full; ]"..
|
|
||||||
"image_button[1,4.5;1,0.5;technic_cnc_half.png;half; ]"..
|
|
||||||
"image_button[2,4;1,1;technic_cnc_element_straight.png;element_straight; ]"..
|
|
||||||
"image_button[3,4;1,1;technic_cnc_element_end.png;element_end; ]"..
|
|
||||||
"image_button[4,4;1,1;technic_cnc_element_cross.png;element_cross; ]"..
|
|
||||||
"image_button[5,4;1,1;technic_cnc_element_t.png;element_t; ]"..
|
|
||||||
"image_button[6,4;1,1;technic_cnc_element_edge.png;element_edge; ]"..
|
|
||||||
|
|
||||||
"label[0, 5.5;"..S("In:").."]"..
|
|
||||||
"list[current_name;src;0.5,5.5;1,1;]"..
|
|
||||||
"label[4, 5.5;"..S("Out:").."]"..
|
|
||||||
"list[current_name;dst;5,5.5;4,1;]"..
|
|
||||||
|
|
||||||
"list[current_player;main;0,7;8,4;]"..
|
|
||||||
"listring[current_name;dst]"..
|
|
||||||
"listring[current_player;main]"..
|
|
||||||
"listring[current_name;src]"..
|
|
||||||
"listring[current_player;main]"
|
|
||||||
|
|
||||||
local size = 1;
|
|
||||||
|
|
||||||
-- The form handler is declared here because we need it in both the inactive and active modes
|
|
||||||
-- in order to be able to change programs wile it is running.
|
|
||||||
local function form_handler(pos, formname, fields, sender)
|
|
||||||
-- REGISTER MILLING PROGRAMS AND OUTPUTS:
|
|
||||||
------------------------------------------
|
|
||||||
-- Program for half/full size
|
|
||||||
if fields["full"] then
|
|
||||||
size = 1
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
if fields["half"] then
|
|
||||||
size = 2
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Resolve the node name and the number of items to make
|
|
||||||
local meta = minetest.get_meta(pos)
|
|
||||||
local inv = meta:get_inventory()
|
|
||||||
local inputstack = inv:get_stack("src", 1)
|
|
||||||
local inputname = inputstack:get_name()
|
|
||||||
local multiplier = 0
|
|
||||||
for k, _ in pairs(fields) do
|
|
||||||
-- Set a multipier for the half/full size capable blocks
|
|
||||||
if twosize_products[k] ~= nil then
|
|
||||||
multiplier = size * twosize_products[k]
|
|
||||||
else
|
|
||||||
multiplier = onesize_products[k]
|
|
||||||
end
|
|
||||||
|
|
||||||
if onesize_products[k] ~= nil or twosize_products[k] ~= nil then
|
|
||||||
meta:set_float( "cnc_multiplier", multiplier)
|
|
||||||
meta:set_string("cnc_user", sender:get_player_name())
|
|
||||||
end
|
|
||||||
|
|
||||||
if onesize_products[k] ~= nil or (twosize_products[k] ~= nil and size==2) then
|
|
||||||
meta:set_string("cnc_product", inputname .. "_technic_cnc_" .. k)
|
|
||||||
--print(inputname .. "_technic_cnc_" .. k)
|
|
||||||
break
|
|
||||||
end
|
|
||||||
|
|
||||||
if twosize_products[k] ~= nil and size==1 then
|
|
||||||
meta:set_string("cnc_product", inputname .. "_technic_cnc_" .. k .. "_double")
|
|
||||||
--print(inputname .. "_technic_cnc_" .. k .. "_double")
|
|
||||||
break
|
|
||||||
end
|
|
||||||
end
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Action code performing the transformation
|
|
||||||
local run = function(pos, node)
|
|
||||||
local meta = minetest.get_meta(pos)
|
|
||||||
local inv = meta:get_inventory()
|
|
||||||
local eu_input = meta:get_int("LV_EU_input")
|
|
||||||
local machine_name = S("%s CNC Machine"):format("LV")
|
|
||||||
local machine_node = "technic:cnc"
|
|
||||||
local demand = 450
|
|
||||||
|
|
||||||
local result = meta:get_string("cnc_product")
|
|
||||||
if inv:is_empty("src") or
|
|
||||||
(not minetest.registered_nodes[result]) or
|
|
||||||
(not inv:room_for_item("dst", result)) then
|
|
||||||
technic.swap_node(pos, machine_node)
|
|
||||||
meta:set_string("infotext", S("%s Idle"):format(machine_name))
|
|
||||||
meta:set_string("cnc_product", "")
|
|
||||||
meta:set_int("LV_EU_demand", 0)
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
if eu_input < demand then
|
|
||||||
technic.swap_node(pos, machine_node)
|
|
||||||
meta:set_string("infotext", S("%s Unpowered"):format(machine_name))
|
|
||||||
elseif eu_input >= demand then
|
|
||||||
technic.swap_node(pos, machine_node.."_active")
|
|
||||||
meta:set_string("infotext", S("%s Active"):format(machine_name))
|
|
||||||
meta:set_int("src_time", meta:get_int("src_time") + 1)
|
|
||||||
if meta:get_int("src_time") >= 3 then -- 3 ticks per output
|
|
||||||
meta:set_int("src_time", 0)
|
|
||||||
srcstack = inv:get_stack("src", 1)
|
|
||||||
srcstack:take_item()
|
|
||||||
inv:set_stack("src", 1, srcstack)
|
|
||||||
inv:add_item("dst", result.." "..meta:get_int("cnc_multiplier"))
|
|
||||||
end
|
|
||||||
end
|
|
||||||
meta:set_int("LV_EU_demand", demand)
|
|
||||||
end
|
|
||||||
|
|
||||||
-- The actual block inactive state
|
|
||||||
minetest.register_node("technic:cnc", {
|
|
||||||
description = S("%s CNC Machine"):format("LV"),
|
|
||||||
tiles = {"technic_cnc_top.png", "technic_cnc_bottom.png", "technic_cnc_side.png",
|
|
||||||
"technic_cnc_side.png", "technic_cnc_side.png", "technic_cnc_front.png"},
|
|
||||||
groups = {cracky=2, technic_machine=1, technic_lv=1},
|
|
||||||
connect_sides = {"bottom", "back", "left", "right"},
|
|
||||||
paramtype2 = "facedir",
|
|
||||||
legacy_facedir_simple = true,
|
|
||||||
on_construct = function(pos)
|
|
||||||
local meta = minetest.get_meta(pos)
|
|
||||||
meta:set_string("infotext", S("%s CNC Machine"):format("LV"))
|
|
||||||
meta:set_float("technic_power_machine", 1)
|
|
||||||
meta:set_string("formspec", cnc_formspec)
|
|
||||||
local inv = meta:get_inventory()
|
|
||||||
inv:set_size("src", 1)
|
|
||||||
inv:set_size("dst", 4)
|
|
||||||
end,
|
|
||||||
can_dig = technic.machine_can_dig,
|
|
||||||
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_receive_fields = form_handler,
|
|
||||||
technic_run = run,
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Active state block
|
|
||||||
minetest.register_node("technic:cnc_active", {
|
|
||||||
description = S("%s CNC Machine"):format("LV"),
|
|
||||||
tiles = {"technic_cnc_top_active.png", "technic_cnc_bottom.png", "technic_cnc_side.png",
|
|
||||||
"technic_cnc_side.png", "technic_cnc_side.png", "technic_cnc_front_active.png"},
|
|
||||||
groups = {cracky=2, technic_machine=1, technic_lv=1, not_in_creative_inventory=1},
|
|
||||||
connect_sides = {"bottom", "back", "left", "right"},
|
|
||||||
paramtype2 = "facedir",
|
|
||||||
drop = "technic:cnc",
|
|
||||||
legacy_facedir_simple = true,
|
|
||||||
can_dig = technic.machine_can_dig,
|
|
||||||
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_receive_fields = form_handler,
|
|
||||||
technic_run = run,
|
|
||||||
technic_disabled_machine_name = "technic:cnc",
|
|
||||||
})
|
|
||||||
|
|
||||||
technic.register_machine("LV", "technic:cnc", technic.receiver)
|
|
||||||
technic.register_machine("LV", "technic:cnc_active", technic.receiver)
|
|
||||||
|
|
@ -1,91 +0,0 @@
|
|||||||
-- REGISTER MATERIALS AND PROPERTIES FOR NONCUBIC ELEMENTS:
|
|
||||||
-----------------------------------------------------------
|
|
||||||
|
|
||||||
local S = technic.getter
|
|
||||||
|
|
||||||
-- DIRT
|
|
||||||
-------
|
|
||||||
technic.cnc.register_all("default:dirt",
|
|
||||||
{snappy=2,choppy=2,oddly_breakable_by_hand=3,not_in_creative_inventory=1},
|
|
||||||
{"default_grass.png", "default_dirt.png", "default_grass.png"},
|
|
||||||
S("Dirt"))
|
|
||||||
-- WOOD
|
|
||||||
-------
|
|
||||||
technic.cnc.register_all("default:wood",
|
|
||||||
{snappy=2, choppy=2, oddly_breakable_by_hand=2, not_in_creative_inventory=1},
|
|
||||||
{"default_wood.png"},
|
|
||||||
S("Wooden"))
|
|
||||||
-- STONE
|
|
||||||
--------
|
|
||||||
technic.cnc.register_all("default:stone",
|
|
||||||
{cracky=3, not_in_creative_inventory=1},
|
|
||||||
{"default_stone.png"},
|
|
||||||
S("Stone"))
|
|
||||||
-- COBBLE
|
|
||||||
---------
|
|
||||||
technic.cnc.register_all("default:cobble",
|
|
||||||
{cracky=3, not_in_creative_inventory=1},
|
|
||||||
{"default_cobble.png"},
|
|
||||||
S("Cobble"))
|
|
||||||
-- BRICK
|
|
||||||
--------
|
|
||||||
technic.cnc.register_all("default:brick",
|
|
||||||
{cracky=3, not_in_creative_inventory=1},
|
|
||||||
{"default_brick.png"},
|
|
||||||
S("Brick"))
|
|
||||||
|
|
||||||
-- SANDSTONE
|
|
||||||
------------
|
|
||||||
technic.cnc.register_all("default:sandstone",
|
|
||||||
{crumbly=2, cracky=3, not_in_creative_inventory=1},
|
|
||||||
{"default_sandstone.png"},
|
|
||||||
S("Sandstone"))
|
|
||||||
|
|
||||||
-- LEAVES
|
|
||||||
---------
|
|
||||||
technic.cnc.register_all("default:leaves",
|
|
||||||
{snappy=2, choppy=2, oddly_breakable_by_hand=3, not_in_creative_inventory=1},
|
|
||||||
{"default_leaves.png"},
|
|
||||||
S("Leaves"))
|
|
||||||
-- TREE
|
|
||||||
-------
|
|
||||||
technic.cnc.register_all("default:tree",
|
|
||||||
{snappy=1, choppy=2, oddly_breakable_by_hand=2, flammable=3, wood=1, not_in_creative_inventory=1},
|
|
||||||
{"default_tree.png"},
|
|
||||||
S("Tree"))
|
|
||||||
|
|
||||||
-- WROUGHT IRON
|
|
||||||
---------------
|
|
||||||
technic.cnc.register_all("default:steelblock",
|
|
||||||
{cracky=1, level=2, not_in_creative_inventory=1},
|
|
||||||
{"technic_wrought_iron_block.png"},
|
|
||||||
S("Wrought Iron"))
|
|
||||||
|
|
||||||
-- Bronze
|
|
||||||
--------
|
|
||||||
technic.cnc.register_all("default:bronzeblock",
|
|
||||||
{cracky=1, level=2, not_in_creative_inventory=1},
|
|
||||||
{"default_bronze_block.png"},
|
|
||||||
S("Bronze"))
|
|
||||||
|
|
||||||
-- Stainless Steel
|
|
||||||
--------
|
|
||||||
technic.cnc.register_all("technic:stainless_steel_block",
|
|
||||||
{cracky=1, level=2, not_in_creative_inventory=1},
|
|
||||||
{"technic_stainless_steel_block.png"},
|
|
||||||
S("Stainless Steel"))
|
|
||||||
|
|
||||||
-- Marble
|
|
||||||
------------
|
|
||||||
technic.cnc.register_all("technic:marble",
|
|
||||||
{cracky=3, not_in_creative_inventory=1},
|
|
||||||
{"technic_marble.png"},
|
|
||||||
S("Marble"))
|
|
||||||
|
|
||||||
-- Granite
|
|
||||||
------------
|
|
||||||
technic.cnc.register_all("technic:granite",
|
|
||||||
{cracky=1, not_in_creative_inventory=1},
|
|
||||||
{"technic_granite.png"},
|
|
||||||
S("Granite"))
|
|
||||||
|
|
@ -4,10 +4,14 @@ minetest.register_alias("compressor", "technic:lv_compressor")
|
|||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = 'technic:lv_compressor',
|
output = 'technic:lv_compressor',
|
||||||
recipe = {
|
recipe = {
|
||||||
{'default:stone', 'technic:motor', 'default:stone'},
|
{'default:stone', 'basic_materials:motor', 'default:stone'},
|
||||||
{'mesecons:piston', 'technic:machine_casing', 'mesecons:piston'},
|
{'mesecons:piston', 'technic:machine_casing', 'mesecons:piston'},
|
||||||
{'technic:fine_silver_wire', 'technic:lv_cable', 'technic:fine_silver_wire'},
|
{'basic_materials:silver_wire', 'technic:lv_cable', 'basic_materials:silver_wire'},
|
||||||
}
|
},
|
||||||
|
replacements = {
|
||||||
|
{"basic_materials:silver_wire", "basic_materials:empty_spool"},
|
||||||
|
{"basic_materials:silver_wire", "basic_materials:empty_spool"}
|
||||||
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
technic.register_compressor({tier = "LV", demand = {300}, speed = 1})
|
technic.register_compressor({tier = "LV", demand = {300}, speed = 1})
|
||||||
|
@ -4,7 +4,7 @@ minetest.register_alias("extractor", "technic:lv_extractor")
|
|||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = 'technic:lv_extractor',
|
output = 'technic:lv_extractor',
|
||||||
recipe = {
|
recipe = {
|
||||||
{'technic:treetap', 'technic:motor', 'technic:treetap'},
|
{'technic:treetap', 'basic_materials:motor', 'technic:treetap'},
|
||||||
{'technic:treetap', 'technic:machine_casing', 'technic:treetap'},
|
{'technic:treetap', 'technic:machine_casing', 'technic:treetap'},
|
||||||
{'', 'technic:lv_cable', ''},
|
{'', 'technic:lv_cable', ''},
|
||||||
}
|
}
|
||||||
|
@ -11,9 +11,13 @@ minetest.register_craft({
|
|||||||
output = 'technic:geothermal',
|
output = 'technic:geothermal',
|
||||||
recipe = {
|
recipe = {
|
||||||
{'technic:granite', 'default:diamond', 'technic:granite'},
|
{'technic:granite', 'default:diamond', 'technic:granite'},
|
||||||
{'technic:fine_copper_wire', 'technic:machine_casing', 'technic:fine_copper_wire'},
|
{'basic_materials:copper_wire', 'technic:machine_casing', 'basic_materials:copper_wire'},
|
||||||
{'technic:granite', 'technic:lv_cable', 'technic:granite'},
|
{'technic:granite', 'technic:lv_cable', 'technic:granite'},
|
||||||
}
|
},
|
||||||
|
replacements = {
|
||||||
|
{"basic_materials:copper_wire", "basic_materials:empty_spool"},
|
||||||
|
{"basic_materials:copper_wire", "basic_materials:empty_spool"}
|
||||||
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craftitem("technic:geothermal", {
|
minetest.register_craftitem("technic:geothermal", {
|
||||||
|
@ -9,5 +9,25 @@ minetest.register_craft({
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
if (minetest.get_modpath('everness')) then
|
||||||
|
minetest.register_craft({
|
||||||
|
output = 'technic:lv_grinder',
|
||||||
|
recipe = {
|
||||||
|
{'everness:coral_desert_stone', 'default:diamond', 'everness:coral_desert_stone'},
|
||||||
|
{'everness:coral_desert_stone', 'technic:machine_casing', 'everness:coral_desert_stone'},
|
||||||
|
{'technic:granite', 'technic:lv_cable', 'technic:granite'},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = 'technic:lv_grinder',
|
||||||
|
recipe = {
|
||||||
|
{'everness:forsaken_desert_stone', 'default:diamond', 'everness:forsaken_desert_stone'},
|
||||||
|
{'everness:forsaken_desert_stone', 'technic:machine_casing', 'everness:forsaken_desert_stone'},
|
||||||
|
{'technic:granite', 'technic:lv_cable', 'technic:granite'},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
technic.register_grinder({tier="LV", demand={200}, speed=1})
|
technic.register_grinder({tier="LV", demand={200}, speed=1})
|
||||||
|
|
||||||
|
@ -22,8 +22,6 @@ dofile(path.."/extractor.lua")
|
|||||||
dofile(path.."/compressor.lua")
|
dofile(path.."/compressor.lua")
|
||||||
|
|
||||||
dofile(path.."/music_player.lua")
|
dofile(path.."/music_player.lua")
|
||||||
|
-- NEW LV LAMPS
|
||||||
dofile(path.."/cnc.lua")
|
dofile(path.."/led.lua")
|
||||||
dofile(path.."/cnc_api.lua")
|
dofile(path.."/lamp.lua")
|
||||||
dofile(path.."/cnc_nodes.lua")
|
|
||||||
|
|
||||||
|
156
technic/machines/LV/lamp.lua
Normal file
@ -0,0 +1,156 @@
|
|||||||
|
|
||||||
|
-- LV Lamp
|
||||||
|
-- Illuminates a 7x7x3(H) volume below itself with light bright as the sun.
|
||||||
|
|
||||||
|
|
||||||
|
local S = technic.getter
|
||||||
|
|
||||||
|
local desc = S("@1 Lamp", S("LV"))
|
||||||
|
local active_desc = S("@1 Active", desc)
|
||||||
|
local unpowered_desc = S("@1 Unpowered", desc)
|
||||||
|
local off_desc = S("@1 Off", desc)
|
||||||
|
local demand = 50
|
||||||
|
|
||||||
|
|
||||||
|
-- Invisible light source node used for illumination
|
||||||
|
minetest.register_node("technic:dummy_light_source", {
|
||||||
|
description = S("Dummy light source node"),
|
||||||
|
inventory_image = "technic_dummy_light_source.png",
|
||||||
|
wield_image = "technic_dummy_light_source.png",
|
||||||
|
paramtype = "light",
|
||||||
|
drawtype = "airlike",
|
||||||
|
light_source = 14,
|
||||||
|
sunlight_propagates = true,
|
||||||
|
walkable = false,
|
||||||
|
buildable_to = true,
|
||||||
|
diggable = false,
|
||||||
|
pointable = false,
|
||||||
|
--drop = "", -- Intentionally allowed to drop itself
|
||||||
|
groups = {not_in_creative_inventory = 1}
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
local function illuminate(pos, active)
|
||||||
|
local pos1 = {x = pos.x - 3, y = pos.y - 1, z = pos.z - 3}
|
||||||
|
local pos2 = {x = pos.x + 3, y = pos.y - 3, z = pos.z + 3}
|
||||||
|
|
||||||
|
local find_node = active and "air" or "technic:dummy_light_source"
|
||||||
|
local set_node = {name = (active and "technic:dummy_light_source" or "air")}
|
||||||
|
|
||||||
|
for _,p in pairs(minetest.find_nodes_in_area(pos1, pos2, find_node)) do
|
||||||
|
minetest.set_node(p, set_node)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local function lamp_run(pos, node)
|
||||||
|
local meta = minetest.get_meta(pos)
|
||||||
|
|
||||||
|
if meta:get_int("LV_EU_demand") == 0 then
|
||||||
|
return -- Lamp is turned off
|
||||||
|
end
|
||||||
|
|
||||||
|
local eu_input = meta:get_int("LV_EU_input")
|
||||||
|
|
||||||
|
if node.name == "technic:lv_lamp_active" then
|
||||||
|
if eu_input < demand then
|
||||||
|
technic.swap_node(pos, "technic:lv_lamp")
|
||||||
|
meta:set_string("infotext", unpowered_desc)
|
||||||
|
illuminate(pos, false)
|
||||||
|
else
|
||||||
|
illuminate(pos, true)
|
||||||
|
end
|
||||||
|
elseif node.name == "technic:lv_lamp" then
|
||||||
|
if eu_input >= demand then
|
||||||
|
technic.swap_node(pos, "technic:lv_lamp_active")
|
||||||
|
meta:set_string("infotext", active_desc)
|
||||||
|
illuminate(pos, true)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local function lamp_toggle(pos, node, player)
|
||||||
|
if not player or minetest.is_protected(pos, player:get_player_name()) then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
local meta = minetest.get_meta(pos)
|
||||||
|
if meta:get_int("LV_EU_demand") == 0 then
|
||||||
|
meta:set_string("infotext", active_desc)
|
||||||
|
meta:set_int("LV_EU_demand", demand)
|
||||||
|
else
|
||||||
|
illuminate(pos, false)
|
||||||
|
technic.swap_node(pos, "technic:lv_lamp")
|
||||||
|
meta:set_string("infotext", off_desc)
|
||||||
|
meta:set_int("LV_EU_demand", 0)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local common_fields = {
|
||||||
|
drawtype = "nodebox",
|
||||||
|
node_box = {
|
||||||
|
type = "fixed",
|
||||||
|
fixed = {0.5,0.5,0.5,-0.5,-0.2,-0.5}
|
||||||
|
},
|
||||||
|
tiles = {
|
||||||
|
"technic_lv_lamp_top.png",
|
||||||
|
"technic_lv_lamp_bottom.png",
|
||||||
|
"technic_lv_lamp_side.png",
|
||||||
|
"technic_lv_lamp_side.png",
|
||||||
|
"technic_lv_lamp_side.png",
|
||||||
|
"technic_lv_lamp_side.png"
|
||||||
|
},
|
||||||
|
connect_sides = {"front", "back", "left", "right", "top"},
|
||||||
|
can_dig = technic.machine_can_dig,
|
||||||
|
technic_run = lamp_run,
|
||||||
|
on_destruct = illuminate,
|
||||||
|
on_rightclick = lamp_toggle
|
||||||
|
}
|
||||||
|
|
||||||
|
local ndef
|
||||||
|
|
||||||
|
ndef = {
|
||||||
|
description = desc,
|
||||||
|
groups = {cracky = 2, technic_machine = 1, technic_lv = 1},
|
||||||
|
on_construct = function(pos)
|
||||||
|
local meta = minetest.get_meta(pos)
|
||||||
|
meta:set_string("infotext", desc)
|
||||||
|
meta:set_int("LV_EU_demand", demand)
|
||||||
|
end
|
||||||
|
}
|
||||||
|
|
||||||
|
for k, v in pairs(common_fields) do
|
||||||
|
ndef[k] = v
|
||||||
|
end
|
||||||
|
|
||||||
|
minetest.register_node("technic:lv_lamp", ndef)
|
||||||
|
|
||||||
|
|
||||||
|
ndef = {
|
||||||
|
description = active_desc,
|
||||||
|
paramtype = "light",
|
||||||
|
light_source = 14,
|
||||||
|
drop = "technic:lv_lamp",
|
||||||
|
groups = {cracky = 2, technic_machine = 1, technic_lv = 1, not_in_creative_inventory = 1},
|
||||||
|
technic_on_disable = function(pos)
|
||||||
|
illuminate(pos, false)
|
||||||
|
technic.swap_node(pos, "technic:lv_lamp")
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
|
||||||
|
for k, v in pairs(common_fields) do
|
||||||
|
ndef[k] = v
|
||||||
|
end
|
||||||
|
|
||||||
|
minetest.register_node("technic:lv_lamp_active", ndef)
|
||||||
|
|
||||||
|
|
||||||
|
technic.register_machine("LV", "technic:lv_lamp", technic.receiver)
|
||||||
|
technic.register_machine("LV", "technic:lv_lamp_active", technic.receiver)
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = "technic:lv_lamp",
|
||||||
|
recipe = {
|
||||||
|
{"default:glass", "default:glass", "default:glass"},
|
||||||
|
{"technic:lv_led", "technic:lv_led", "technic:lv_led"},
|
||||||
|
{"mesecons_materials:glue", "technic:lv_cable", "mesecons_materials:glue"},
|
||||||
|
}
|
||||||
|
})
|
96
technic/machines/LV/led.lua
Normal file
@ -0,0 +1,96 @@
|
|||||||
|
-- LED
|
||||||
|
-- Intended primarily as a core component for LED lamps.
|
||||||
|
|
||||||
|
local S = technic.getter
|
||||||
|
|
||||||
|
local desc = S("@1 LED", S("LV"))
|
||||||
|
local active_desc = S("@1 Active", desc)
|
||||||
|
local unpowered_desc = S("@1 Unpowered", desc)
|
||||||
|
local demand = 5
|
||||||
|
|
||||||
|
|
||||||
|
local function led_run(pos, node)
|
||||||
|
local meta = minetest.get_meta(pos)
|
||||||
|
local eu_input = meta:get_int("LV_EU_input")
|
||||||
|
|
||||||
|
if eu_input < demand and node.name == "technic:lv_led_active" then
|
||||||
|
technic.swap_node(pos, "technic:lv_led")
|
||||||
|
meta:set_string("infotext", unpowered_desc)
|
||||||
|
elseif eu_input >= demand and node.name == "technic:lv_led" then
|
||||||
|
technic.swap_node(pos, "technic:lv_led_active")
|
||||||
|
meta:set_string("infotext", active_desc)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local common_fields = {
|
||||||
|
drawtype = "nodebox",
|
||||||
|
node_box = {
|
||||||
|
type = "fixed",
|
||||||
|
fixed = {0.5, 0.5, 0.5, -0.5, 0.3, -0.5}
|
||||||
|
},
|
||||||
|
tiles = {
|
||||||
|
"technic_lv_led_top.png",
|
||||||
|
"technic_lv_led.png",
|
||||||
|
"technic_lv_led_side.png",
|
||||||
|
"technic_lv_led_side2.png",
|
||||||
|
"technic_lv_led_side2.png",
|
||||||
|
"technic_lv_led_side2.png",
|
||||||
|
},
|
||||||
|
|
||||||
|
connect_sides = {"front", "back", "left", "right", "top", "bottom"},
|
||||||
|
can_dig = technic.machine_can_dig,
|
||||||
|
technic_run = led_run,
|
||||||
|
}
|
||||||
|
|
||||||
|
local ndef
|
||||||
|
|
||||||
|
ndef = {
|
||||||
|
description = desc,
|
||||||
|
inventory_image = "technic_lv_led_inv.png",
|
||||||
|
sunlight_propagates = true,
|
||||||
|
groups = {cracky = 2, technic_machine = 1, technic_lv = 1},
|
||||||
|
|
||||||
|
on_construct = function(pos)
|
||||||
|
local meta = minetest.get_meta(pos)
|
||||||
|
meta:set_string("infotext", desc)
|
||||||
|
meta:set_int("LV_EU_demand", demand)
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
|
||||||
|
for k, v in pairs(common_fields) do
|
||||||
|
ndef[k] = v
|
||||||
|
end
|
||||||
|
|
||||||
|
minetest.register_node("technic:lv_led", ndef)
|
||||||
|
|
||||||
|
|
||||||
|
ndef = {
|
||||||
|
description = active_desc,
|
||||||
|
paramtype = "light",
|
||||||
|
light_source = 9,
|
||||||
|
drop = "technic:lv_led",
|
||||||
|
groups = {cracky = 2, technic_machine = 1, technic_lv = 1, not_in_creative_inventory = 1},
|
||||||
|
technic_on_disable = function(pos)
|
||||||
|
technic.swap_node(pos, "technic:lv_led")
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
|
||||||
|
for k, v in pairs(common_fields) do
|
||||||
|
ndef[k] = v
|
||||||
|
end
|
||||||
|
|
||||||
|
minetest.register_node("technic:lv_led_active", ndef)
|
||||||
|
|
||||||
|
|
||||||
|
technic.register_machine("LV", "technic:lv_led", technic.receiver)
|
||||||
|
technic.register_machine("LV", "technic:lv_led_active", technic.receiver)
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = "technic:lv_led 2",
|
||||||
|
recipe = {
|
||||||
|
{"", "homedecor:plastic_sheeting", ""},
|
||||||
|
{"homedecor:plastic_sheeting", "technic:doped_silicon_wafer", "homedecor:plastic_sheeting"},
|
||||||
|
{"", "basic_materials:silver_wire", ""},
|
||||||
|
},
|
||||||
|
replacements = { {"basic_materials:silver_wire", "basic_materials:empty_spool"}, },
|
||||||
|
})
|
@ -24,7 +24,6 @@ local run = function(pos, node)
|
|||||||
local meta = minetest.get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
local eu_input = meta:get_int("LV_EU_input")
|
local eu_input = meta:get_int("LV_EU_input")
|
||||||
local machine_name = S("%s Music Player"):format("LV")
|
local machine_name = S("%s Music Player"):format("LV")
|
||||||
local machine_node = "technic:music_player"
|
|
||||||
local demand = 150
|
local demand = 150
|
||||||
|
|
||||||
local current_track = meta:get_int("current_track")
|
local current_track = meta:get_int("current_track")
|
||||||
|
@ -9,9 +9,9 @@ minetest.register_craft({
|
|||||||
output = 'technic:solar_panel',
|
output = 'technic:solar_panel',
|
||||||
recipe = {
|
recipe = {
|
||||||
{'technic:doped_silicon_wafer', 'technic:doped_silicon_wafer', 'technic:doped_silicon_wafer'},
|
{'technic:doped_silicon_wafer', 'technic:doped_silicon_wafer', 'technic:doped_silicon_wafer'},
|
||||||
{'technic:fine_silver_wire', 'technic:lv_cable', 'mesecons_materials:glue'},
|
{'basic_materials:silver_wire', 'technic:lv_cable', 'mesecons_materials:glue'},
|
||||||
|
},
|
||||||
}
|
replacements = { {"basic_materials:silver_wire", "basic_materials:empty_spool"}, },
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
@ -51,7 +51,7 @@ minetest.register_node("technic:solar_panel", {
|
|||||||
technic_machine=1, technic_lv=1},
|
technic_machine=1, technic_lv=1},
|
||||||
connect_sides = {"bottom"},
|
connect_sides = {"bottom"},
|
||||||
sounds = default.node_sound_wood_defaults(),
|
sounds = default.node_sound_wood_defaults(),
|
||||||
description = S("Small Solar %s Generator"):format("LV"),
|
description = S("Small Solar %s Generator"):format("LV"),
|
||||||
active = false,
|
active = false,
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
-- A water mill produces LV EUs by exploiting flowing water across it
|
-- A water mill produces LV EUs by exploiting flowing water across it
|
||||||
-- It is a LV EU supplyer and fairly low yield (max 180EUs)
|
-- It is a LV EU supplier and fairly low yield (max 180EUs)
|
||||||
-- It is a little over half as good as the thermal generator.
|
-- It is a little over half as good as the thermal generator.
|
||||||
|
|
||||||
local S = technic.getter
|
local S = technic.getter
|
||||||
@ -29,8 +29,8 @@ end
|
|||||||
local run = function(pos, node)
|
local run = function(pos, node)
|
||||||
local meta = minetest.get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
local water_flow = 0
|
local water_flow = 0
|
||||||
local production_level = 0
|
local production_level
|
||||||
local eu_supply = 0
|
local eu_supply
|
||||||
local max_output = 4 * 45 -- keeping it around 180, little more than previous 150 :)
|
local max_output = 4 * 45 -- keeping it around 180, little more than previous 150 :)
|
||||||
|
|
||||||
local positions = {
|
local positions = {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "technic:mv_centrifuge",
|
output = "technic:mv_centrifuge",
|
||||||
recipe = {
|
recipe = {
|
||||||
{"technic:motor", "technic:copper_plate", "technic:diamond_drill_head"},
|
{"basic_materials:motor", "technic:copper_plate", "technic:diamond_drill_head"},
|
||||||
{"technic:copper_plate", "technic:machine_casing", "technic:copper_plate" },
|
{"technic:copper_plate", "technic:machine_casing", "technic:copper_plate" },
|
||||||
{"pipeworks:one_way_tube", "technic:mv_cable", "pipeworks:mese_filter" },
|
{"pipeworks:one_way_tube", "technic:mv_cable", "pipeworks:mese_filter" },
|
||||||
}
|
}
|
||||||
|
12
technic/machines/MV/freezer.lua
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
-- MV freezer
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = 'technic:mv_freezer',
|
||||||
|
recipe = {
|
||||||
|
{'technic:stainless_steel_ingot', 'technic:motor', 'technic:stainless_steel_ingot'},
|
||||||
|
{'pipeworks:pipe_1_empty', 'technic:mv_transformer', 'pipeworks:pipe_1_empty'},
|
||||||
|
{'technic:stainless_steel_ingot', 'technic:mv_cable', 'technic:stainless_steel_ingot'},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
technic.register_freezer({tier = "MV", demand = {800, 600, 400}, speed = 0.5, upgrade = 1, tube = 1})
|
@ -1,5 +1,5 @@
|
|||||||
-- A Hydro Turbine produces MV EUs by exploiting flowing water across it
|
-- A Hydro Turbine produces MV EUs by exploiting flowing water across it
|
||||||
-- It is a MV EU supplyer and fairly high yield (max 1800EUs)
|
-- It is a MV EU supplier and fairly high yield (max 1800EUs)
|
||||||
|
|
||||||
local S = technic.getter
|
local S = technic.getter
|
||||||
|
|
||||||
@ -18,7 +18,7 @@ minetest.register_craft({
|
|||||||
|
|
||||||
local function get_water_flow(pos)
|
local function get_water_flow(pos)
|
||||||
local node = minetest.get_node(pos)
|
local node = minetest.get_node(pos)
|
||||||
if minetest.get_item_group(node.name, "water") == 3 then
|
if minetest.get_item_group(node.name, "water") == 3 and string.find(node.name, "flowing") then
|
||||||
return node.param2 -- returns approx. water flow, if any
|
return node.param2 -- returns approx. water flow, if any
|
||||||
end
|
end
|
||||||
return 0
|
return 0
|
||||||
@ -30,8 +30,8 @@ end
|
|||||||
local run = function(pos, node)
|
local run = function(pos, node)
|
||||||
local meta = minetest.get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
local water_flow = 0
|
local water_flow = 0
|
||||||
local production_level = 0
|
local production_level
|
||||||
local eu_supply = 0
|
local eu_supply
|
||||||
local max_output = 40 * 45 -- Generates 1800EU/s
|
local max_output = 40 * 45 -- Generates 1800EU/s
|
||||||
|
|
||||||
local positions = {
|
local positions = {
|
||||||
|
@ -25,6 +25,8 @@ dofile(path.."/centrifuge.lua")
|
|||||||
|
|
||||||
dofile(path.."/tool_workshop.lua")
|
dofile(path.."/tool_workshop.lua")
|
||||||
|
|
||||||
|
dofile(path.."/freezer.lua")
|
||||||
|
|
||||||
-- The power radiator supplies appliances with inductive coupled power:
|
-- The power radiator supplies appliances with inductive coupled power:
|
||||||
-- Lighting and associated textures is taken directly from VanessaE's homedecor and made electric.
|
-- Lighting and associated textures is taken directly from VanessaE's homedecor and made electric.
|
||||||
-- This is currently useless, slow, and mostly copied
|
-- This is currently useless, slow, and mostly copied
|
||||||
|
@ -14,20 +14,7 @@ end
|
|||||||
|
|
||||||
function technic_homedecor_node_is_owned(pos, placer)
|
function technic_homedecor_node_is_owned(pos, placer)
|
||||||
local ownername = false
|
local ownername = false
|
||||||
if type(IsPlayerNodeOwner) == "function" then -- node_ownership mod
|
if type(isprotect) == "function" then -- glomie's protection mod
|
||||||
if HasOwner(pos, placer) then
|
|
||||||
if not IsPlayerNodeOwner(pos, placer:get_player_name()) then
|
|
||||||
if type(getLastOwner) == "function" then -- ...is an old version
|
|
||||||
ownername = getLastOwner(pos)
|
|
||||||
elseif type(GetNodeOwnerName) == "function" then -- ...is a recent version
|
|
||||||
ownername = GetNodeOwnerName(pos)
|
|
||||||
else
|
|
||||||
ownername = S("someone")
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
elseif type(isprotect) == "function" then -- glomie's protection mod
|
|
||||||
if not isprotect(5, pos, placer) then
|
if not isprotect(5, pos, placer) then
|
||||||
ownername = S("someone")
|
ownername = S("someone")
|
||||||
end
|
end
|
||||||
@ -45,7 +32,6 @@ function technic_homedecor_node_is_owned(pos, placer)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local dirs1 = {20, 23, 22, 21}
|
|
||||||
local dirs2 = {9, 18, 7, 12}
|
local dirs2 = {9, 18, 7, 12}
|
||||||
|
|
||||||
local technic_homedecor_rotate_and_place = function(itemstack, placer, pointed_thing)
|
local technic_homedecor_rotate_and_place = function(itemstack, placer, pointed_thing)
|
||||||
@ -58,7 +44,6 @@ local technic_homedecor_rotate_and_place = function(itemstack, placer, pointed_t
|
|||||||
local under = pointed_thing.under
|
local under = pointed_thing.under
|
||||||
local pitch = placer:get_look_pitch()
|
local pitch = placer:get_look_pitch()
|
||||||
local pname = minetest.get_node(under).name
|
local pname = minetest.get_node(under).name
|
||||||
local node = minetest.get_node(above)
|
|
||||||
local fdir = minetest.dir_to_facedir(placer:get_look_dir())
|
local fdir = minetest.dir_to_facedir(placer:get_look_dir())
|
||||||
local wield_name = itemstack:get_name()
|
local wield_name = itemstack:get_name()
|
||||||
|
|
||||||
@ -159,7 +144,7 @@ minetest.register_node('technic:homedecor_glowlight_half_yellow_active', {
|
|||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
walkable = true,
|
walkable = true,
|
||||||
light_source = LIGHT_MAX,
|
light_source = minetest.LIGHT_MAX,
|
||||||
sounds = default.node_sound_wood_defaults(),
|
sounds = default.node_sound_wood_defaults(),
|
||||||
|
|
||||||
groups = { snappy = 3, not_in_creative_inventory=1},
|
groups = { snappy = 3, not_in_creative_inventory=1},
|
||||||
@ -240,7 +225,7 @@ minetest.register_node('technic:homedecor_glowlight_quarter_yellow_active', {
|
|||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
walkable = true,
|
walkable = true,
|
||||||
light_source = LIGHT_MAX-1,
|
light_source = minetest.LIGHT_MAX-1,
|
||||||
sounds = default.node_sound_wood_defaults(),
|
sounds = default.node_sound_wood_defaults(),
|
||||||
|
|
||||||
groups = { snappy = 3, not_in_creative_inventory=1},
|
groups = { snappy = 3, not_in_creative_inventory=1},
|
||||||
@ -322,7 +307,7 @@ minetest.register_node('technic:homedecor_glowlight_half_white_active', {
|
|||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
walkable = true,
|
walkable = true,
|
||||||
light_source = LIGHT_MAX,
|
light_source = minetest.LIGHT_MAX,
|
||||||
sounds = default.node_sound_wood_defaults(),
|
sounds = default.node_sound_wood_defaults(),
|
||||||
|
|
||||||
groups = { snappy = 3, not_in_creative_inventory=1},
|
groups = { snappy = 3, not_in_creative_inventory=1},
|
||||||
@ -403,7 +388,7 @@ minetest.register_node('technic:homedecor_glowlight_quarter_white_active', {
|
|||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
walkable = true,
|
walkable = true,
|
||||||
light_source = LIGHT_MAX-1,
|
light_source = minetest.LIGHT_MAX-1,
|
||||||
sounds = default.node_sound_wood_defaults(),
|
sounds = default.node_sound_wood_defaults(),
|
||||||
|
|
||||||
groups = { snappy = 3, not_in_creative_inventory=1},
|
groups = { snappy = 3, not_in_creative_inventory=1},
|
||||||
@ -484,7 +469,7 @@ minetest.register_node('technic:homedecor_glowlight_small_cube_yellow_active', {
|
|||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
walkable = true,
|
walkable = true,
|
||||||
light_source = LIGHT_MAX-1,
|
light_source = minetest.LIGHT_MAX-1,
|
||||||
sounds = default.node_sound_wood_defaults(),
|
sounds = default.node_sound_wood_defaults(),
|
||||||
|
|
||||||
groups = { snappy = 3, not_in_creative_inventory=1},
|
groups = { snappy = 3, not_in_creative_inventory=1},
|
||||||
@ -565,7 +550,7 @@ minetest.register_node('technic:homedecor_glowlight_small_cube_white_active', {
|
|||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
walkable = true,
|
walkable = true,
|
||||||
light_source = LIGHT_MAX-1,
|
light_source = minetest.LIGHT_MAX-1,
|
||||||
sounds = default.node_sound_wood_defaults(),
|
sounds = default.node_sound_wood_defaults(),
|
||||||
|
|
||||||
groups = { snappy = 3, not_in_creative_inventory=1},
|
groups = { snappy = 3, not_in_creative_inventory=1},
|
||||||
|
@ -36,7 +36,8 @@ technic.register_inductive_machine = function(name)
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- Appliances:
|
-- Appliances:
|
||||||
-- has_supply: pos of supply node if the appliance has a power radiator near with sufficient power for the demand else ""
|
-- has_supply: pos of supply node if the appliance has a power radiator near
|
||||||
|
-- with sufficient power for the demand else ""
|
||||||
-- EU_demand: The power demand of the device.
|
-- EU_demand: The power demand of the device.
|
||||||
-- EU_charge: Actual use. set to EU_demand if active==1
|
-- EU_charge: Actual use. set to EU_demand if active==1
|
||||||
-- active: set to 1 if the device is on
|
-- active: set to 1 if the device is on
|
||||||
@ -177,8 +178,6 @@ minetest.register_abm({
|
|||||||
-- The supply radius
|
-- The supply radius
|
||||||
local rad = power_radius
|
local rad = power_radius
|
||||||
|
|
||||||
local meta1 = nil
|
|
||||||
local pos1 = {}
|
|
||||||
local used_charge = 0
|
local used_charge = 0
|
||||||
|
|
||||||
-- Index all nodes within supply range
|
-- Index all nodes within supply range
|
||||||
|
@ -39,7 +39,6 @@ local run = function(pos, node)
|
|||||||
local inv = meta:get_inventory()
|
local inv = meta:get_inventory()
|
||||||
local eu_input = meta:get_int("MV_EU_input")
|
local eu_input = meta:get_int("MV_EU_input")
|
||||||
local machine_name = S("%s Tool Workshop"):format("MV")
|
local machine_name = S("%s Tool Workshop"):format("MV")
|
||||||
local machine_node = "technic:tool_workshop"
|
|
||||||
|
|
||||||
-- Setup meta data if it does not exist.
|
-- Setup meta data if it does not exist.
|
||||||
if not eu_input then
|
if not eu_input then
|
||||||
|
@ -13,7 +13,7 @@ minetest.register_craft({
|
|||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = 'technic:wind_mill',
|
output = 'technic:wind_mill',
|
||||||
recipe = {
|
recipe = {
|
||||||
{'', 'technic:motor', ''},
|
{'', 'basic_materials:motor', ''},
|
||||||
{'technic:carbon_steel_ingot', 'technic:carbon_steel_block', 'technic:carbon_steel_ingot'},
|
{'technic:carbon_steel_ingot', 'technic:carbon_steel_block', 'technic:carbon_steel_ingot'},
|
||||||
{'', 'technic:mv_cable', ''},
|
{'', 'technic:mv_cable', ''},
|
||||||
}
|
}
|
||||||
|
@ -48,20 +48,23 @@ local function forceload_on(pos, meta)
|
|||||||
end
|
end
|
||||||
|
|
||||||
local function set_display(pos, meta)
|
local function set_display(pos, meta)
|
||||||
|
local ESC = minetest.formspec_escape
|
||||||
meta:set_string("infotext", S(meta:get_int("enabled") ~= 0 and "%s Enabled" or "%s Disabled"):format(desc))
|
meta:set_string("infotext", S(meta:get_int("enabled") ~= 0 and "%s Enabled" or "%s Disabled"):format(desc))
|
||||||
meta:set_string("formspec",
|
meta:set_string("formspec",
|
||||||
"size[5,3.5]"..
|
"size[5,3.5]"..
|
||||||
"item_image[0,0;1,1;technic:admin_anchor]"..
|
"item_image[0,0;1,1;technic:admin_anchor]"..
|
||||||
"label[1,0;"..minetest.formspec_escape(desc).."]"..
|
"label[1,0;"..ESC(desc).."]"..
|
||||||
"label[0,1;"..minetest.formspec_escape(S("Owner:").." "..meta:get_string("owner")).."]"..
|
"label[0,1;"..ESC(S("Owner:").." "..meta:get_string("owner")).."]"..
|
||||||
(meta:get_int("locked") == 0 and
|
(meta:get_int("locked") == 0 and
|
||||||
"button[3,1;2,1;lock;"..minetest.formspec_escape(S("Unlocked")).."]" or
|
"button[3,1;2,1;lock;"..ESC(S("Unlocked")).."]" or
|
||||||
"button[3,1;2,1;unlock;"..minetest.formspec_escape(S("Locked")).."]")..
|
"button[3,1;2,1;unlock;"..ESC(S("Locked")).."]")..
|
||||||
"field[0.25,2.3;1,1;radius;"..minetest.formspec_escape(S("Radius:"))..";"..meta:get_int("radius").."]"..
|
"field[0.25,2.3;1,1;radius;"..ESC(S("Radius:"))..";"..meta:get_int("radius").."]"..
|
||||||
(meta:get_int("enabled") == 0 and
|
(meta:get_int("enabled") == 0 and
|
||||||
"button[3,2;2,1;enable;"..minetest.formspec_escape(S("Disabled")).."]" or
|
"button[3,2;2,1;enable;"..ESC(S("Disabled")).."]" or
|
||||||
"button[3,2;2,1;disable;"..minetest.formspec_escape(S("Enabled")).."]")..
|
"button[3,2;2,1;disable;"..ESC(S("Enabled")).."]")..
|
||||||
"label[0,3;"..minetest.formspec_escape(S("Keeping %d/%d map blocks loaded"):format(#currently_forceloaded_positions(meta), #compute_forceload_positions(pos, meta))).."]")
|
"label[0,3;"..ESC(S("Keeping %d/%d map blocks loaded"):format(
|
||||||
|
#currently_forceloaded_positions(meta), #compute_forceload_positions(pos, meta)
|
||||||
|
)).."]")
|
||||||
end
|
end
|
||||||
|
|
||||||
minetest.register_node("technic:admin_anchor", {
|
minetest.register_node("technic:admin_anchor", {
|
||||||
@ -80,7 +83,8 @@ minetest.register_node("technic:admin_anchor", {
|
|||||||
end,
|
end,
|
||||||
can_dig = function (pos, player)
|
can_dig = function (pos, player)
|
||||||
local meta = minetest.get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
return meta:get_int("locked") == 0 or (player and player:is_player() and player:get_player_name() == meta:get_string("owner"))
|
return meta:get_int("locked") == 0 or
|
||||||
|
(player and player:is_player() and player:get_player_name() == meta:get_string("owner"))
|
||||||
end,
|
end,
|
||||||
on_destruct = function (pos)
|
on_destruct = function (pos)
|
||||||
local meta = minetest.get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
@ -99,7 +103,11 @@ minetest.register_node("technic:admin_anchor", {
|
|||||||
forceload_off(meta)
|
forceload_off(meta)
|
||||||
if fields.disable then meta:set_int("enabled", 0) end
|
if fields.disable then meta:set_int("enabled", 0) end
|
||||||
if fields.enable then meta:set_int("enabled", 1) end
|
if fields.enable then meta:set_int("enabled", 1) end
|
||||||
if fields.radius and string.find(fields.radius, "^[0-9]+$") and tonumber(fields.radius) < 256 then meta:set_int("radius", fields.radius) end
|
if fields.radius
|
||||||
|
and string.find(fields.radius, "^[0-9]+$")
|
||||||
|
and tonumber(fields.radius) < 256 then
|
||||||
|
meta:set_int("radius", fields.radius)
|
||||||
|
end
|
||||||
if meta:get_int("enabled") ~= 0 then
|
if meta:get_int("enabled") ~= 0 then
|
||||||
forceload_on(pos, meta)
|
forceload_on(pos, meta)
|
||||||
end
|
end
|
||||||
|
@ -84,8 +84,6 @@ minetest.register_abm({
|
|||||||
inv:set_size("src2", 0)
|
inv:set_size("src2", 0)
|
||||||
end
|
end
|
||||||
|
|
||||||
local recipe = nil
|
|
||||||
|
|
||||||
for i, name in pairs({
|
for i, name in pairs({
|
||||||
"fuel_totaltime",
|
"fuel_totaltime",
|
||||||
"fuel_time",
|
"fuel_time",
|
||||||
|
@ -88,6 +88,7 @@ minetest.register_craft({
|
|||||||
local function make_on(mark, length)
|
local function make_on(mark, length)
|
||||||
return function(pos, node)
|
return function(pos, node)
|
||||||
local meta = minetest.get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
|
local owner = meta:get_string("owner")
|
||||||
local inv = meta:get_inventory()
|
local inv = meta:get_inventory()
|
||||||
local dir = vector.new()
|
local dir = vector.new()
|
||||||
if node.param2 == 3 then dir.x = 1 end
|
if node.param2 == 3 then dir.x = 1 end
|
||||||
@ -102,6 +103,9 @@ local function make_on(mark, length)
|
|||||||
minetest.check_for_falling(pos)
|
minetest.check_for_falling(pos)
|
||||||
for i = 1, length do
|
for i = 1, length do
|
||||||
place_pos = vector.add(place_pos, dir)
|
place_pos = vector.add(place_pos, dir)
|
||||||
|
if owner ~= "" and minetest.is_protected(place_pos, owner) then
|
||||||
|
return
|
||||||
|
end
|
||||||
local place_node = minetest.get_node(place_pos)
|
local place_node = minetest.get_node(place_pos)
|
||||||
deploy_node(inv, "slot"..i, place_pos, place_node, node)
|
deploy_node(inv, "slot"..i, place_pos, place_node, node)
|
||||||
end
|
end
|
||||||
@ -118,6 +122,12 @@ local function make_off(mark)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local function allow_inventory_put(pos, listname, index, stack, player)
|
||||||
|
if stack and minetest.get_item_group(stack:get_name(), "technic_constructor") == 1 then
|
||||||
|
return 0
|
||||||
|
end
|
||||||
|
return technic.machine_inventory_put(pos, listname, index, stack, player)
|
||||||
|
end
|
||||||
|
|
||||||
local function make_constructor(mark, length)
|
local function make_constructor(mark, length)
|
||||||
minetest.register_node("technic:constructor_mk"..mark.."_off", {
|
minetest.register_node("technic:constructor_mk"..mark.."_off", {
|
||||||
@ -129,7 +139,8 @@ local function make_constructor(mark, length)
|
|||||||
"technic_constructor_back.png",
|
"technic_constructor_back.png",
|
||||||
"technic_constructor_front_off.png"},
|
"technic_constructor_front_off.png"},
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
groups = {snappy=2, choppy=2, oddly_breakable_by_hand=2, mesecon = 2},
|
groups = {snappy=2, choppy=2, oddly_breakable_by_hand=2,
|
||||||
|
mesecon = 2, technic_constructor = 1},
|
||||||
mesecons = {effector = {action_on = make_on(mark, length)}},
|
mesecons = {effector = {action_on = make_on(mark, length)}},
|
||||||
sounds = default.node_sound_stone_defaults(),
|
sounds = default.node_sound_stone_defaults(),
|
||||||
on_construct = function(pos)
|
on_construct = function(pos)
|
||||||
@ -149,6 +160,11 @@ local function make_constructor(mark, length)
|
|||||||
for i = 1, length do
|
for i = 1, length do
|
||||||
inv:set_size("slot"..i, 1)
|
inv:set_size("slot"..i, 1)
|
||||||
end
|
end
|
||||||
|
meta:set_string("owner", "?")
|
||||||
|
end,
|
||||||
|
after_place_node = function(pos, placer)
|
||||||
|
local meta = minetest.get_meta(pos)
|
||||||
|
meta:set_string("owner", (placer and placer:get_player_name() or "?"))
|
||||||
end,
|
end,
|
||||||
can_dig = function(pos, player)
|
can_dig = function(pos, player)
|
||||||
local meta = minetest.get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
@ -160,7 +176,7 @@ local function make_constructor(mark, length)
|
|||||||
end
|
end
|
||||||
return true
|
return true
|
||||||
end,
|
end,
|
||||||
allow_metadata_inventory_put = technic.machine_inventory_put,
|
allow_metadata_inventory_put = allow_inventory_put,
|
||||||
allow_metadata_inventory_take = technic.machine_inventory_take,
|
allow_metadata_inventory_take = technic.machine_inventory_take,
|
||||||
allow_metadata_inventory_move = technic.machine_inventory_move,
|
allow_metadata_inventory_move = technic.machine_inventory_move,
|
||||||
on_rotate = screwdriver.rotate_simple
|
on_rotate = screwdriver.rotate_simple
|
||||||
@ -176,10 +192,10 @@ local function make_constructor(mark, length)
|
|||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
drop = "technic:constructor_mk"..mark.."_off",
|
drop = "technic:constructor_mk"..mark.."_off",
|
||||||
groups = {snappy=2, choppy=2, oddly_breakable_by_hand=2,
|
groups = {snappy=2, choppy=2, oddly_breakable_by_hand=2,
|
||||||
mesecon=2, not_in_creative_inventory=1},
|
mesecon=2, not_in_creative_inventory=1, technic_constructor=1},
|
||||||
mesecons= {effector = {action_off = make_off(mark)}},
|
mesecons= {effector = {action_off = make_off(mark)}},
|
||||||
sounds = default.node_sound_stone_defaults(),
|
sounds = default.node_sound_stone_defaults(),
|
||||||
allow_metadata_inventory_put = technic.machine_inventory_put,
|
allow_metadata_inventory_put = allow_inventory_put,
|
||||||
allow_metadata_inventory_take = technic.machine_inventory_take,
|
allow_metadata_inventory_take = technic.machine_inventory_take,
|
||||||
allow_metadata_inventory_move = technic.machine_inventory_move,
|
allow_metadata_inventory_move = technic.machine_inventory_move,
|
||||||
on_rotate = false
|
on_rotate = false
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
local S = technic.getter
|
local S = technic.getter
|
||||||
|
|
||||||
frames = {}
|
|
||||||
|
|
||||||
local infinite_stacks = minetest.settings:get_bool("creative_mode")
|
local infinite_stacks = minetest.settings:get_bool("creative_mode")
|
||||||
and minetest.get_modpath("unified_inventory") == nil
|
and minetest.get_modpath("unified_inventory") == nil
|
||||||
|
|
||||||
@ -90,22 +88,22 @@ local function pos_in_list(l, pos)
|
|||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
local function table_empty(table)
|
local function table_empty(what)
|
||||||
for _, __ in pairs(table) do
|
for _ in pairs(what) do
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
local function add_table(table, toadd)
|
local function add_table(what, toadd)
|
||||||
local i = 1
|
local i = 1
|
||||||
while true do
|
while true do
|
||||||
o = table[i]
|
local o = what[i]
|
||||||
if o == toadd then return end
|
if o == toadd then return end
|
||||||
if o == nil then break end
|
if o == nil then break end
|
||||||
i = i + 1
|
i = i + 1
|
||||||
end
|
end
|
||||||
table[i] = toadd
|
what[i] = toadd
|
||||||
end
|
end
|
||||||
|
|
||||||
local function move_nodes_vect(poslist, vect, must_not_move, owner)
|
local function move_nodes_vect(poslist, vect, must_not_move, owner)
|
||||||
@ -155,7 +153,7 @@ local function move_nodes_vect(poslist, vect, must_not_move, owner)
|
|||||||
end
|
end
|
||||||
|
|
||||||
for _, obj in ipairs(objects) do
|
for _, obj in ipairs(objects) do
|
||||||
obj:setpos(vector.add(obj:getpos(), vect))
|
obj:set_pos(vector.add(obj:get_pos(), vect))
|
||||||
end
|
end
|
||||||
|
|
||||||
for _, n in ipairs(nodelist) do
|
for _, n in ipairs(nodelist) do
|
||||||
@ -261,8 +259,8 @@ for zp = 0, 1 do
|
|||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
|
|
||||||
frame_connect_all = function(nodename)
|
frame_connect_all = function(nodename)
|
||||||
l2 = {}
|
local l2 = {}
|
||||||
l1 = {
|
local l1 = {
|
||||||
{ x = -1, y = 0, z = 0 }, { x = 1, y = 0, z = 0 },
|
{ x = -1, y = 0, z = 0 }, { x = 1, y = 0, z = 0 },
|
||||||
{ x = 0, y = -1, z = 0 }, { x = 0, y = 1, z = 0 },
|
{ x = 0, y = -1, z = 0 }, { x = 0, y = 1, z = 0 },
|
||||||
{ x = 0, y = 0, z = -1 }, { x = 0, y = 0, z = 1 }
|
{ x = 0, y = 0, z = -1 }, { x = 0, y = 0, z = 1 }
|
||||||
@ -276,7 +274,7 @@ for zp = 0, 1 do
|
|||||||
end,
|
end,
|
||||||
|
|
||||||
on_punch = function(pos, node, puncher)
|
on_punch = function(pos, node, puncher)
|
||||||
local ppos = puncher:getpos()
|
local ppos = puncher:get_pos()
|
||||||
local pvect = puncher:get_look_dir()
|
local pvect = puncher:get_look_dir()
|
||||||
local pface = get_face(pos, ppos, pvect)
|
local pface = get_face(pos, ppos, pvect)
|
||||||
|
|
||||||
@ -311,7 +309,7 @@ for zp = 0, 1 do
|
|||||||
local node = minetest.get_node(pos)
|
local node = minetest.get_node(pos)
|
||||||
if node.name ~= "air" then
|
if node.name ~= "air" then
|
||||||
if is_supported_node(node.name) then
|
if is_supported_node(node.name) then
|
||||||
obj = minetest.add_entity(pos, "technic:frame_entity")
|
local obj = minetest.add_entity(pos, "technic:frame_entity")
|
||||||
obj:get_luaentity():set_node({ name = itemstack:get_name() })
|
obj:get_luaentity():set_node({ name = itemstack:get_name() })
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
@ -326,6 +324,7 @@ for zp = 0, 1 do
|
|||||||
|
|
||||||
on_rightclick = function(pos, node, placer, itemstack, pointed_thing)
|
on_rightclick = function(pos, node, placer, itemstack, pointed_thing)
|
||||||
if is_supported_node(itemstack:get_name()) then
|
if is_supported_node(itemstack:get_name()) then
|
||||||
|
-- Stripped down version of "core.item_place_node"
|
||||||
if minetest.is_protected(pos, placer:get_player_name()) then
|
if minetest.is_protected(pos, placer:get_player_name()) then
|
||||||
minetest.log("action", placer:get_player_name()
|
minetest.log("action", placer:get_player_name()
|
||||||
.. " tried to place " .. itemstack:get_name()
|
.. " tried to place " .. itemstack:get_name()
|
||||||
@ -349,7 +348,6 @@ for zp = 0, 1 do
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- Run script hook
|
-- Run script hook
|
||||||
local _, callback
|
|
||||||
for _, callback in ipairs(minetest.registered_on_placenodes) do
|
for _, callback in ipairs(minetest.registered_on_placenodes) do
|
||||||
-- Copy pos and node because callback can modify them
|
-- Copy pos and node because callback can modify them
|
||||||
local pos_copy = { x = pos.x, y = pos.y, z = pos.z }
|
local pos_copy = { x = pos.x, y = pos.y, z = pos.z }
|
||||||
@ -364,7 +362,7 @@ for zp = 0, 1 do
|
|||||||
itemstack:take_item()
|
itemstack:take_item()
|
||||||
end
|
end
|
||||||
|
|
||||||
obj = minetest.add_entity(pos, "technic:frame_entity")
|
local obj = minetest.add_entity(pos, "technic:frame_entity")
|
||||||
obj:get_luaentity():set_node({ name = node.name })
|
obj:get_luaentity():set_node({ name = node.name })
|
||||||
|
|
||||||
return itemstack
|
return itemstack
|
||||||
@ -400,21 +398,7 @@ minetest.register_entity("technic:frame_entity", {
|
|||||||
local pos = vector.round(self.object:getpos())
|
local pos = vector.round(self.object:getpos())
|
||||||
frames_pos[pos_to_string(pos)] = node.name
|
frames_pos[pos_to_string(pos)] = node.name
|
||||||
|
|
||||||
local stack = ItemStack(node.name)
|
local prop = {
|
||||||
local itemtable = stack:to_table()
|
|
||||||
local itemname = nil
|
|
||||||
|
|
||||||
if itemtable then
|
|
||||||
itemname = stack:to_table().name
|
|
||||||
end
|
|
||||||
|
|
||||||
local item_texture = nil
|
|
||||||
local item_type = ""
|
|
||||||
if minetest.registered_items[itemname] then
|
|
||||||
item_texture = minetest.registered_items[itemname].inventory_image
|
|
||||||
item_type = minetest.registered_items[itemname].type
|
|
||||||
end
|
|
||||||
prop = {
|
|
||||||
is_visible = true,
|
is_visible = true,
|
||||||
textures = { node.name },
|
textures = { node.name },
|
||||||
}
|
}
|
||||||
@ -431,14 +415,14 @@ minetest.register_entity("technic:frame_entity", {
|
|||||||
end,
|
end,
|
||||||
|
|
||||||
dig = function(self)
|
dig = function(self)
|
||||||
minetest.handle_node_drops(self.object:getpos(), { ItemStack("technic:frame_111111") }, self.last_puncher)
|
minetest.handle_node_drops(self.object:get_pos(), { ItemStack("technic:frame_111111") }, self.last_puncher)
|
||||||
local pos = vector.round(self.object:getpos())
|
local pos = vector.round(self.object:get_pos())
|
||||||
frames_pos[pos_to_string(pos)] = nil
|
frames_pos[pos_to_string(pos)] = nil
|
||||||
self.object:remove()
|
self.object:remove()
|
||||||
end,
|
end,
|
||||||
|
|
||||||
on_punch = function(self, puncher, time_from_last_punch, tool_capabilities, dir)
|
on_punch = function(self, puncher, time_from_last_punch, tool_capabilities, dir)
|
||||||
local pos = self.object:getpos()
|
local pos = self.object:get_pos()
|
||||||
if self.damage_object == nil then
|
if self.damage_object == nil then
|
||||||
self.damage_object = minetest.add_entity(pos, "technic:damage_entity")
|
self.damage_object = minetest.add_entity(pos, "technic:damage_entity")
|
||||||
self.damage_object:get_luaentity().remaining_time = 0.25
|
self.damage_object:get_luaentity().remaining_time = 0.25
|
||||||
@ -450,7 +434,7 @@ minetest.register_entity("technic:frame_entity", {
|
|||||||
end
|
end
|
||||||
|
|
||||||
self.last_puncher = puncher
|
self.last_puncher = puncher
|
||||||
local ppos = puncher:getpos()
|
local ppos = puncher:get_pos()
|
||||||
local pvect = puncher:get_look_dir()
|
local pvect = puncher:get_look_dir()
|
||||||
local pface = get_face(pos, ppos, pvect)
|
local pface = get_face(pos, ppos, pvect)
|
||||||
if pface == nil then return end
|
if pface == nil then return end
|
||||||
@ -468,8 +452,8 @@ minetest.register_entity("technic:frame_entity", {
|
|||||||
end,
|
end,
|
||||||
|
|
||||||
on_rightclick = function(self, clicker)
|
on_rightclick = function(self, clicker)
|
||||||
local pos = self.object:getpos()
|
local pos = self.object:get_pos()
|
||||||
local ppos = clicker:getpos()
|
local ppos = clicker:get_pos()
|
||||||
local pvect = clicker:get_look_dir()
|
local pvect = clicker:get_look_dir()
|
||||||
local pface = get_face(pos, ppos, pvect)
|
local pface = get_face(pos, ppos, pvect)
|
||||||
|
|
||||||
@ -547,7 +531,7 @@ mesecon.register_on_mvps_move(function(moved_nodes)
|
|||||||
local entity = obj:get_luaentity()
|
local entity = obj:get_luaentity()
|
||||||
if entity and (entity.name == "technic:frame_entity" or
|
if entity and (entity.name == "technic:frame_entity" or
|
||||||
entity.name == "technic:damage_entity") then
|
entity.name == "technic:damage_entity") then
|
||||||
obj:setpos(t.pos)
|
obj:set_pos(t.pos)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -589,7 +573,7 @@ local function connected(pos, c, adj)
|
|||||||
end
|
end
|
||||||
|
|
||||||
local function get_connected_nodes(pos)
|
local function get_connected_nodes(pos)
|
||||||
c = { pos }
|
local c = { pos }
|
||||||
local nodename = minetest.get_node(pos).name
|
local nodename = minetest.get_node(pos).name
|
||||||
if frames_pos[pos_to_string(pos)] then
|
if frames_pos[pos_to_string(pos)] then
|
||||||
nodename = frames_pos[pos_to_string(pos)]
|
nodename = frames_pos[pos_to_string(pos)]
|
||||||
@ -695,7 +679,7 @@ local function swap_template(pos, new)
|
|||||||
local saved_node = meta:get_string("saved_node")
|
local saved_node = meta:get_string("saved_node")
|
||||||
meta:set_string("saved_node", "")
|
meta:set_string("saved_node", "")
|
||||||
technic.swap_node(pos, new)
|
technic.swap_node(pos, new)
|
||||||
local meta = minetest.get_meta(pos)
|
meta = minetest.get_meta(pos)
|
||||||
meta:set_string("saved_node", saved_node)
|
meta:set_string("saved_node", saved_node)
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -857,7 +841,7 @@ minetest.register_node("technic:template_disabled", {
|
|||||||
on_destruct = template_on_destruct,
|
on_destruct = template_on_destruct,
|
||||||
after_dig_node = template_drops,
|
after_dig_node = template_drops,
|
||||||
on_punch = function(pos, node, puncher)
|
on_punch = function(pos, node, puncher)
|
||||||
local meta = minetest.get_meta(pos)
|
local _ = minetest.get_meta(pos)
|
||||||
swap_template(pos, "technic:template_connector")
|
swap_template(pos, "technic:template_connector")
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
@ -979,7 +963,7 @@ minetest.register_craft({
|
|||||||
output = 'technic:frame_111111',
|
output = 'technic:frame_111111',
|
||||||
recipe = {
|
recipe = {
|
||||||
{ '', 'default:stick', '' },
|
{ '', 'default:stick', '' },
|
||||||
{ 'default:stick', 'technic:brass_ingot', 'default:stick' },
|
{ 'default:stick', 'basic_materials:brass_ingot', 'default:stick' },
|
||||||
{ '', 'default:stick', '' },
|
{ '', 'default:stick', '' },
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@ -988,7 +972,7 @@ minetest.register_craft({
|
|||||||
output = 'technic:frame_motor',
|
output = 'technic:frame_motor',
|
||||||
recipe = {
|
recipe = {
|
||||||
{ '', 'technic:frame_111111', '' },
|
{ '', 'technic:frame_111111', '' },
|
||||||
{ 'group:mesecon_conductor_craftable', 'technic:motor', 'group:mesecon_conductor_craftable' },
|
{ 'group:mesecon_conductor_craftable', 'basic_materials:motor', 'group:mesecon_conductor_craftable' },
|
||||||
{ '', 'technic:frame_111111', '' },
|
{ '', 'technic:frame_111111', '' },
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@ -996,9 +980,9 @@ minetest.register_craft({
|
|||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = 'technic:template 10',
|
output = 'technic:template 10',
|
||||||
recipe = {
|
recipe = {
|
||||||
{ '', 'technic:brass_ingot', '' },
|
{ '', 'basic_materials:brass_ingot', '' },
|
||||||
{ 'technic:brass_ingot', 'default:mese_crystal', 'technic:brass_ingot' },
|
{ 'basic_materials:brass_ingot', 'default:mese_crystal', 'basic_materials:brass_ingot' },
|
||||||
{ '', 'technic:brass_ingot', '' },
|
{ '', 'basic_materials:brass_ingot', '' },
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -1016,7 +1000,7 @@ minetest.register_craft({
|
|||||||
output = 'technic:template_motor',
|
output = 'technic:template_motor',
|
||||||
recipe = {
|
recipe = {
|
||||||
{ '', 'technic:template', '' },
|
{ '', 'technic:template', '' },
|
||||||
{ 'group:mesecon_conductor_craftable', 'technic:motor', 'group:mesecon_conductor_craftable' },
|
{ 'group:mesecon_conductor_craftable', 'basic_materials:motor', 'group:mesecon_conductor_craftable' },
|
||||||
{ '', 'technic:template', '' },
|
{ '', 'technic:template', '' },
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -16,7 +16,7 @@ local function inject_items (pos)
|
|||||||
if stack then
|
if stack then
|
||||||
local item0=stack:to_table()
|
local item0=stack:to_table()
|
||||||
if item0 then
|
if item0 then
|
||||||
item0["count"] = "1"
|
item0["count"] = 1
|
||||||
technic.tube_inject_item(pos, pos, vector.new(0, -1, 0), item0)
|
technic.tube_inject_item(pos, pos, vector.new(0, -1, 0), item0)
|
||||||
stack:take_item(1)
|
stack:take_item(1)
|
||||||
inv:set_stack("main", i, stack)
|
inv:set_stack("main", i, stack)
|
||||||
@ -61,6 +61,9 @@ local function set_injector_formspec(meta)
|
|||||||
(is_stack and
|
(is_stack and
|
||||||
"button[0,1;2,1;mode_item;"..S("Stackwise").."]" or
|
"button[0,1;2,1;mode_item;"..S("Stackwise").."]" or
|
||||||
"button[0,1;2,1;mode_stack;"..S("Itemwise").."]")..
|
"button[0,1;2,1;mode_stack;"..S("Itemwise").."]")..
|
||||||
|
(meta:get_int("public") == 1 and
|
||||||
|
"button[2,1;2,1;mode_private;"..S("Public").."]" or
|
||||||
|
"button[2,1;2,1;mode_public;"..S("Private").."]")..
|
||||||
"list[current_name;main;0,2;8,2;]"..
|
"list[current_name;main;0,2;8,2;]"..
|
||||||
"list[current_player;main;0,5;8,4;]"..
|
"list[current_player;main;0,5;8,4;]"..
|
||||||
"listring[]"..
|
"listring[]"..
|
||||||
@ -95,7 +98,7 @@ minetest.register_node("technic:injector", {
|
|||||||
if meta:get_int("splitstacks") == 1 then
|
if meta:get_int("splitstacks") == 1 then
|
||||||
stack = stack:peek_item(1)
|
stack = stack:peek_item(1)
|
||||||
end
|
end
|
||||||
return meta:get_inventory():room_for_item("main", stack)
|
return inv:room_for_item("main", stack)
|
||||||
end,
|
end,
|
||||||
insert_object = function(pos, node, stack, direction)
|
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)
|
||||||
@ -117,10 +120,15 @@ minetest.register_node("technic:injector", {
|
|||||||
return inv:is_empty("main")
|
return inv:is_empty("main")
|
||||||
end,
|
end,
|
||||||
on_receive_fields = function(pos, formanme, fields, sender)
|
on_receive_fields = function(pos, formanme, fields, sender)
|
||||||
|
if minetest.is_protected(pos, sender:get_player_name()) then return end
|
||||||
|
|
||||||
local meta = minetest.get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
if fields.mode_item then meta:set_string("mode", "single items") end
|
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.mode_stack then meta:set_string("mode", "whole stacks") end
|
||||||
|
|
||||||
|
if fields.mode_private then meta:set_int("public", 0) end
|
||||||
|
if fields.mode_public then meta:set_int("public", 1) end
|
||||||
|
|
||||||
if fields["fs_helpers_cycling:0:splitstacks"]
|
if fields["fs_helpers_cycling:0:splitstacks"]
|
||||||
or fields["fs_helpers_cycling:1:splitstacks"] then
|
or fields["fs_helpers_cycling:1:splitstacks"] then
|
||||||
if not pipeworks.may_configure(pos, sender) then return end
|
if not pipeworks.may_configure(pos, sender) then return end
|
||||||
|
@ -1,10 +1,50 @@
|
|||||||
|
|
||||||
local S = technic.getter
|
local S = technic.getter
|
||||||
|
|
||||||
|
function technic.insert_object_unique_stack(pos, node, incoming_stack, direction)
|
||||||
|
local meta = minetest.get_meta(pos)
|
||||||
|
local inv = meta:get_inventory()
|
||||||
|
local incoming_name = incoming_stack:get_name()
|
||||||
|
local stack_index = nil
|
||||||
|
for inv_index, inv_stack in pairs(inv:get_list("src")) do
|
||||||
|
if inv_stack:get_name() == incoming_name then
|
||||||
|
stack_index = inv_index
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if stack_index == nil then
|
||||||
|
return inv:add_item("src", incoming_stack)
|
||||||
|
end
|
||||||
|
local present_stack = inv:get_stack("src", stack_index)
|
||||||
|
local leftover = present_stack:add_item(incoming_stack)
|
||||||
|
inv:set_stack("src", stack_index, present_stack)
|
||||||
|
return leftover
|
||||||
|
end
|
||||||
|
|
||||||
|
function technic.can_insert_unique_stack(pos, node, incoming_stack, direction)
|
||||||
|
local meta = minetest.get_meta(pos)
|
||||||
|
local inv = meta:get_inventory()
|
||||||
|
local incoming_name = incoming_stack:get_name()
|
||||||
|
if meta:get_int("splitstacks") == 0 then
|
||||||
|
-- avoid looping second time with inv:contains_item("src", incoming_stack)
|
||||||
|
for _, inv_stack in pairs(inv:get_list("src")) do
|
||||||
|
if inv_stack:get_name() == incoming_name then
|
||||||
|
return inv_stack:item_fits(incoming_stack)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return technic.default_can_insert(pos, node, incoming_stack, direction)
|
||||||
|
end
|
||||||
|
|
||||||
function technic.register_alloy_furnace(data)
|
function technic.register_alloy_furnace(data)
|
||||||
data.typename = "alloy"
|
data.typename = "alloy"
|
||||||
data.machine_name = "alloy_furnace"
|
data.machine_name = "alloy_furnace"
|
||||||
data.machine_desc = S("%s Alloy Furnace")
|
data.machine_desc = S("%s Alloy Furnace")
|
||||||
|
|
||||||
|
data.insert_object = technic.insert_object_unique_stack
|
||||||
|
data.can_insert = technic.can_insert_unique_stack
|
||||||
|
|
||||||
technic.register_base_machine(data)
|
technic.register_base_machine(data)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -12,22 +12,23 @@ function technic.register_alloy_recipe(data)
|
|||||||
end
|
end
|
||||||
|
|
||||||
local recipes = {
|
local recipes = {
|
||||||
{"technic:copper_dust 3", "technic:tin_dust", "technic:bronze_dust 4"},
|
{"technic:copper_dust 7", "technic:tin_dust", "technic:bronze_dust 8", 12},
|
||||||
{"default:copper_ingot 3", "default:tin_ingot", "default:bronze_ingot 4"},
|
{"default:copper_ingot 7", "default:tin_ingot", "default:bronze_ingot 8", 12},
|
||||||
{"technic:wrought_iron_dust", "technic:coal_dust", "technic:carbon_steel_dust", 3},
|
{"technic:wrought_iron_dust 2", "technic:coal_dust", "technic:carbon_steel_dust 2", 6},
|
||||||
{"technic:wrought_iron_ingot", "technic:coal_dust", "technic:carbon_steel_ingot", 3},
|
{"technic:wrought_iron_ingot 2", "technic:coal_dust", "technic:carbon_steel_ingot 2", 6},
|
||||||
{"technic:carbon_steel_dust", "technic:coal_dust", "technic:cast_iron_dust", 3},
|
{"technic:carbon_steel_dust 2", "technic:coal_dust", "technic:cast_iron_dust 2", 6},
|
||||||
{"technic:carbon_steel_ingot", "technic:coal_dust", "technic:cast_iron_ingot", 3},
|
{"technic:carbon_steel_ingot 2", "technic:coal_dust", "technic:cast_iron_ingot 2", 6},
|
||||||
{"technic:carbon_steel_dust 3", "technic:chromium_dust", "technic:stainless_steel_dust 4"},
|
{"technic:carbon_steel_dust 4", "technic:chromium_dust", "technic:stainless_steel_dust 5", 7.5},
|
||||||
{"technic:carbon_steel_ingot 3", "technic:chromium_ingot", "technic:stainless_steel_ingot 4"},
|
{"technic:carbon_steel_ingot 4", "technic:chromium_ingot", "technic:stainless_steel_ingot 5", 7.5},
|
||||||
{"technic:copper_dust 2", "technic:zinc_dust", "technic:brass_dust 3"},
|
{"technic:copper_dust 2", "technic:zinc_dust", "technic:brass_dust 3"},
|
||||||
{"default:copper_ingot 2", "technic:zinc_ingot", "technic:brass_ingot 3"},
|
{"default:copper_ingot 2", "technic:zinc_ingot", "basic_materials:brass_ingot 3"},
|
||||||
{"default:sand 2", "technic:coal_dust 2", "technic:silicon_wafer"},
|
{"default:sand 2", "technic:coal_dust 2", "technic:silicon_wafer"},
|
||||||
{"technic:silicon_wafer", "technic:gold_dust", "technic:doped_silicon_wafer"},
|
{"technic:silicon_wafer", "technic:gold_dust", "technic:doped_silicon_wafer"},
|
||||||
-- from https://en.wikipedia.org/wiki/Carbon_black
|
-- from https://en.wikipedia.org/wiki/Carbon_black
|
||||||
-- The highest volume use of carbon black is as a reinforcing filler in rubber products, especially tires.
|
-- The highest volume use of carbon black is as a reinforcing filler in rubber products, especially tires.
|
||||||
-- "[Compounding a] pure gum vulcanizate … with 50% of its weight of carbon black improves its tensile strength and wear resistance …"
|
-- "[Compounding a] pure gum vulcanizate … with 50% of its weight of carbon black improves its tensile strength and wear resistance …"
|
||||||
{"technic:raw_latex 4", "technic:coal_dust 2", "technic:rubber 6", 2},
|
{"technic:raw_latex 4", "technic:coal_dust 2", "technic:rubber 6", 2},
|
||||||
|
{"default:ice", "bucket:bucket_empty", "bucket:bucket_water", 1 },
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, data in pairs(recipes) do
|
for _, data in pairs(recipes) do
|
||||||
|
@ -92,7 +92,7 @@ local dirtab = {
|
|||||||
|
|
||||||
local tube = {
|
local tube = {
|
||||||
insert_object = function(pos, node, stack, direction)
|
insert_object = function(pos, node, stack, direction)
|
||||||
print(minetest.pos_to_string(direction), dirtab[direction.x+2+(direction.z+2)*2], node.param2)
|
--print(minetest.pos_to_string(direction), dirtab[direction.x+2+(direction.z+2)*2], node.param2)
|
||||||
if direction.y == 1
|
if direction.y == 1
|
||||||
or (direction.y == 0 and dirtab[direction.x+2+(direction.z+2)*2] == node.param2) then
|
or (direction.y == 0 and dirtab[direction.x+2+(direction.z+2)*2] == node.param2) then
|
||||||
return stack
|
return stack
|
||||||
@ -106,7 +106,7 @@ local tube = {
|
|||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
can_insert = function(pos, node, stack, direction)
|
can_insert = function(pos, node, stack, direction)
|
||||||
print(minetest.pos_to_string(direction), dirtab[direction.x+2+(direction.z+2)*2], node.param2)
|
--print(minetest.pos_to_string(direction), dirtab[direction.x+2+(direction.z+2)*2], node.param2)
|
||||||
if direction.y == 1
|
if direction.y == 1
|
||||||
or (direction.y == 0 and dirtab[direction.x+2+(direction.z+2)*2] == node.param2) then
|
or (direction.y == 0 and dirtab[direction.x+2+(direction.z+2)*2] == node.param2) then
|
||||||
return false
|
return false
|
||||||
@ -129,11 +129,11 @@ local tube = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
local function add_on_off_buttons(meta, ltier, charge_percent)
|
local function add_on_off_buttons(meta, ltier, charge_percent)
|
||||||
local formspec = ""
|
local formspec = "image[1,1;1,2;technic_power_meter_bg.png"
|
||||||
if ltier == "mv" or ltier == "hv" then
|
|
||||||
formspec = "image[1,1;1,2;technic_power_meter_bg.png"
|
|
||||||
.."^[lowpart:"..charge_percent
|
.."^[lowpart:"..charge_percent
|
||||||
..":technic_power_meter_fg.png]"..
|
..":technic_power_meter_fg.png]"
|
||||||
|
if ltier == "mv" or ltier == "hv" then
|
||||||
|
formspec = formspec..
|
||||||
fs_helpers.cycling_button(
|
fs_helpers.cycling_button(
|
||||||
meta,
|
meta,
|
||||||
"image_button[3,2.0;1,0.6",
|
"image_button[3,2.0;1,0.6",
|
||||||
@ -192,10 +192,10 @@ function technic.register_battery_box(data)
|
|||||||
end
|
end
|
||||||
|
|
||||||
local run = function(pos, node)
|
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)
|
||||||
local meta = minetest.get_meta(pos)
|
local network_id = tonumber(meta:get_string(tier.."_network"))
|
||||||
|
|
||||||
if not technic.is_tier_cable(below.name, tier) then
|
if not technic.networks[network_id] then
|
||||||
meta:set_string("infotext", S("%s Battery Box Has No Network"):format(tier))
|
meta:set_string("infotext", S("%s Battery Box Has No Network"):format(tier))
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
@ -304,15 +304,14 @@ function technic.register_battery_box(data)
|
|||||||
drop = "technic:"..ltier.."_battery_box0",
|
drop = "technic:"..ltier.."_battery_box0",
|
||||||
on_construct = function(pos)
|
on_construct = function(pos)
|
||||||
local meta = minetest.get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
local EU_upgrade, tube_upgrade = 0, 0
|
local EU_upgrade, _ = 0
|
||||||
if data.upgrade then
|
if data.upgrade then
|
||||||
EU_upgrade, tube_upgrade = technic.handle_machine_upgrades(meta)
|
EU_upgrade, _ = technic.handle_machine_upgrades(meta)
|
||||||
end
|
end
|
||||||
local max_charge = data.max_charge * (1 + EU_upgrade / 10)
|
local max_charge = data.max_charge * (1 + EU_upgrade / 10)
|
||||||
local charge = meta:get_int("internal_EU_charge")
|
local charge = meta:get_int("internal_EU_charge")
|
||||||
local cpercent = math.floor(charge / max_charge * 100)
|
local cpercent = math.floor(charge / max_charge * 100)
|
||||||
local inv = meta:get_inventory()
|
local inv = meta:get_inventory()
|
||||||
local node = minetest.get_node(pos)
|
|
||||||
meta:set_string("infotext", S("%s Battery Box"):format(tier))
|
meta:set_string("infotext", S("%s Battery Box"):format(tier))
|
||||||
meta:set_string("formspec", formspec..add_on_off_buttons(meta, ltier, cpercent))
|
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_string("channel", ltier.."_battery_box"..minetest.pos_to_string(pos))
|
||||||
@ -335,7 +334,6 @@ function technic.register_battery_box(data)
|
|||||||
after_dig_node = technic.machine_after_dig_node,
|
after_dig_node = technic.machine_after_dig_node,
|
||||||
on_receive_fields = function(pos, formname, fields, sender)
|
on_receive_fields = function(pos, formname, fields, sender)
|
||||||
local meta = minetest.get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
local nodename = minetest.get_node(pos).name
|
|
||||||
if fields.edit_channel then
|
if fields.edit_channel then
|
||||||
minetest.show_formspec(sender:get_player_name(),
|
minetest.show_formspec(sender:get_player_name(),
|
||||||
"technic:battery_box_edit_channel"..minetest.pos_to_string(pos),
|
"technic:battery_box_edit_channel"..minetest.pos_to_string(pos),
|
||||||
@ -344,12 +342,12 @@ function technic.register_battery_box(data)
|
|||||||
or fields["fs_helpers_cycling:0:split_dst_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_src_stacks"]
|
||||||
or fields["fs_helpers_cycling:1:split_dst_stacks"] then
|
or fields["fs_helpers_cycling:1:split_dst_stacks"] then
|
||||||
local meta = minetest.get_meta(pos)
|
meta = minetest.get_meta(pos)
|
||||||
if not pipeworks.may_configure(pos, sender) then return end
|
if not pipeworks.may_configure(pos, sender) then return end
|
||||||
fs_helpers.on_receive_fields(pos, fields)
|
fs_helpers.on_receive_fields(pos, fields)
|
||||||
local EU_upgrade, tube_upgrade = 0, 0
|
local EU_upgrade, _ = 0
|
||||||
if data.upgrade then
|
if data.upgrade then
|
||||||
EU_upgrade, tube_upgrade = technic.handle_machine_upgrades(meta)
|
EU_upgrade, _ = technic.handle_machine_upgrades(meta)
|
||||||
end
|
end
|
||||||
local max_charge = data.max_charge * (1 + EU_upgrade / 10)
|
local max_charge = data.max_charge * (1 + EU_upgrade / 10)
|
||||||
local charge = meta:get_int("internal_EU_charge")
|
local charge = meta:get_int("internal_EU_charge")
|
||||||
@ -411,6 +409,25 @@ minetest.register_on_player_receive_fields(
|
|||||||
end
|
end
|
||||||
)
|
)
|
||||||
|
|
||||||
|
function technic.get_charge(itemstack)
|
||||||
|
-- check if is chargable
|
||||||
|
local tool_name = itemstack:get_name()
|
||||||
|
if not technic.power_tools[tool_name] then
|
||||||
|
return 0, 0
|
||||||
|
end
|
||||||
|
local item_meta = technic.get_stack_meta(itemstack)
|
||||||
|
return item_meta:get_int("technic:charge"), technic.power_tools[tool_name]
|
||||||
|
end
|
||||||
|
|
||||||
|
function technic.set_charge(itemstack, charge)
|
||||||
|
local tool_name = itemstack:get_name()
|
||||||
|
if technic.power_tools[tool_name] then
|
||||||
|
technic.set_RE_wear(itemstack, charge, technic.power_tools[tool_name])
|
||||||
|
end
|
||||||
|
local item_meta = technic.get_stack_meta(itemstack)
|
||||||
|
item_meta:set_int("technic:charge", charge)
|
||||||
|
end
|
||||||
|
|
||||||
function technic.charge_tools(meta, batt_charge, charge_step)
|
function technic.charge_tools(meta, batt_charge, charge_step)
|
||||||
local inv = meta:get_inventory()
|
local inv = meta:get_inventory()
|
||||||
if inv:is_empty("src") then
|
if inv:is_empty("src") then
|
||||||
@ -418,18 +435,18 @@ function technic.charge_tools(meta, batt_charge, charge_step)
|
|||||||
end
|
end
|
||||||
local src_stack = inv:get_stack("src", 1)
|
local src_stack = inv:get_stack("src", 1)
|
||||||
|
|
||||||
local tool_name = src_stack:get_name()
|
-- get callbacks
|
||||||
if not technic.power_tools[tool_name] then
|
local src_def = src_stack:get_definition()
|
||||||
|
local technic_get_charge = src_def.technic_get_charge or technic.get_charge
|
||||||
|
local technic_set_charge = src_def.technic_set_charge or technic.set_charge
|
||||||
|
|
||||||
|
-- get tool charge
|
||||||
|
local tool_charge, item_max_charge = technic_get_charge(src_stack)
|
||||||
|
if item_max_charge==0 then
|
||||||
return batt_charge, false
|
return batt_charge, false
|
||||||
end
|
end
|
||||||
-- Set meta data for the tool if it didn't do it itself
|
|
||||||
local src_meta = minetest.deserialize(src_stack:get_metadata()) or {}
|
|
||||||
if not src_meta.charge then
|
|
||||||
src_meta.charge = 0
|
|
||||||
end
|
|
||||||
-- Do the charging
|
-- Do the charging
|
||||||
local item_max_charge = technic.power_tools[tool_name]
|
|
||||||
local tool_charge = src_meta.charge
|
|
||||||
if tool_charge >= item_max_charge then
|
if tool_charge >= item_max_charge then
|
||||||
return batt_charge, true
|
return batt_charge, true
|
||||||
elseif batt_charge <= 0 then
|
elseif batt_charge <= 0 then
|
||||||
@ -439,9 +456,7 @@ function technic.charge_tools(meta, batt_charge, charge_step)
|
|||||||
charge_step = math.min(charge_step, item_max_charge - tool_charge)
|
charge_step = math.min(charge_step, item_max_charge - tool_charge)
|
||||||
tool_charge = tool_charge + charge_step
|
tool_charge = tool_charge + charge_step
|
||||||
batt_charge = batt_charge - charge_step
|
batt_charge = batt_charge - charge_step
|
||||||
technic.set_RE_wear(src_stack, tool_charge, item_max_charge)
|
technic_set_charge(src_stack, tool_charge)
|
||||||
src_meta.charge = tool_charge
|
|
||||||
src_stack:set_metadata(minetest.serialize(src_meta))
|
|
||||||
inv:set_stack("src", 1, src_stack)
|
inv:set_stack("src", 1, src_stack)
|
||||||
return batt_charge, (tool_charge == item_max_charge)
|
return batt_charge, (tool_charge == item_max_charge)
|
||||||
end
|
end
|
||||||
@ -452,21 +467,20 @@ function technic.discharge_tools(meta, batt_charge, charge_step, max_charge)
|
|||||||
if inv:is_empty("dst") then
|
if inv:is_empty("dst") then
|
||||||
return batt_charge, false
|
return batt_charge, false
|
||||||
end
|
end
|
||||||
srcstack = inv:get_stack("dst", 1)
|
local src_stack = inv:get_stack("dst", 1)
|
||||||
local toolname = srcstack:get_name()
|
|
||||||
if technic.power_tools[toolname] == nil then
|
-- get callbacks
|
||||||
|
local src_def = src_stack:get_definition()
|
||||||
|
local technic_get_charge = src_def.technic_get_charge or technic.get_charge
|
||||||
|
local technic_set_charge = src_def.technic_set_charge or technic.set_charge
|
||||||
|
|
||||||
|
-- get tool charge
|
||||||
|
local tool_charge, item_max_charge = technic_get_charge(src_stack)
|
||||||
|
if item_max_charge==0 then
|
||||||
return batt_charge, false
|
return batt_charge, false
|
||||||
end
|
end
|
||||||
-- Set meta data for the tool if it didn't do it itself :-(
|
|
||||||
local src_meta = minetest.deserialize(srcstack:get_metadata())
|
|
||||||
src_meta = src_meta or {}
|
|
||||||
if not src_meta.charge then
|
|
||||||
src_meta.charge = 0
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Do the discharging
|
-- Do the discharging
|
||||||
local item_max_charge = technic.power_tools[toolname]
|
|
||||||
local tool_charge = src_meta.charge
|
|
||||||
if tool_charge <= 0 then
|
if tool_charge <= 0 then
|
||||||
return batt_charge, true
|
return batt_charge, true
|
||||||
elseif batt_charge >= max_charge then
|
elseif batt_charge >= max_charge then
|
||||||
@ -476,10 +490,8 @@ function technic.discharge_tools(meta, batt_charge, charge_step, max_charge)
|
|||||||
charge_step = math.min(charge_step, tool_charge)
|
charge_step = math.min(charge_step, tool_charge)
|
||||||
tool_charge = tool_charge - charge_step
|
tool_charge = tool_charge - charge_step
|
||||||
batt_charge = batt_charge + charge_step
|
batt_charge = batt_charge + charge_step
|
||||||
technic.set_RE_wear(srcstack, tool_charge, item_max_charge)
|
technic_set_charge(src_stack, tool_charge)
|
||||||
src_meta.charge = tool_charge
|
inv:set_stack("dst", 1, src_stack)
|
||||||
srcstack:set_metadata(minetest.serialize(src_meta))
|
|
||||||
inv:set_stack("dst", 1, srcstack)
|
|
||||||
return batt_charge, (tool_charge == 0)
|
return batt_charge, (tool_charge == 0)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -11,6 +11,13 @@ function technic.get_cable_tier(name)
|
|||||||
return cable_tier[name]
|
return cable_tier[name]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function technic.register_cable_tier(name, tier)
|
||||||
|
assert(technic.machines[tier], "Tier does not exist")
|
||||||
|
assert(type(name) == "string", "Invalid node name")
|
||||||
|
|
||||||
|
cable_tier[name] = tier
|
||||||
|
end
|
||||||
|
|
||||||
local function check_connections(pos)
|
local function check_connections(pos)
|
||||||
-- Build a table of all machines
|
-- Build a table of all machines
|
||||||
local machines = {}
|
local machines = {}
|
||||||
@ -36,85 +43,120 @@ local function check_connections(pos)
|
|||||||
return connections
|
return connections
|
||||||
end
|
end
|
||||||
|
|
||||||
local function clear_networks(pos)
|
local clear_networks
|
||||||
|
|
||||||
|
local function clear_network(network_id)
|
||||||
|
if not network_id then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
for _,v in pairs(technic.networks[network_id].all_nodes) do
|
||||||
|
local pos1 = minetest.hash_node_position(v)
|
||||||
|
technic.cables[pos1] = nil
|
||||||
|
end
|
||||||
|
local network_bckup = technic.networks[network_id]
|
||||||
|
technic.networks[network_id] = nil
|
||||||
|
|
||||||
|
for _,n_pos in pairs(network_bckup.PR_nodes) do
|
||||||
|
clear_networks(n_pos)
|
||||||
|
end
|
||||||
|
for _,n_pos in pairs(network_bckup.RE_nodes) do
|
||||||
|
clear_networks(n_pos)
|
||||||
|
end
|
||||||
|
for _,n_pos in pairs(network_bckup.BA_nodes) do
|
||||||
|
clear_networks(n_pos)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
clear_networks = function(pos)
|
||||||
local node = minetest.get_node(pos)
|
local node = minetest.get_node(pos)
|
||||||
local meta = minetest.get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
local placed = node.name ~= "air"
|
local placed = node.name ~= "air"
|
||||||
local positions = check_connections(pos)
|
local positions = check_connections(pos)
|
||||||
|
|
||||||
if #positions < 1 then return end
|
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
|
if #positions == 1 then
|
||||||
-- This is similar to check_node_subp
|
if 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 network = technic.networks[network_id]
|
||||||
|
local tier = network.tier
|
||||||
|
|
||||||
|
-- Actually add it to the (cached) network
|
||||||
|
-- !! IMPORTANT: ../switching_station.lua -> check_node_subp() must be kept in sync
|
||||||
|
if technic.is_tier_cable(node.name, tier) then
|
||||||
technic.cables[minetest.hash_node_position(pos)] = network_id
|
technic.cables[minetest.hash_node_position(pos)] = network_id
|
||||||
pos.visited = 1
|
table.insert(network.all_nodes,pos)
|
||||||
if technic.is_tier_cable(name, tier) then
|
elseif technic.machines[tier][node.name] then
|
||||||
table.insert(network.all_nodes,pos)
|
-- Found a machine
|
||||||
elseif technic.machines[tier][node.name] then
|
local eu_type = technic.machines[tier][node.name]
|
||||||
meta:set_string(tier.."_network",minetest.pos_to_string(sw_pos))
|
meta:set_string(tier.."_network", string.format("%.20g", network_id))
|
||||||
if technic.machines[tier][node.name] == technic.producer then
|
meta:set_int(tier.."_EU_timeout", 2)
|
||||||
table.insert(network.PR_nodes,pos)
|
if eu_type == technic.producer then
|
||||||
elseif technic.machines[tier][node.name] == technic.receiver then
|
table.insert(network.PR_nodes, pos)
|
||||||
table.insert(network.RE_nodes,pos)
|
elseif eu_type == technic.receiver then
|
||||||
elseif technic.machines[tier][node.name] == technic.producer_receiver then
|
table.insert(network.RE_nodes, pos)
|
||||||
table.insert(network.PR_nodes,pos)
|
elseif eu_type == technic.producer_receiver then
|
||||||
table.insert(network.RE_nodes,pos)
|
table.insert(network.PR_nodes, pos)
|
||||||
elseif technic.machines[tier][node.name] == "SPECIAL" and
|
table.insert(network.RE_nodes, pos)
|
||||||
(pos.x ~= sw_pos.x or pos.y ~= sw_pos.y or pos.z ~= sw_pos.z) and
|
elseif eu_type == technic.battery then
|
||||||
from_below then
|
table.insert(network.BA_nodes, pos)
|
||||||
table.insert(network.SP_nodes,pos)
|
|
||||||
elseif technic.machines[tier][node.name] == technic.battery then
|
|
||||||
table.insert(network.BA_nodes,pos)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
elseif dead_end and not placed then
|
-- Note: SPECIAL (i.e. switching station) is not traversed!
|
||||||
-- Dead end removed, remove it from the network
|
end
|
||||||
-- Get the network
|
else
|
||||||
local network_id = technic.cables[minetest.hash_node_position(positions[1])]
|
-- Dead end removed, remove it from the network
|
||||||
if not network_id then
|
-- Get the network
|
||||||
-- We're evidently not on a network, nothing to add ourselves to
|
local network_id = technic.cables[minetest.hash_node_position(positions[1])]
|
||||||
return
|
if not network_id then
|
||||||
end
|
-- We're evidently not on a network, nothing to add ourselves to
|
||||||
local network = technic.networks[network_id]
|
return
|
||||||
|
end
|
||||||
|
local network = technic.networks[network_id]
|
||||||
|
|
||||||
-- Search for and remove machine
|
-- Search for and remove machine
|
||||||
technic.cables[minetest.hash_node_position(pos)] = nil
|
technic.cables[minetest.hash_node_position(pos)] = nil
|
||||||
for tblname,table in pairs(network) do
|
for tblname,table in pairs(network) do
|
||||||
if tblname ~= "tier" then
|
if tblname ~= "tier" then
|
||||||
for machinenum,machine in pairs(table) do
|
for machinenum,machine in pairs(table) do
|
||||||
if machine.x == pos.x
|
if machine.x == pos.x
|
||||||
and machine.y == pos.y
|
and machine.y == pos.y
|
||||||
and machine.z == pos.z then
|
and machine.z == pos.z then
|
||||||
table[machinenum] = nil
|
table[machinenum] = nil
|
||||||
end
|
|
||||||
end
|
end
|
||||||
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
|
||||||
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
clear_network(technic.cables[minetest.hash_node_position(pos)])
|
||||||
|
|
||||||
|
for _,connected_pos in pairs(positions) do
|
||||||
|
local network_id = technic.cables[minetest.hash_node_position(connected_pos)]
|
||||||
|
-- Not a dead end, so the whole network needs to be recalculated
|
||||||
|
clear_network(network_id)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local function item_place_override_node(itemstack, placer, pointed, node)
|
||||||
|
-- Call the default on_place function with a fake itemstack
|
||||||
|
local temp_itemstack = ItemStack(itemstack)
|
||||||
|
temp_itemstack:set_name(node.name)
|
||||||
|
local original_count = temp_itemstack:get_count()
|
||||||
|
temp_itemstack =
|
||||||
|
minetest.item_place(temp_itemstack, placer, pointed, node.param2) or
|
||||||
|
temp_itemstack
|
||||||
|
-- Remove the same number of items from the real itemstack
|
||||||
|
itemstack:take_item(original_count - temp_itemstack:get_count())
|
||||||
|
return itemstack
|
||||||
end
|
end
|
||||||
|
|
||||||
function technic.register_cable(tier, size)
|
function technic.register_cable(tier, size)
|
||||||
@ -150,7 +192,7 @@ function technic.register_cable(tier, size)
|
|||||||
connects_to = {"group:technic_"..ltier.."_cable",
|
connects_to = {"group:technic_"..ltier.."_cable",
|
||||||
"group:technic_"..ltier, "group:technic_all_tiers"},
|
"group:technic_"..ltier, "group:technic_all_tiers"},
|
||||||
on_construct = clear_networks,
|
on_construct = clear_networks,
|
||||||
on_destruct = clear_networks,
|
after_destruct = clear_networks,
|
||||||
})
|
})
|
||||||
|
|
||||||
local xyz = {
|
local xyz = {
|
||||||
@ -190,7 +232,7 @@ function technic.register_cable(tier, size)
|
|||||||
connects_to = {"group:technic_"..ltier.."_cable",
|
connects_to = {"group:technic_"..ltier.."_cable",
|
||||||
"group:technic_"..ltier, "group:technic_all_tiers"},
|
"group:technic_"..ltier, "group:technic_all_tiers"},
|
||||||
on_construct = clear_networks,
|
on_construct = clear_networks,
|
||||||
on_destruct = clear_networks,
|
after_destruct = clear_networks,
|
||||||
}
|
}
|
||||||
def.node_box.fixed = {
|
def.node_box.fixed = {
|
||||||
{-size, -size, -size, size, size, size},
|
{-size, -size, -size, size, size, size},
|
||||||
@ -202,7 +244,7 @@ function technic.register_cable(tier, size)
|
|||||||
if i == 1 then
|
if i == 1 then
|
||||||
def.on_place = function(itemstack, placer, pointed_thing)
|
def.on_place = function(itemstack, placer, pointed_thing)
|
||||||
local pointed_thing_diff = vector.subtract(pointed_thing.above, pointed_thing.under)
|
local pointed_thing_diff = vector.subtract(pointed_thing.above, pointed_thing.under)
|
||||||
local num
|
local num = 1
|
||||||
local changed
|
local changed
|
||||||
for k, v in pairs(pointed_thing_diff) do
|
for k, v in pairs(pointed_thing_diff) do
|
||||||
if v ~= 0 then
|
if v ~= 0 then
|
||||||
@ -212,7 +254,7 @@ function technic.register_cable(tier, size)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
local crtl = placer:get_player_control()
|
local crtl = placer:get_player_control()
|
||||||
if (crtl.aux1 or crtl.sneak) and not (crtl.aux1 and crtl.sneak) then
|
if (crtl.aux1 or crtl.sneak) and not (crtl.aux1 and crtl.sneak) and changed then
|
||||||
local fine_pointed = minetest.pointed_thing_to_face_pos(placer, pointed_thing)
|
local fine_pointed = minetest.pointed_thing_to_face_pos(placer, pointed_thing)
|
||||||
fine_pointed = vector.subtract(fine_pointed, pointed_thing.above)
|
fine_pointed = vector.subtract(fine_pointed, pointed_thing.above)
|
||||||
fine_pointed[changed] = nil
|
fine_pointed[changed] = nil
|
||||||
@ -228,11 +270,10 @@ function technic.register_cable(tier, size)
|
|||||||
num = xyz[((fine_pointed[bigger] < 0 and "-") or "") .. bigger]
|
num = xyz[((fine_pointed[bigger] < 0 and "-") or "") .. bigger]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
minetest.set_node(pointed_thing.above, {name = "technic:"..ltier.."_cable_plate_"..num})
|
return item_place_override_node(
|
||||||
if not (creative and creative.is_enabled_for(placer)) then
|
itemstack, placer, pointed_thing,
|
||||||
itemstack:take_item()
|
{name = "technic:"..ltier.."_cable_plate_"..num}
|
||||||
end
|
)
|
||||||
return itemstack
|
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
def.groups.not_in_creative_inventory = 1
|
def.groups.not_in_creative_inventory = 1
|
||||||
|
@ -11,8 +11,8 @@ function technic.register_separating_recipe(data)
|
|||||||
end
|
end
|
||||||
|
|
||||||
local recipes = {
|
local recipes = {
|
||||||
{ "technic:bronze_dust 4", "technic:copper_dust 3", "technic:tin_dust" },
|
{ "technic:bronze_dust 8", "technic:copper_dust 7", "technic:tin_dust" },
|
||||||
{ "technic:stainless_steel_dust 4", "technic:wrought_iron_dust 3", "technic:chromium_dust" },
|
{ "technic:stainless_steel_dust 5", "technic:wrought_iron_dust 4", "technic:chromium_dust" },
|
||||||
{ "technic:brass_dust 3", "technic:copper_dust 2", "technic:zinc_dust" },
|
{ "technic:brass_dust 3", "technic:copper_dust 2", "technic:zinc_dust" },
|
||||||
{ "technic:chernobylite_dust", "default:sand", "technic:uranium3_dust" },
|
{ "technic:chernobylite_dust", "default:sand", "technic:uranium3_dust" },
|
||||||
{ "default:dirt 4", "default:sand", "default:gravel", "default:clay_lump 2" },
|
{ "default:dirt 4", "default:sand", "default:gravel", "default:clay_lump 2" },
|
||||||
|
@ -74,7 +74,7 @@ function technic.send_items(pos, x_velocity, z_velocity, output_name)
|
|||||||
if stack then
|
if stack then
|
||||||
local item0 = stack:to_table()
|
local item0 = stack:to_table()
|
||||||
if item0 then
|
if item0 then
|
||||||
item0["count"] = "1"
|
item0["count"] = 1
|
||||||
technic.tube_inject_item(pos, pos, vector.new(x_velocity, 0, z_velocity), item0)
|
technic.tube_inject_item(pos, pos, vector.new(x_velocity, 0, z_velocity), item0)
|
||||||
stack:take_item(1)
|
stack:take_item(1)
|
||||||
inv:set_stack(output_name, i, stack)
|
inv:set_stack(output_name, i, stack)
|
||||||
@ -84,7 +84,6 @@ function technic.send_items(pos, x_velocity, z_velocity, output_name)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
function technic.smelt_item(meta, result, speed)
|
function technic.smelt_item(meta, result, speed)
|
||||||
local inv = meta:get_inventory()
|
local inv = meta:get_inventory()
|
||||||
meta:set_int("cook_time", meta:get_int("cook_time") + 1)
|
meta:set_int("cook_time", meta:get_int("cook_time") + 1)
|
||||||
@ -112,7 +111,6 @@ function technic.handle_machine_pipeworks(pos, tube_upgrade, send_function)
|
|||||||
|
|
||||||
local node = minetest.get_node(pos)
|
local node = minetest.get_node(pos)
|
||||||
local meta = minetest.get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
local inv = meta:get_inventory()
|
|
||||||
local pos1 = vector.new(pos)
|
local pos1 = vector.new(pos)
|
||||||
local x_velocity = 0
|
local x_velocity = 0
|
||||||
local z_velocity = 0
|
local z_velocity = 0
|
||||||
|
@ -8,9 +8,76 @@ function technic.register_compressor_recipe(data)
|
|||||||
technic.register_recipe("compressing", data)
|
technic.register_recipe("compressing", data)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Defuse the default recipes, since we have
|
||||||
|
-- the compressor to take over in a more realistic manner.
|
||||||
|
local crafts_to_clear = {
|
||||||
|
"default:desert_sand",
|
||||||
|
"default:sand",
|
||||||
|
"default:silver_sand",
|
||||||
|
}
|
||||||
|
|
||||||
|
local dependent_crafts_to_clear = {
|
||||||
|
everness = {
|
||||||
|
"everness:coral_sand",
|
||||||
|
"everness:coral_forest_deep_ocean_sand",
|
||||||
|
"everness:coral_white_sand",
|
||||||
|
"everness:crystal_sand",
|
||||||
|
"everness:cursed_sand",
|
||||||
|
"everness:cursed_lands_deep_ocean_sand",
|
||||||
|
"everness:crystal_forest_deep_ocean_sand",
|
||||||
|
"everness:mineral_sand",
|
||||||
|
},
|
||||||
|
nether = {
|
||||||
|
"nether:brick",
|
||||||
|
"nether:brick_compressed",
|
||||||
|
"nether:rack",
|
||||||
|
"nether:rack_deep",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
-- Add dependent recipes to main collection of
|
||||||
|
-- recipes to be cleared if their mods are used.
|
||||||
|
for dependency, crafts in pairs(dependent_crafts_to_clear) do
|
||||||
|
if minetest.get_modpath(dependency) then
|
||||||
|
for _, craft_entry in ipairs(crafts) do
|
||||||
|
table.insert(crafts_to_clear, craft_entry)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Clear recipes
|
||||||
|
for _, craft_name in ipairs(crafts_to_clear) do
|
||||||
|
-- Regular bricks are 2x2 shaped, nether bricks are 3x3 shaped (irregular)
|
||||||
|
local is_regular = string.sub(craft_name, 1, 12) ~= "nether:brick"
|
||||||
|
local shaped_recipe
|
||||||
|
|
||||||
|
if is_regular then
|
||||||
|
shaped_recipe = {
|
||||||
|
{craft_name, craft_name},
|
||||||
|
{craft_name, craft_name},
|
||||||
|
}
|
||||||
|
else
|
||||||
|
shaped_recipe = {
|
||||||
|
{craft_name, craft_name, craft_name},
|
||||||
|
{craft_name, craft_name, craft_name},
|
||||||
|
{craft_name, craft_name, craft_name},
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
minetest.clear_craft({
|
||||||
|
type = "shaped",
|
||||||
|
recipe = shaped_recipe,
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Compile compressor recipes
|
||||||
|
--
|
||||||
local recipes = {
|
local recipes = {
|
||||||
{"default:snowblock", "default:ice"},
|
{"default:snowblock", "default:ice"},
|
||||||
{"default:sand 2", "default:sandstone"},
|
{"default:sand 2", "default:sandstone"},
|
||||||
|
{"default:desert_sand 2", "default:desert_sandstone"},
|
||||||
|
{"default:silver_sand 2", "default:silver_sandstone"},
|
||||||
{"default:desert_sand", "default:desert_stone"},
|
{"default:desert_sand", "default:desert_stone"},
|
||||||
{"technic:mixed_metal_ingot", "technic:composite_plate"},
|
{"technic:mixed_metal_ingot", "technic:composite_plate"},
|
||||||
{"default:copper_ingot 5", "technic:copper_plate"},
|
{"default:copper_ingot 5", "technic:copper_plate"},
|
||||||
@ -19,16 +86,36 @@ local recipes = {
|
|||||||
{"technic:uranium35_ingot 5", "technic:uranium_fuel"},
|
{"technic:uranium35_ingot 5", "technic:uranium_fuel"},
|
||||||
}
|
}
|
||||||
|
|
||||||
-- defuse the default sandstone recipe, since we have the compressor to take over in a more realistic manner
|
local dependent_recipes = {
|
||||||
minetest.clear_craft({
|
everness = {
|
||||||
output = "default:sandstone",
|
{"everness:coral_deep_ocean_sand 2", "everness:coral_deep_ocean_sandstone_block"},
|
||||||
recipe = {
|
{"everness:coral_sand 2", "everness:coral_sandstone"},
|
||||||
{'group:sand', 'group:sand'},
|
{"everness:coral_white_sand 2", "everness:coral_white_sandstone"},
|
||||||
{'group:sand', 'group:sand'}
|
{"everness:crystal_forest_deep_ocean_sand 2", "everness:crystal_forest_deep_ocean_sandstone_block"},
|
||||||
|
{"everness:crystal_sand 2", "everness:crystal_sandstone"},
|
||||||
|
{"everness:cursed_lands_deep_ocean_sand 2", "everness:cursed_lands_deep_ocean_sandstone_block"},
|
||||||
|
{"everness:cursed_sand 2", "everness:cursed_sandstone_block"},
|
||||||
|
{"everness:mineral_sand 2", "everness:mineral_sandstone"},
|
||||||
},
|
},
|
||||||
})
|
nether = {
|
||||||
|
{"nether:brick 9", "nether:brick_compressed"},
|
||||||
|
{"nether:brick_compressed 9", "nether:nether_lump"},
|
||||||
|
{"nether:rack", "nether:brick",},
|
||||||
|
{"nether:rack_deep", "nether:brick_deep"},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
-- Add dependent recipes to main recipe collection
|
||||||
|
-- if their mods are used.
|
||||||
|
for dependency, recipes_to_add in pairs(dependent_recipes) do
|
||||||
|
if minetest.get_modpath(dependency) then
|
||||||
|
for _, recipe_entry in ipairs(recipes_to_add) do
|
||||||
|
table.insert(recipes, recipe_entry)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Register compressor recipes
|
||||||
for _, data in pairs(recipes) do
|
for _, data in pairs(recipes) do
|
||||||
technic.register_compressor_recipe({input = {data[1]}, output = data[2]})
|
technic.register_compressor_recipe({input = {data[1]}, output = data[2]})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -15,6 +15,7 @@ if minetest.get_modpath("dye") then
|
|||||||
-- register recipes with the same crafting ratios as `dye` provides
|
-- register recipes with the same crafting ratios as `dye` provides
|
||||||
local dye_recipes = {
|
local dye_recipes = {
|
||||||
{"technic:coal_dust", "dye:black 2"},
|
{"technic:coal_dust", "dye:black 2"},
|
||||||
|
{"default:blueberries", "dye:violet 2"},
|
||||||
{"default:grass_1", "dye:green 1"},
|
{"default:grass_1", "dye:green 1"},
|
||||||
{"default:dry_shrub", "dye:brown 1"},
|
{"default:dry_shrub", "dye:brown 1"},
|
||||||
{"default:junglegrass", "dye:green 2"},
|
{"default:junglegrass", "dye:green 2"},
|
||||||
@ -36,13 +37,21 @@ if minetest.get_modpath("dye") then
|
|||||||
-- overwrite the existing crafting recipes
|
-- overwrite the existing crafting recipes
|
||||||
local dyes = {"white", "red", "yellow", "blue", "violet", "orange"}
|
local dyes = {"white", "red", "yellow", "blue", "violet", "orange"}
|
||||||
for _, color in ipairs(dyes) do
|
for _, color in ipairs(dyes) do
|
||||||
minetest.register_craft({
|
minetest.clear_craft({
|
||||||
type = "shapeless",
|
type = "shapeless",
|
||||||
output = "dye:"..color.." 1",
|
recipe = {"group:flower,color_"..color},
|
||||||
recipe = {"group:flower,color_"..color},
|
})
|
||||||
|
minetest.register_craft({
|
||||||
|
type = "shapeless",
|
||||||
|
output = "dye:"..color.." 1",
|
||||||
|
recipe = {"group:flower,color_"..color},
|
||||||
})
|
})
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
minetest.clear_craft({
|
||||||
|
type = "shapeless",
|
||||||
|
recipe = {"group:coal"},
|
||||||
|
})
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
type = "shapeless",
|
type = "shapeless",
|
||||||
output = "dye:black 1",
|
output = "dye:black 1",
|
||||||
@ -50,6 +59,10 @@ if minetest.get_modpath("dye") then
|
|||||||
})
|
})
|
||||||
|
|
||||||
if unifieddyes then
|
if unifieddyes then
|
||||||
|
minetest.clear_craft({
|
||||||
|
type = "shapeless",
|
||||||
|
recipe = {"default:cactus"},
|
||||||
|
})
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
type = "shapeless",
|
type = "shapeless",
|
||||||
output = "dye:green 1",
|
output = "dye:green 1",
|
||||||
|
9
technic/machines/register/freezer.lua
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
|
||||||
|
local S = technic.getter
|
||||||
|
|
||||||
|
function technic.register_freezer(data)
|
||||||
|
data.typename = "freezing"
|
||||||
|
data.machine_name = "freezer"
|
||||||
|
data.machine_desc = S("%s Freezer")
|
||||||
|
technic.register_base_machine(data)
|
||||||
|
end
|
21
technic/machines/register/freezer_recipes.lua
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
|
||||||
|
local S = technic.getter
|
||||||
|
|
||||||
|
technic.register_recipe_type("freezing", { description = S("Freezing") })
|
||||||
|
|
||||||
|
function technic.register_freezer_recipe(data)
|
||||||
|
data.time = data.time or 5
|
||||||
|
technic.register_recipe("freezing", data)
|
||||||
|
end
|
||||||
|
|
||||||
|
local recipes = {
|
||||||
|
{"bucket:bucket_water", { "default:ice", "bucket:bucket_empty" } },
|
||||||
|
{"bucket:bucket_river_water", { "default:ice", "bucket:bucket_empty" } },
|
||||||
|
{"default:dirt", "default:dirt_with_snow" },
|
||||||
|
{"bucket:bucket_lava", { "default:obsidian", "bucket:bucket_empty" } }
|
||||||
|
}
|
||||||
|
|
||||||
|
for _, data in pairs(recipes) do
|
||||||
|
technic.register_freezer_recipe({input = {data[1]}, output = data[2]})
|
||||||
|
end
|
||||||
|
|
@ -162,7 +162,6 @@ function technic.register_generator(data)
|
|||||||
fs_helpers.on_receive_fields(pos, fields)
|
fs_helpers.on_receive_fields(pos, fields)
|
||||||
local meta = minetest.get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
local node = minetest.get_node(pos)
|
local node = minetest.get_node(pos)
|
||||||
local form = generator_formspec
|
|
||||||
local form_buttons = ""
|
local form_buttons = ""
|
||||||
if not string.find(node.name, ":lv_") then
|
if not string.find(node.name, ":lv_") then
|
||||||
form_buttons = fs_helpers.cycling_button(
|
form_buttons = fs_helpers.cycling_button(
|
||||||
@ -204,8 +203,8 @@ function technic.register_generator(data)
|
|||||||
technic_run = run,
|
technic_run = run,
|
||||||
technic_on_disable = function(pos, node)
|
technic_on_disable = function(pos, node)
|
||||||
local timer = minetest.get_node_timer(pos)
|
local timer = minetest.get_node_timer(pos)
|
||||||
timer:start(1)
|
timer:start(1)
|
||||||
end,
|
end,
|
||||||
on_timer = function(pos, node)
|
on_timer = function(pos, node)
|
||||||
local meta = minetest.get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
local node = minetest.get_node(pos)
|
local node = minetest.get_node(pos)
|
||||||
|
@ -23,46 +23,86 @@ local recipes = {
|
|||||||
{"technic:sulfur_lump", "technic:sulfur_dust 2"},
|
{"technic:sulfur_lump", "technic:sulfur_dust 2"},
|
||||||
{"default:stone", "technic:stone_dust"},
|
{"default:stone", "technic:stone_dust"},
|
||||||
{"default:sand", "technic:stone_dust"},
|
{"default:sand", "technic:stone_dust"},
|
||||||
|
{"default:desert_sand", "technic:stone_dust"},
|
||||||
|
{"default:silver_sand", "technic:stone_dust"},
|
||||||
|
|
||||||
-- Other
|
-- Other
|
||||||
{"default:cobble", "default:gravel"},
|
{"default:cobble", "default:gravel"},
|
||||||
{"default:gravel", "default:sand"},
|
{"default:gravel", "default:sand"},
|
||||||
{"default:sandstone", "default:sand 2"}, -- reverse recipe can be found in the compressor
|
{"default:sandstone", "default:sand 2"}, -- reverse recipe can be found in the compressor
|
||||||
|
{"default:desert_sandstone", "default:desert_sand 2"}, -- reverse recipe can be found in the compressor
|
||||||
|
{"default:silver_sandstone", "default:silver_sand 2"}, -- reverse recipe can be found in the compressor
|
||||||
|
|
||||||
|
{"default:ice", "default:snowblock"},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
local dependent_recipes = {
|
||||||
|
-- Sandstones
|
||||||
|
everness = {
|
||||||
|
{"everness:coral_deep_ocean_sandstone_block", "everness:coral_deep_ocean_sand 2"},
|
||||||
|
{"everness:coral_sandstone", "everness:coral_sand 2"},
|
||||||
|
{"everness:coral_white_sandstone", "everness:coral_white_sand 2"},
|
||||||
|
{"everness:crystal_forest_deep_ocean_sandstone_block", "everness:crystal_forest_deep_ocean_sand 2"},
|
||||||
|
{"everness:crystal_sandstone", "everness:crystal_sand 2"},
|
||||||
|
{"everness:cursed_lands_deep_ocean_sandstone_block", "everness:cursed_lands_deep_ocean_sand 2"},
|
||||||
|
{"everness:cursed_sandstone_block", "everness:cursed_sand 2"},
|
||||||
|
{"everness:mineral_sandstone", "everness:mineral_sand 2"},
|
||||||
|
-- Lumps and wheat
|
||||||
|
{"everness:pyrite_lump", "technic:pyrite_dust 2"},
|
||||||
|
},
|
||||||
|
farming = {
|
||||||
|
{"farming:seed_wheat", "farming:flour 1"},
|
||||||
|
},
|
||||||
|
gloopores = {
|
||||||
|
{"gloopores:alatro_lump", "technic:alatro_dust 2"},
|
||||||
|
{"gloopores:kalite_lump", "technic:kalite_dust 2"},
|
||||||
|
{"gloopores:arol_lump", "technic:arol_dust 2"},
|
||||||
|
{"gloopores:talinite_lump", "technic:talinite_dust 2"},
|
||||||
|
{"gloopores:akalin_lump", "technic:akalin_dust 2"},
|
||||||
|
},
|
||||||
|
homedecor = {
|
||||||
|
{"home_decor:brass_ingot", "technic:brass_dust 1"},
|
||||||
|
},
|
||||||
|
moreores = {
|
||||||
|
{"moreores:mithril_lump", "technic:mithril_dust 2"},
|
||||||
|
{"moreores:silver_lump", "technic:silver_dust 2"},
|
||||||
|
},
|
||||||
|
nether = {
|
||||||
|
{"nether:nether_lump", "technic:nether_dust 2"},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
for dependency, materials_to_add in pairs(dependent_recipes) do
|
||||||
|
if minetest.get_modpath(dependency) then
|
||||||
|
for _, material_entry in ipairs(materials_to_add) do
|
||||||
|
table.insert(recipes, material_entry)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
-- defuse the sandstone -> 4 sand recipe to avoid infinite sand bugs (also consult the inverse compressor recipe)
|
-- defuse the sandstone -> 4 sand recipe to avoid infinite sand bugs (also consult the inverse compressor recipe)
|
||||||
minetest.clear_craft({
|
minetest.clear_craft({
|
||||||
recipe = {
|
recipe = {{"default:sandstone"}},
|
||||||
{'default:sandstone'}
|
})
|
||||||
},
|
minetest.clear_craft({
|
||||||
|
recipe = {{"default:desert_sandstone"}},
|
||||||
|
})
|
||||||
|
minetest.clear_craft({
|
||||||
|
recipe = {{"default:silver_sandstone"}},
|
||||||
})
|
})
|
||||||
|
|
||||||
if minetest.get_modpath("farming") then
|
if minetest.get_modpath("everness") then
|
||||||
table.insert(recipes, {"farming:seed_wheat", "farming:flour 1"})
|
minetest.clear_craft({
|
||||||
|
recipe = {{"everness:mineral_sandstone"}},
|
||||||
|
})
|
||||||
|
-- Currently (2024-03-09), there seem to be no reverse recipes for any of the other everness sandstones.
|
||||||
end
|
end
|
||||||
|
|
||||||
if minetest.get_modpath("moreores") then
|
for _, data in ipairs(recipes) do
|
||||||
table.insert(recipes, {"moreores:mithril_lump", "technic:mithril_dust 2"})
|
|
||||||
table.insert(recipes, {"moreores:silver_lump", "technic:silver_dust 2"})
|
|
||||||
end
|
|
||||||
|
|
||||||
if minetest.get_modpath("gloopores") or minetest.get_modpath("glooptest") then
|
|
||||||
table.insert(recipes, {"gloopores:alatro_lump", "technic:alatro_dust 2"})
|
|
||||||
table.insert(recipes, {"gloopores:kalite_lump", "technic:kalite_dust 2"})
|
|
||||||
table.insert(recipes, {"gloopores:arol_lump", "technic:arol_dust 2"})
|
|
||||||
table.insert(recipes, {"gloopores:talinite_lump", "technic:talinite_dust 2"})
|
|
||||||
table.insert(recipes, {"gloopores:akalin_lump", "technic:akalin_dust 2"})
|
|
||||||
end
|
|
||||||
|
|
||||||
if minetest.get_modpath("homedecor") then
|
|
||||||
table.insert(recipes, {"home_decor:brass_ingot", "technic:brass_dust 1"})
|
|
||||||
end
|
|
||||||
|
|
||||||
for _, data in pairs(recipes) do
|
|
||||||
technic.register_grinder_recipe({input = {data[1]}, output = data[2]})
|
technic.register_grinder_recipe({input = {data[1]}, output = data[2]})
|
||||||
end
|
end
|
||||||
|
|
||||||
-- dusts
|
-- Dusts
|
||||||
local function register_dust(name, ingot)
|
local function register_dust(name, ingot)
|
||||||
local lname = string.lower(name)
|
local lname = string.lower(name)
|
||||||
lname = string.gsub(lname, ' ', '_')
|
lname = string.gsub(lname, ' ', '_')
|
||||||
@ -80,33 +120,57 @@ local function register_dust(name, ingot)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Sorted alphibeticaly
|
-- Sorted alphabetically
|
||||||
register_dust("Brass", "technic:brass_ingot")
|
local dusts = {
|
||||||
register_dust("Bronze", "default:bronze_ingot")
|
{"Brass", "basic_materials:brass_ingot"},
|
||||||
register_dust("Carbon Steel", "technic:carbon_steel_ingot")
|
{"Bronze", "default:bronze_ingot"},
|
||||||
register_dust("Cast Iron", "technic:cast_iron_ingot")
|
{"Carbon Steel", "technic:carbon_steel_ingot"},
|
||||||
register_dust("Chernobylite", "technic:chernobylite_block")
|
{"Cast Iron", "technic:cast_iron_ingot"},
|
||||||
register_dust("Chromium", "technic:chromium_ingot")
|
{"Chernobylite", "technic:chernobylite_block"},
|
||||||
register_dust("Coal", nil)
|
{"Chromium", "technic:chromium_ingot"},
|
||||||
register_dust("Copper", "default:copper_ingot")
|
{"Coal", nil},
|
||||||
register_dust("Lead", "technic:lead_ingot")
|
{"Copper", "default:copper_ingot"},
|
||||||
register_dust("Gold", "default:gold_ingot")
|
{"Lead", "technic:lead_ingot"},
|
||||||
register_dust("Mithril", "moreores:mithril_ingot")
|
{"Gold", "default:gold_ingot"},
|
||||||
register_dust("Silver", "moreores:silver_ingot")
|
{"Mithril", "moreores:mithril_ingot"},
|
||||||
register_dust("Stainless Steel", "technic:stainless_steel_ingot")
|
{"Silver", "moreores:silver_ingot"},
|
||||||
register_dust("Stone", "default:stone")
|
{"Stainless Steel", "technic:stainless_steel_ingot"},
|
||||||
register_dust("Sulfur", nil)
|
{"Stone", "default:stone"},
|
||||||
register_dust("Tin", "default:tin_ingot")
|
{"Sulfur", nil},
|
||||||
register_dust("Wrought Iron", "technic:wrought_iron_ingot")
|
{"Tin", "default:tin_ingot"},
|
||||||
register_dust("Zinc", "technic:zinc_ingot")
|
{"Wrought Iron", "technic:wrought_iron_ingot"},
|
||||||
if minetest.get_modpath("gloopores") or minetest.get_modpath("glooptest") then
|
{"Zinc", "technic:zinc_ingot"},
|
||||||
register_dust("Akalin", "glooptest:akalin_ingot")
|
}
|
||||||
register_dust("Alatro", "glooptest:alatro_ingot")
|
|
||||||
register_dust("Arol", "glooptest:arol_ingot")
|
local dependent_dusts = {
|
||||||
register_dust("Kalite", nil)
|
everness = {
|
||||||
register_dust("Talinite", "glooptest:talinite_ingot")
|
{"Pyrite", "everness:pyrite_ingot"},
|
||||||
|
},
|
||||||
|
gloopores = {
|
||||||
|
{"Akalin", "glooptest:akalin_ingot"},
|
||||||
|
{"Alatro", "glooptest:alatro_ingot"},
|
||||||
|
{"Arol", "glooptest:arol_ingot"},
|
||||||
|
{"Kalite", nil},
|
||||||
|
{"Talinite", "glooptest:talinite_ingot"},
|
||||||
|
},
|
||||||
|
nether = {
|
||||||
|
{"Nether", "nether:nether_ingot"},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
for dependency, dusts_to_add in pairs(dependent_dusts) do
|
||||||
|
if minetest.get_modpath(dependency) then
|
||||||
|
for _, dust_entry in pairs(dusts_to_add) do
|
||||||
|
table.insert(dusts, dust_entry)
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
for _, data in ipairs(dusts) do
|
||||||
|
register_dust(data[1], data[2])
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Uranium
|
||||||
for p = 0, 35 do
|
for p = 0, 35 do
|
||||||
local nici = (p ~= 0 and p ~= 7 and p ~= 35) and 1 or nil
|
local nici = (p ~= 0 and p ~= 7 and p ~= 35) and 1 or nil
|
||||||
local psuffix = p == 7 and "" or p
|
local psuffix = p == 7 and "" or p
|
||||||
@ -142,6 +206,7 @@ for pa = 0, 34 do
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Fuels
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
type = "fuel",
|
type = "fuel",
|
||||||
recipe = "technic:coal_dust",
|
recipe = "technic:coal_dust",
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
local S = technic.getter
|
local S = technic.getter
|
||||||
local moretrees = minetest.get_modpath("moretrees")
|
local moretrees = minetest.get_modpath("moretrees")
|
||||||
local mesecons_materials = minetest.get_modpath("mesecons_materials")
|
|
||||||
local dye = minetest.get_modpath("dye")
|
local dye = minetest.get_modpath("dye")
|
||||||
|
|
||||||
-- sawdust, the finest wood/tree grinding
|
-- sawdust, the finest wood/tree grinding
|
||||||
|
@ -20,6 +20,7 @@ dofile(path.."/grinder_recipes.lua")
|
|||||||
dofile(path.."/extractor_recipes.lua")
|
dofile(path.."/extractor_recipes.lua")
|
||||||
dofile(path.."/compressor_recipes.lua")
|
dofile(path.."/compressor_recipes.lua")
|
||||||
dofile(path.."/centrifuge_recipes.lua")
|
dofile(path.."/centrifuge_recipes.lua")
|
||||||
|
dofile(path.."/freezer_recipes.lua")
|
||||||
|
|
||||||
-- Multi-Machine Recipes
|
-- Multi-Machine Recipes
|
||||||
dofile(path.."/grindings.lua")
|
dofile(path.."/grindings.lua")
|
||||||
@ -31,3 +32,4 @@ dofile(path.."/grinder.lua")
|
|||||||
dofile(path.."/extractor.lua")
|
dofile(path.."/extractor.lua")
|
||||||
dofile(path.."/compressor.lua")
|
dofile(path.."/compressor.lua")
|
||||||
dofile(path.."/centrifuge.lua")
|
dofile(path.."/centrifuge.lua")
|
||||||
|
dofile(path.."/freezer.lua")
|
||||||
|
@ -4,22 +4,26 @@ local S = technic.getter
|
|||||||
local fs_helpers = pipeworks.fs_helpers
|
local fs_helpers = pipeworks.fs_helpers
|
||||||
local tube_entry = "^pipeworks_tube_connection_metallic.png"
|
local tube_entry = "^pipeworks_tube_connection_metallic.png"
|
||||||
|
|
||||||
local tube = {
|
function technic.default_can_insert(pos, node, stack, direction)
|
||||||
insert_object = function(pos, node, stack, direction)
|
local meta = minetest.get_meta(pos)
|
||||||
local meta = minetest.get_meta(pos)
|
local inv = meta:get_inventory()
|
||||||
local inv = meta:get_inventory()
|
if meta:get_int("splitstacks") == 1 then
|
||||||
return inv:add_item("src", stack)
|
stack = stack:peek_item(1)
|
||||||
end,
|
end
|
||||||
can_insert = function(pos, node, stack, direction)
|
return inv:room_for_item("src", stack)
|
||||||
local meta = minetest.get_meta(pos)
|
end
|
||||||
local inv = meta:get_inventory()
|
|
||||||
if meta:get_int("splitstacks") == 1 then
|
function technic.new_default_tube()
|
||||||
stack = stack:peek_item(1)
|
return {
|
||||||
end
|
insert_object = function(pos, node, stack, direction)
|
||||||
return inv:room_for_item("src", stack)
|
local meta = minetest.get_meta(pos)
|
||||||
end,
|
local inv = meta:get_inventory()
|
||||||
connect_sides = {left = 1, right = 1, back = 1, top = 1, bottom = 1},
|
return inv:add_item("src", stack)
|
||||||
}
|
end,
|
||||||
|
can_insert = technic.default_can_insert,
|
||||||
|
connect_sides = {left = 1, right = 1, back = 1, top = 1, bottom = 1},
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
local connect_default = {"bottom", "back", "left", "right"}
|
local connect_default = {"bottom", "back", "left", "right"}
|
||||||
|
|
||||||
@ -35,6 +39,8 @@ function technic.register_base_machine(data)
|
|||||||
local tier = data.tier
|
local tier = data.tier
|
||||||
local ltier = string.lower(tier)
|
local ltier = string.lower(tier)
|
||||||
|
|
||||||
|
data.modname = data.modname or minetest.get_current_modname()
|
||||||
|
|
||||||
local groups = {cracky = 2, technic_machine = 1, ["technic_"..ltier] = 1}
|
local groups = {cracky = 2, technic_machine = 1, ["technic_"..ltier] = 1}
|
||||||
if data.tube then
|
if data.tube then
|
||||||
groups.tubedevice = 1
|
groups.tubedevice = 1
|
||||||
@ -64,13 +70,21 @@ function technic.register_base_machine(data)
|
|||||||
"listring[current_player;main]"
|
"listring[current_player;main]"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local tube = technic.new_default_tube()
|
||||||
|
if data.can_insert then
|
||||||
|
tube.can_insert = data.can_insert
|
||||||
|
end
|
||||||
|
if data.insert_object then
|
||||||
|
tube.insert_object = data.insert_object
|
||||||
|
end
|
||||||
|
|
||||||
local run = function(pos, node)
|
local run = function(pos, node)
|
||||||
local meta = minetest.get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
local inv = meta:get_inventory()
|
local inv = meta:get_inventory()
|
||||||
local eu_input = meta:get_int(tier.."_EU_input")
|
local eu_input = meta:get_int(tier.."_EU_input")
|
||||||
|
|
||||||
local machine_desc_tier = machine_desc:format(tier)
|
local machine_desc_tier = machine_desc:format(tier)
|
||||||
local machine_node = "technic:"..ltier.."_"..machine_name
|
local machine_node = data.modname..":"..ltier.."_"..machine_name
|
||||||
local machine_demand = data.demand
|
local machine_demand = data.demand
|
||||||
|
|
||||||
-- Setup meta data if it does not exist.
|
-- Setup meta data if it does not exist.
|
||||||
@ -144,15 +158,16 @@ function technic.register_base_machine(data)
|
|||||||
if ltier == "lv" then
|
if ltier == "lv" then
|
||||||
tentry = ""
|
tentry = ""
|
||||||
end
|
end
|
||||||
minetest.register_node("technic:"..ltier.."_"..machine_name, {
|
|
||||||
|
minetest.register_node(data.modname..":"..ltier.."_"..machine_name, {
|
||||||
description = machine_desc:format(tier),
|
description = machine_desc:format(tier),
|
||||||
tiles = {
|
tiles = {
|
||||||
"technic_"..ltier.."_"..machine_name.."_top.png"..tentry,
|
data.modname.."_"..ltier.."_"..machine_name.."_top.png"..tentry,
|
||||||
"technic_"..ltier.."_"..machine_name.."_bottom.png"..tentry,
|
data.modname.."_"..ltier.."_"..machine_name.."_bottom.png"..tentry,
|
||||||
"technic_"..ltier.."_"..machine_name.."_side.png"..tentry,
|
data.modname.."_"..ltier.."_"..machine_name.."_side.png"..tentry,
|
||||||
"technic_"..ltier.."_"..machine_name.."_side.png"..tentry,
|
data.modname.."_"..ltier.."_"..machine_name.."_side.png"..tentry,
|
||||||
"technic_"..ltier.."_"..machine_name.."_side.png"..tentry,
|
data.modname.."_"..ltier.."_"..machine_name.."_side.png"..tentry,
|
||||||
"technic_"..ltier.."_"..machine_name.."_front.png"
|
data.modname.."_"..ltier.."_"..machine_name.."_front.png"
|
||||||
},
|
},
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
groups = groups,
|
groups = groups,
|
||||||
@ -194,9 +209,10 @@ function technic.register_base_machine(data)
|
|||||||
after_place_node = data.tube and pipeworks.after_place,
|
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)
|
on_receive_fields = function(pos, formname, fields, sender)
|
||||||
local node = minetest.get_node(pos)
|
if fields.quit then return end
|
||||||
if not pipeworks.may_configure(pos, sender) then return end
|
if not pipeworks.may_configure(pos, sender) then return end
|
||||||
fs_helpers.on_receive_fields(pos, fields)
|
fs_helpers.on_receive_fields(pos, fields)
|
||||||
|
local node = minetest.get_node(pos)
|
||||||
local meta = minetest.get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
local form_buttons = ""
|
local form_buttons = ""
|
||||||
if not string.find(node.name, ":lv_") then
|
if not string.find(node.name, ":lv_") then
|
||||||
@ -214,18 +230,18 @@ function technic.register_base_machine(data)
|
|||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("technic:"..ltier.."_"..machine_name.."_active",{
|
minetest.register_node(data.modname..":"..ltier.."_"..machine_name.."_active",{
|
||||||
description = machine_desc:format(tier),
|
description = machine_desc:format(tier),
|
||||||
tiles = {
|
tiles = {
|
||||||
"technic_"..ltier.."_"..machine_name.."_top.png"..tentry,
|
data.modname.."_"..ltier.."_"..machine_name.."_top.png"..tentry,
|
||||||
"technic_"..ltier.."_"..machine_name.."_bottom.png"..tentry,
|
data.modname.."_"..ltier.."_"..machine_name.."_bottom.png"..tentry,
|
||||||
"technic_"..ltier.."_"..machine_name.."_side.png"..tentry,
|
data.modname.."_"..ltier.."_"..machine_name.."_side.png"..tentry,
|
||||||
"technic_"..ltier.."_"..machine_name.."_side.png"..tentry,
|
data.modname.."_"..ltier.."_"..machine_name.."_side.png"..tentry,
|
||||||
"technic_"..ltier.."_"..machine_name.."_side.png"..tentry,
|
data.modname.."_"..ltier.."_"..machine_name.."_side.png"..tentry,
|
||||||
"technic_"..ltier.."_"..machine_name.."_front_active.png"
|
data.modname.."_"..ltier.."_"..machine_name.."_front_active.png"
|
||||||
},
|
},
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
drop = "technic:"..ltier.."_"..machine_name,
|
drop = data.modname..":"..ltier.."_"..machine_name,
|
||||||
groups = active_groups,
|
groups = active_groups,
|
||||||
connect_sides = data.connect_sides or connect_default,
|
connect_sides = data.connect_sides or connect_default,
|
||||||
legacy_facedir_simple = true,
|
legacy_facedir_simple = true,
|
||||||
@ -236,11 +252,12 @@ function technic.register_base_machine(data)
|
|||||||
allow_metadata_inventory_take = technic.machine_inventory_take,
|
allow_metadata_inventory_take = technic.machine_inventory_take,
|
||||||
allow_metadata_inventory_move = technic.machine_inventory_move,
|
allow_metadata_inventory_move = technic.machine_inventory_move,
|
||||||
technic_run = run,
|
technic_run = run,
|
||||||
technic_disabled_machine_name = "technic:"..ltier.."_"..machine_name,
|
technic_disabled_machine_name = data.modname..":"..ltier.."_"..machine_name,
|
||||||
on_receive_fields = function(pos, formname, fields, sender)
|
on_receive_fields = function(pos, formname, fields, sender)
|
||||||
local node = minetest.get_node(pos)
|
if fields.quit then return end
|
||||||
if not pipeworks.may_configure(pos, sender) then return end
|
if not pipeworks.may_configure(pos, sender) then return end
|
||||||
fs_helpers.on_receive_fields(pos, fields)
|
fs_helpers.on_receive_fields(pos, fields)
|
||||||
|
local node = minetest.get_node(pos)
|
||||||
local meta = minetest.get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
local form_buttons = ""
|
local form_buttons = ""
|
||||||
if not string.find(node.name, ":lv_") then
|
if not string.find(node.name, ":lv_") then
|
||||||
@ -258,8 +275,8 @@ function technic.register_base_machine(data)
|
|||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
technic.register_machine(tier, "technic:"..ltier.."_"..machine_name, technic.receiver)
|
technic.register_machine(tier, data.modname..":"..ltier.."_"..machine_name, technic.receiver)
|
||||||
technic.register_machine(tier, "technic:"..ltier.."_"..machine_name.."_active", technic.receiver)
|
technic.register_machine(tier, data.modname..":"..ltier.."_"..machine_name.."_active", technic.receiver)
|
||||||
|
|
||||||
end -- End registration
|
end -- End registration
|
||||||
|
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
local have_ui = minetest.get_modpath("unified_inventory")
|
local have_ui = minetest.get_modpath("unified_inventory")
|
||||||
|
local have_cg = minetest.get_modpath("craftguide")
|
||||||
|
local have_i3 = minetest.get_modpath("i3")
|
||||||
|
|
||||||
technic.recipes = { cooking = { input_size = 1, output_size = 1 } }
|
technic.recipes = { cooking = { input_size = 1, output_size = 1 } }
|
||||||
function technic.register_recipe_type(typename, origdata)
|
function technic.register_recipe_type(typename, origdata)
|
||||||
@ -6,19 +8,34 @@ function technic.register_recipe_type(typename, origdata)
|
|||||||
for k, v in pairs(origdata) do data[k] = v end
|
for k, v in pairs(origdata) do data[k] = v end
|
||||||
data.input_size = data.input_size or 1
|
data.input_size = data.input_size or 1
|
||||||
data.output_size = data.output_size or 1
|
data.output_size = data.output_size or 1
|
||||||
if have_ui and unified_inventory.register_craft_type and data.output_size == 1 then
|
if data.output_size == 1 then
|
||||||
unified_inventory.register_craft_type(typename, {
|
if have_ui and unified_inventory.register_craft_type then
|
||||||
description = data.description,
|
unified_inventory.register_craft_type(typename, {
|
||||||
width = data.input_size,
|
description = data.description,
|
||||||
height = 1,
|
width = data.input_size,
|
||||||
})
|
height = 1,
|
||||||
|
})
|
||||||
|
end
|
||||||
|
if have_cg and craftguide.register_craft_type then
|
||||||
|
craftguide.register_craft_type(typename, {
|
||||||
|
description = data.description,
|
||||||
|
})
|
||||||
|
end
|
||||||
|
if have_i3 then
|
||||||
|
i3.register_craft_type(typename, {
|
||||||
|
description = data.description,
|
||||||
|
})
|
||||||
|
end
|
||||||
end
|
end
|
||||||
data.recipes = {}
|
data.recipes = {}
|
||||||
technic.recipes[typename] = data
|
technic.recipes[typename] = data
|
||||||
end
|
end
|
||||||
|
|
||||||
local function get_recipe_index(items)
|
local function get_recipe_index(items)
|
||||||
if not items or type(items) ~= "table" then return false end
|
if type(items) ~= "table" then
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
local l = {}
|
local l = {}
|
||||||
for i, stack in ipairs(items) do
|
for i, stack in ipairs(items) do
|
||||||
l[i] = ItemStack(stack):get_name()
|
l[i] = ItemStack(stack):get_name()
|
||||||
@ -59,6 +76,26 @@ local function register_recipe(typename, data)
|
|||||||
width = 0,
|
width = 0,
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
if (have_cg or have_i3) and technic.recipes[typename].output_size == 1 then
|
||||||
|
local result = data.output
|
||||||
|
if type(result) == "table" then
|
||||||
|
result = result[1]
|
||||||
|
end
|
||||||
|
if have_cg and craftguide.register_craft then
|
||||||
|
craftguide.register_craft({
|
||||||
|
type = typename,
|
||||||
|
result = result,
|
||||||
|
items = data.input,
|
||||||
|
})
|
||||||
|
end
|
||||||
|
if have_i3 then
|
||||||
|
i3.register_craft({
|
||||||
|
type = typename,
|
||||||
|
result = result,
|
||||||
|
items = data.input,
|
||||||
|
})
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function technic.register_recipe(typename, data)
|
function technic.register_recipe(typename, data)
|
||||||
|
@ -56,7 +56,6 @@ function technic.register_solar_array(data)
|
|||||||
},
|
},
|
||||||
on_construct = function(pos)
|
on_construct = function(pos)
|
||||||
local meta = minetest.get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
local name = minetest.get_node(pos).name
|
|
||||||
meta:set_int(tier.."_EU_supply", 0)
|
meta:set_int(tier.."_EU_supply", 0)
|
||||||
end,
|
end,
|
||||||
technic_run = run,
|
technic_run = run,
|
||||||
|
@ -120,7 +120,7 @@ local run = function(pos, node, run_stage)
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
local remain = 0.9
|
local efficiency = 0.9
|
||||||
-- Machine information
|
-- Machine information
|
||||||
local machine_name = S("Supply Converter")
|
local machine_name = S("Supply Converter")
|
||||||
local meta = minetest.get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
@ -133,7 +133,6 @@ local run = function(pos, node, run_stage)
|
|||||||
enabled = enabled == "1"
|
enabled = enabled == "1"
|
||||||
end
|
end
|
||||||
enabled = enabled and (meta:get_int("mesecon_mode") == 0 or meta:get_int("mesecon_effect") ~= 0)
|
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_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 pos_down = {x=pos.x, y=pos.y-1, z=pos.z}
|
||||||
@ -144,14 +143,37 @@ local run = function(pos, node, run_stage)
|
|||||||
local to = technic.get_cable_tier(name_down)
|
local to = technic.get_cable_tier(name_down)
|
||||||
|
|
||||||
if from and to then
|
if from and to then
|
||||||
local input = meta:get_int(from.."_EU_input")
|
-- Get the "to" network switching station for EU demand calculation
|
||||||
meta:set_int(from.."_EU_demand", demand)
|
local network_hash = technic.cables[minetest.hash_node_position(pos_down)]
|
||||||
meta:set_int(from.."_EU_supply", 0)
|
local network = network_hash and minetest.get_position_from_hash(network_hash)
|
||||||
meta:set_int(to.."_EU_demand", 0)
|
local sw_pos = network and {x=network.x,y=network.y+1,z=network.z}
|
||||||
meta:set_int(to.."_EU_supply", input * remain)
|
local timeout = 0
|
||||||
meta:set_string("infotext", S("@1 (@2 @3 -> @4 @5)", machine_name,
|
for tier in pairs(technic.machines) do
|
||||||
technic.EU_string(input), from,
|
-- Supply converter must be connected to a network
|
||||||
technic.EU_string(input * remain), to))
|
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 demand = 0
|
||||||
|
if enabled then
|
||||||
|
-- Reverse evaluate the required machine and round to a nice number
|
||||||
|
demand = sw_meta:get_int("ba_demand") + sw_meta:get_int("demand")
|
||||||
|
demand = 100 * math.ceil(demand / efficiency / 100)
|
||||||
|
-- Do not draw more than the limit
|
||||||
|
demand = math.min(demand, meta:get_int("power"))
|
||||||
|
end
|
||||||
|
|
||||||
|
local input = meta:get_int(from.."_EU_input") -- actual input
|
||||||
|
meta:set_int(from.."_EU_demand", demand) -- desired input
|
||||||
|
meta:set_int(from.."_EU_supply", 0)
|
||||||
|
meta:set_int(to.."_EU_demand", 0)
|
||||||
|
meta:set_int(to.."_EU_supply", input * efficiency)
|
||||||
|
meta:set_string("infotext", S("@1 (@2 @3 -> @4 @5)", machine_name,
|
||||||
|
technic.EU_string(input), from,
|
||||||
|
technic.EU_string(input * efficiency), to))
|
||||||
|
else
|
||||||
|
meta:set_string("infotext",S("%s Has No Network"):format(machine_name))
|
||||||
|
end
|
||||||
else
|
else
|
||||||
meta:set_string("infotext", S("%s Has Bad Cabling"):format(machine_name))
|
meta:set_string("infotext", S("%s Has Bad Cabling"):format(machine_name))
|
||||||
if to then
|
if to then
|
||||||
@ -201,10 +223,11 @@ minetest.register_node("technic:supply_converter", {
|
|||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = 'technic:supply_converter 1',
|
output = 'technic:supply_converter 1',
|
||||||
recipe = {
|
recipe = {
|
||||||
{'technic:fine_gold_wire', 'technic:rubber', 'technic:doped_silicon_wafer'},
|
{'basic_materials:gold_wire', 'technic:rubber', 'technic:doped_silicon_wafer'},
|
||||||
{'technic:mv_transformer', 'technic:machine_casing', 'technic:lv_transformer'},
|
{'technic:mv_transformer', 'technic:machine_casing', 'technic:lv_transformer'},
|
||||||
{'technic:mv_cable', 'technic:rubber', 'technic:lv_cable'},
|
{'technic:mv_cable', 'technic:rubber', 'technic:lv_cable'},
|
||||||
}
|
},
|
||||||
|
replacements = { {"basic_materials:gold_wire", "basic_materials:empty_spool"}, },
|
||||||
})
|
})
|
||||||
|
|
||||||
for tier, machines in pairs(technic.machines) do
|
for tier, machines in pairs(technic.machines) do
|
||||||
|
@ -45,14 +45,12 @@ minetest.register_node("technic:switching_station",{
|
|||||||
meta:set_string("active", 1)
|
meta:set_string("active", 1)
|
||||||
meta:set_string("channel", "switching_station"..minetest.pos_to_string(pos))
|
meta:set_string("channel", "switching_station"..minetest.pos_to_string(pos))
|
||||||
meta:set_string("formspec", "field[channel;Channel;${channel}]")
|
meta:set_string("formspec", "field[channel;Channel;${channel}]")
|
||||||
local poshash = minetest.hash_node_position(pos)
|
|
||||||
technic.redundant_warn.poshash = nil
|
technic.redundant_warn.poshash = nil
|
||||||
end,
|
end,
|
||||||
after_dig_node = function(pos)
|
after_dig_node = function(pos)
|
||||||
minetest.forceload_free_block(pos)
|
minetest.forceload_free_block(pos)
|
||||||
pos.y = pos.y - 1
|
pos.y = pos.y - 1
|
||||||
minetest.forceload_free_block(pos)
|
minetest.forceload_free_block(pos)
|
||||||
local poshash = minetest.hash_node_position(pos)
|
|
||||||
technic.redundant_warn.poshash = nil
|
technic.redundant_warn.poshash = nil
|
||||||
end,
|
end,
|
||||||
on_receive_fields = function(pos, formname, fields, sender)
|
on_receive_fields = function(pos, formname, fields, sender)
|
||||||
@ -99,10 +97,14 @@ local function flatten(map)
|
|||||||
return list
|
return list
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Add a wire node to the LV/MV/HV network
|
-- Add a node to the LV/MV/HV network
|
||||||
|
-- Returns: indicator whether the node is new in the network
|
||||||
|
local hash_node_position = minetest.hash_node_position
|
||||||
local function add_network_node(nodes, pos, network_id)
|
local function add_network_node(nodes, pos, network_id)
|
||||||
local node_id = minetest.hash_node_position(pos)
|
local node_id = hash_node_position(pos)
|
||||||
technic.cables[node_id] = network_id
|
if network_id then
|
||||||
|
technic.cables[node_id] = network_id
|
||||||
|
end
|
||||||
if nodes[node_id] then
|
if nodes[node_id] then
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
@ -117,39 +119,58 @@ local function add_cable_node(nodes, pos, network_id, queue)
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- Generic function to add found connected nodes to the right classification array
|
-- 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, network_id, queue)
|
-- !! IMPORTANT: register/cables.lua -> clear_networks() must be kept in sync
|
||||||
|
local check_node_subp = function(network, pos, machines, sw_pos, from_below, network_id, queue)
|
||||||
technic.get_or_load_node(pos)
|
technic.get_or_load_node(pos)
|
||||||
local meta = minetest.get_meta(pos)
|
|
||||||
local name = minetest.get_node(pos).name
|
local name = minetest.get_node(pos).name
|
||||||
|
|
||||||
if technic.is_tier_cable(name, tier) then
|
if technic.is_tier_cable(name, network.tier) then
|
||||||
add_cable_node(all_nodes, pos,network_id, queue)
|
add_cable_node(network.all_nodes, pos, network_id, queue)
|
||||||
elseif machines[name] then
|
return
|
||||||
--dprint(name.." is a "..machines[name])
|
|
||||||
meta:set_string(tier.."_network",minetest.pos_to_string(sw_pos))
|
|
||||||
if machines[name] == technic.producer then
|
|
||||||
add_network_node(PR_nodes, pos, network_id)
|
|
||||||
elseif machines[name] == technic.receiver then
|
|
||||||
add_network_node(RE_nodes, pos, network_id)
|
|
||||||
elseif machines[name] == technic.producer_receiver then
|
|
||||||
add_network_node(PR_nodes, pos, network_id)
|
|
||||||
add_network_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_network_node(SP_nodes, pos, network_id)
|
|
||||||
meta:set_int("active", 0)
|
|
||||||
elseif machines[name] == technic.battery then
|
|
||||||
add_network_node(BA_nodes, pos, network_id)
|
|
||||||
end
|
|
||||||
|
|
||||||
meta:set_int(tier.."_EU_timeout", 2) -- Touch node
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local eu_type = machines[name]
|
||||||
|
if not eu_type then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
--dprint(name.." is a "..machines[name])
|
||||||
|
local meta = minetest.get_meta(pos)
|
||||||
|
-- Normal tostring() does not have enough precision, neither does meta:set_int()
|
||||||
|
-- Lua 5.1 bug: Cannot use hexadecimal notation for compression (see LuaJIT #911)
|
||||||
|
local network_str = string.format("%.20g", network_id)
|
||||||
|
local network_key = network.tier.."_network"
|
||||||
|
local m_network_str = meta:get_string(network_key)
|
||||||
|
|
||||||
|
if m_network_str == "" then
|
||||||
|
meta:set_string(network_key, network_str)
|
||||||
|
else
|
||||||
|
if m_network_str ~= network_str then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if eu_type == technic.producer then
|
||||||
|
add_network_node(network.PR_nodes, pos)
|
||||||
|
elseif eu_type == technic.receiver then
|
||||||
|
add_network_node(network.RE_nodes, pos)
|
||||||
|
elseif eu_type == technic.producer_receiver then
|
||||||
|
add_network_node(network.PR_nodes, pos)
|
||||||
|
add_network_node(network.RE_nodes, pos)
|
||||||
|
elseif eu_type == technic.battery then
|
||||||
|
add_network_node(network.BA_nodes, pos)
|
||||||
|
elseif eu_type == "SPECIAL" and from_below and
|
||||||
|
not vector.equals(pos, sw_pos) then
|
||||||
|
-- Another switching station -> disable it
|
||||||
|
add_network_node(network.SP_nodes, pos)
|
||||||
|
meta:set_int("active", 0)
|
||||||
|
end
|
||||||
|
|
||||||
|
meta:set_int(network.tier.."_EU_timeout", 2) -- Touch node
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Traverse a network given a list of machines and a cable type name
|
-- 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, pos, machines, tier, sw_pos, network_id, queue)
|
local traverse_network = function(network, pos, machines, sw_pos, network_id, queue)
|
||||||
local positions = {
|
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-1, y=pos.y, z=pos.z},
|
{x=pos.x-1, y=pos.y, z=pos.z},
|
||||||
@ -158,7 +179,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},
|
{x=pos.x, y=pos.y, z=pos.z+1},
|
||||||
{x=pos.x, y=pos.y, z=pos.z-1}}
|
{x=pos.x, y=pos.y, z=pos.z-1}}
|
||||||
for i, cur_pos in pairs(positions) do
|
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, network_id, queue)
|
check_node_subp(network, cur_pos, machines, sw_pos, i == 3, network_id, queue)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -169,43 +190,50 @@ local touch_nodes = function(list, tier)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local get_network = function(sw_pos, pos1, tier)
|
local get_network = function(sw_pos, cable_pos, tier)
|
||||||
local network_id = minetest.hash_node_position(pos1)
|
local network_id = minetest.hash_node_position(cable_pos)
|
||||||
local cached = technic.networks[network_id]
|
local cached = technic.networks[network_id]
|
||||||
if cached and cached.tier == tier then
|
if cached and cached.tier == tier then
|
||||||
|
-- Re-use cached system data
|
||||||
touch_nodes(cached.PR_nodes, tier)
|
touch_nodes(cached.PR_nodes, tier)
|
||||||
touch_nodes(cached.BA_nodes, tier)
|
touch_nodes(cached.BA_nodes, tier)
|
||||||
touch_nodes(cached.RE_nodes, tier)
|
touch_nodes(cached.RE_nodes, tier)
|
||||||
for _, pos in ipairs(cached.SP_nodes) do
|
for _, pos in ipairs(cached.SP_nodes) do
|
||||||
|
-- Disable all other switching stations (again)
|
||||||
local meta = minetest.get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
meta:set_int("active", 0)
|
meta:set_int("active", 0)
|
||||||
meta:set_string("active_pos", minetest.serialize(sw_pos))
|
|
||||||
end
|
end
|
||||||
return cached.PR_nodes, cached.BA_nodes, cached.RE_nodes
|
return cached.PR_nodes, cached.BA_nodes, cached.RE_nodes
|
||||||
end
|
end
|
||||||
local PR_nodes = {}
|
local machines = technic.machines[tier]
|
||||||
local BA_nodes = {}
|
local network = {
|
||||||
local RE_nodes = {}
|
tier = tier,
|
||||||
local SP_nodes = {}
|
PR_nodes = {},
|
||||||
local all_nodes = {}
|
BA_nodes = {},
|
||||||
|
RE_nodes = {},
|
||||||
|
SP_nodes = {},
|
||||||
|
all_nodes = {}
|
||||||
|
}
|
||||||
|
-- Traverse the network step by step starting from the node underneath the switching station
|
||||||
local queue = {}
|
local queue = {}
|
||||||
add_cable_node(all_nodes, pos1, network_id, queue)
|
add_cable_node(network.all_nodes, cable_pos, network_id, queue)
|
||||||
while next(queue) do
|
while next(queue) do
|
||||||
local to_visit = {}
|
local to_visit = {}
|
||||||
for _, pos in ipairs(queue) do
|
for _, pos in ipairs(queue) do
|
||||||
traverse_network(PR_nodes, RE_nodes, BA_nodes, SP_nodes, all_nodes,
|
traverse_network(network, pos, machines, sw_pos, network_id, to_visit)
|
||||||
pos, technic.machines[tier], tier, sw_pos, network_id, to_visit)
|
|
||||||
end
|
end
|
||||||
queue = to_visit
|
queue = to_visit
|
||||||
end
|
end
|
||||||
PR_nodes = flatten(PR_nodes)
|
|
||||||
BA_nodes = flatten(BA_nodes)
|
-- Convert { [hash] = pos, ... } to { pos, ... }
|
||||||
RE_nodes = flatten(RE_nodes)
|
network.PR_nodes = flatten(network.PR_nodes)
|
||||||
SP_nodes = flatten(SP_nodes)
|
network.BA_nodes = flatten(network.BA_nodes)
|
||||||
all_nodes = flatten(all_nodes)
|
network.RE_nodes = flatten(network.RE_nodes)
|
||||||
technic.networks[network_id] = {tier = tier, all_nodes = all_nodes, SP_nodes = SP_nodes,
|
network.SP_nodes = flatten(network.SP_nodes)
|
||||||
PR_nodes = PR_nodes, RE_nodes = RE_nodes, BA_nodes = BA_nodes}
|
network.all_nodes = flatten(network.all_nodes)
|
||||||
return PR_nodes, BA_nodes, RE_nodes
|
technic.networks[network_id] = network
|
||||||
|
|
||||||
|
return network.PR_nodes, network.BA_nodes, network.RE_nodes
|
||||||
end
|
end
|
||||||
|
|
||||||
-----------------------------------------------
|
-----------------------------------------------
|
||||||
@ -215,46 +243,49 @@ end
|
|||||||
technic.powerctrl_state = true
|
technic.powerctrl_state = true
|
||||||
|
|
||||||
minetest.register_chatcommand("powerctrl", {
|
minetest.register_chatcommand("powerctrl", {
|
||||||
params = "state",
|
params = "[on/off]",
|
||||||
description = "Enables or disables technic's switching station ABM",
|
description = "Enables or disables technic's switching station ABM",
|
||||||
privs = { basic_privs = true },
|
privs = { basic_privs = true },
|
||||||
func = function(name, state)
|
func = function(name, state)
|
||||||
if state == "on" then
|
technic.powerctrl_state = (state:trim():lower() == "on")
|
||||||
technic.powerctrl_state = true
|
minetest.chat_send_player(name, "Technic switching station: " ..
|
||||||
else
|
(technic.powerctrl_state and "on" or "off"))
|
||||||
technic.powerctrl_state = false
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
|
-- Run `technic_run` on all nodes in the power grid
|
||||||
|
local function run_nodes(list, run_stage)
|
||||||
|
for _, pos in ipairs(list) do
|
||||||
|
technic.get_or_load_node(pos)
|
||||||
|
local node = minetest.get_node_or_nil(pos)
|
||||||
|
if node and node.name then
|
||||||
|
local nodedef = minetest.registered_nodes[node.name]
|
||||||
|
if nodedef and nodedef.technic_run then
|
||||||
|
nodedef.technic_run(pos, node, run_stage)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
minetest.register_abm({
|
minetest.register_abm({
|
||||||
nodenames = {"technic:switching_station"},
|
nodenames = {"technic:switching_station"},
|
||||||
label = "Switching Station", -- allows the mtt profiler to profile this abm individually
|
label = "Switching Station", -- name for the Minetest mod profiler
|
||||||
interval = 1,
|
interval = 1,
|
||||||
chance = 1,
|
chance = 1,
|
||||||
action = function(pos, node, active_object_count, active_object_count_wider)
|
action = function(pos, node, active_object_count, active_object_count_wider)
|
||||||
if not technic.powerctrl_state then return end
|
if not technic.powerctrl_state then return end
|
||||||
local meta = minetest.get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
local meta1 = nil
|
local meta1
|
||||||
local pos1 = {}
|
local PR_nodes, BA_nodes, RE_nodes
|
||||||
local PR_EU = 0 -- EUs from PR nodes
|
|
||||||
local BA_PR_EU = 0 -- EUs from BA nodes (discharching)
|
|
||||||
local BA_RE_EU = 0 -- EUs to BA nodes (charging)
|
|
||||||
local RE_EU = 0 -- EUs to RE nodes
|
|
||||||
|
|
||||||
local tier = ""
|
|
||||||
local PR_nodes
|
|
||||||
local BA_nodes
|
|
||||||
local RE_nodes
|
|
||||||
local machine_name = S("Switching Station")
|
local machine_name = S("Switching Station")
|
||||||
|
|
||||||
-- Which kind of network are we on:
|
-- Which kind of network are we on:
|
||||||
pos1 = {x=pos.x, y=pos.y-1, z=pos.z}
|
local cable_pos = {x=pos.x, y=pos.y-1, z=pos.z}
|
||||||
|
|
||||||
--Disable if necessary
|
--Disable if necessary
|
||||||
if meta:get_int("active") ~= 1 then
|
if meta:get_int("active") ~= 1 then
|
||||||
minetest.forceload_free_block(pos)
|
minetest.forceload_free_block(pos)
|
||||||
minetest.forceload_free_block(pos1)
|
minetest.forceload_free_block(cable_pos)
|
||||||
meta:set_string("infotext",S("%s Already Present"):format(machine_name))
|
meta:set_string("infotext",S("%s Already Present"):format(machine_name))
|
||||||
|
|
||||||
local poshash = minetest.hash_node_position(pos)
|
local poshash = minetest.hash_node_position(pos)
|
||||||
@ -266,36 +297,21 @@ minetest.register_abm({
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
local name = minetest.get_node(pos1).name
|
local name = minetest.get_node(cable_pos).name
|
||||||
local tier = technic.get_cable_tier(name)
|
local tier = technic.get_cable_tier(name)
|
||||||
if tier then
|
if tier then
|
||||||
-- Forceload switching station
|
-- Forceload switching station
|
||||||
minetest.forceload_block(pos)
|
minetest.forceload_block(pos)
|
||||||
minetest.forceload_block(pos1)
|
minetest.forceload_block(cable_pos)
|
||||||
PR_nodes, BA_nodes, RE_nodes = get_network(pos, pos1, tier)
|
PR_nodes, BA_nodes, RE_nodes = get_network(pos, cable_pos, tier)
|
||||||
else
|
else
|
||||||
--dprint("Not connected to a network")
|
--dprint("Not connected to a network")
|
||||||
meta:set_string("infotext", S("%s Has No Network"):format(machine_name))
|
meta:set_string("infotext", S("%s Has No Network"):format(machine_name))
|
||||||
minetest.forceload_free_block(pos)
|
minetest.forceload_free_block(pos)
|
||||||
minetest.forceload_free_block(pos1)
|
minetest.forceload_free_block(cable_pos)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Run all the nodes
|
|
||||||
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)
|
|
||||||
local nodedef
|
|
||||||
if node2 and node2.name then
|
|
||||||
nodedef = minetest.registered_nodes[node2.name]
|
|
||||||
end
|
|
||||||
if nodedef and nodedef.technic_run then
|
|
||||||
nodedef.technic_run(pos2, node2, run_stage)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
run_nodes(PR_nodes, technic.producer)
|
run_nodes(PR_nodes, technic.producer)
|
||||||
run_nodes(RE_nodes, technic.receiver)
|
run_nodes(RE_nodes, technic.receiver)
|
||||||
run_nodes(BA_nodes, technic.battery)
|
run_nodes(BA_nodes, technic.battery)
|
||||||
@ -345,20 +361,16 @@ minetest.register_abm({
|
|||||||
end
|
end
|
||||||
--dprint("Total RE demand:"..RE_eu_demand)
|
--dprint("Total RE demand:"..RE_eu_demand)
|
||||||
|
|
||||||
-- Get all the power from the BA nodes
|
-- Batteries
|
||||||
local BA_eu_supply = 0
|
local BA_eu_supply, BA_eu_demand = 0, 0
|
||||||
for _, pos1 in pairs(BA_nodes) do
|
for _, pos1 in pairs(BA_nodes) do
|
||||||
meta1 = minetest.get_meta(pos1)
|
meta1 = minetest.get_meta(pos1)
|
||||||
BA_eu_supply = BA_eu_supply + meta1:get_int(eu_supply_str)
|
BA_eu_supply = BA_eu_supply + meta1:get_int(eu_supply_str)
|
||||||
end
|
|
||||||
--dprint("Total BA supply:"..BA_eu_supply)
|
|
||||||
|
|
||||||
-- Get all the demand from the BA nodes
|
|
||||||
local BA_eu_demand = 0
|
|
||||||
for _, pos1 in pairs(BA_nodes) do
|
|
||||||
meta1 = minetest.get_meta(pos1)
|
|
||||||
BA_eu_demand = BA_eu_demand + meta1:get_int(eu_demand_str)
|
BA_eu_demand = BA_eu_demand + meta1:get_int(eu_demand_str)
|
||||||
end
|
end
|
||||||
|
-- Expose value for the supply converter
|
||||||
|
meta:set_int("ba_demand", BA_eu_demand)
|
||||||
|
--dprint("Total BA supply:"..BA_eu_supply)
|
||||||
--dprint("Total BA demand:"..BA_eu_demand)
|
--dprint("Total BA demand:"..BA_eu_demand)
|
||||||
|
|
||||||
meta:set_string("infotext", S("@1. Supply: @2 Demand: @3",
|
meta:set_string("infotext", S("@1. Supply: @2 Demand: @3",
|
||||||
@ -379,8 +391,8 @@ minetest.register_abm({
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- Data that will be used by the power monitor
|
-- Data that will be used by the power monitor
|
||||||
meta:set_int("supply",PR_eu_supply)
|
meta:set_int("supply", PR_eu_supply)
|
||||||
meta:set_int("demand",RE_eu_demand)
|
meta:set_int("demand", RE_eu_demand)
|
||||||
|
|
||||||
-- If the PR supply is enough for the RE demand supply them all
|
-- If the PR supply is enough for the RE demand supply them all
|
||||||
if PR_eu_supply >= RE_eu_demand then
|
if PR_eu_supply >= RE_eu_demand then
|
||||||
@ -454,6 +466,7 @@ local function switching_station_timeout_count(pos, tier)
|
|||||||
local meta = minetest.get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
local timeout = meta:get_int(tier.."_EU_timeout")
|
local timeout = meta:get_int(tier.."_EU_timeout")
|
||||||
if timeout <= 0 then
|
if timeout <= 0 then
|
||||||
|
meta:set_string(tier.."_network", "")
|
||||||
meta:set_int(tier.."_EU_input", 0) -- Not needed anymore <-- actually, it is for supply converter
|
meta:set_int(tier.."_EU_input", 0) -- Not needed anymore <-- actually, it is for supply converter
|
||||||
return true
|
return true
|
||||||
else
|
else
|
||||||
@ -467,22 +480,29 @@ minetest.register_abm({
|
|||||||
interval = 1,
|
interval = 1,
|
||||||
chance = 1,
|
chance = 1,
|
||||||
action = function(pos, node, active_object_count, active_object_count_wider)
|
action = function(pos, node, active_object_count, active_object_count_wider)
|
||||||
local meta = minetest.get_meta(pos)
|
local has_network = false
|
||||||
|
local technic_machine = false
|
||||||
for tier, machines in pairs(technic.machines) do
|
for tier, machines in pairs(technic.machines) do
|
||||||
if machines[node.name] and switching_station_timeout_count(pos, tier) then
|
if machines[node.name] then
|
||||||
local nodedef = minetest.registered_nodes[node.name]
|
technic_machine = true
|
||||||
if nodedef and nodedef.technic_disabled_machine_name then
|
if not switching_station_timeout_count(pos, tier) then
|
||||||
node.name = nodedef.technic_disabled_machine_name
|
has_network = true
|
||||||
minetest.swap_node(pos, node)
|
|
||||||
elseif nodedef and nodedef.technic_on_disable then
|
|
||||||
nodedef.technic_on_disable(pos, node)
|
|
||||||
end
|
|
||||||
if nodedef then
|
|
||||||
local meta = minetest.get_meta(pos)
|
|
||||||
meta:set_string("infotext", S("%s Has No Network"):format(nodedef.description))
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if technic_machine and not has_network then
|
||||||
|
local nodedef = minetest.registered_nodes[node.name]
|
||||||
|
local meta = minetest.get_meta(pos)
|
||||||
|
meta:set_string("infotext", S("%s Has No Network"):format(nodedef.description))
|
||||||
|
if nodedef.technic_disabled_machine_name then
|
||||||
|
node.name = nodedef.technic_disabled_machine_name
|
||||||
|
minetest.swap_node(pos, node)
|
||||||
|
end
|
||||||
|
if nodedef.technic_on_disable then
|
||||||
|
nodedef.technic_on_disable(pos, node)
|
||||||
|
end
|
||||||
|
end
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -493,7 +513,6 @@ minetest.register_abm({
|
|||||||
interval = 1,
|
interval = 1,
|
||||||
chance = 1,
|
chance = 1,
|
||||||
action = function(pos, node, active_object_count, active_object_count_wider)
|
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 pos1 = {x=pos.x,y=pos.y-1,z=pos.z}
|
||||||
local tier = technic.get_cable_tier(minetest.get_node(pos1).name)
|
local tier = technic.get_cable_tier(minetest.get_node(pos1).name)
|
||||||
if not tier then return end
|
if not tier then return end
|
||||||
|
3
technic/mod.conf
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
name = technic
|
||||||
|
depends = default, pipeworks, technic_worldgen, basic_materials
|
||||||
|
optional_depends = bucket, screwdriver, mesecons, mesecons_mvps, digilines, digiline_remote, intllib, unified_inventory, vector_extras, dye, craftguide, i3, everness, nether
|
@ -1,238 +0,0 @@
|
|||||||
# 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
|
|
@ -1,238 +0,0 @@
|
|||||||
# 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
|
|
@ -1,33 +0,0 @@
|
|||||||
# 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
|
|
@ -1,33 +0,0 @@
|
|||||||
# 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
|
|
@ -1,207 +0,0 @@
|
|||||||
# 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
|
|
@ -146,7 +146,7 @@ local rad_resistance_node = {
|
|||||||
["moreores:mithril_block"] = 26,
|
["moreores:mithril_block"] = 26,
|
||||||
["moreores:silver_block"] = 53,
|
["moreores:silver_block"] = 53,
|
||||||
["snow:snow_brick"] = 2.8,
|
["snow:snow_brick"] = 2.8,
|
||||||
["technic:brass_block"] = 43,
|
["basic_materials:brass_block"] = 43,
|
||||||
["technic:carbon_steel_block"] = 40,
|
["technic:carbon_steel_block"] = 40,
|
||||||
["technic:cast_iron_block"] = 40,
|
["technic:cast_iron_block"] = 40,
|
||||||
["technic:chernobylite_block"] = 40,
|
["technic:chernobylite_block"] = 40,
|
||||||
@ -244,7 +244,6 @@ to be safe, and limits the range at which source/player interactions
|
|||||||
need to be considered.
|
need to be considered.
|
||||||
--]]
|
--]]
|
||||||
local abdomen_offset = 1
|
local abdomen_offset = 1
|
||||||
local cache_scaled_shielding = {}
|
|
||||||
local rad_dmg_cutoff = 0.2
|
local rad_dmg_cutoff = 0.2
|
||||||
local radiated_players = {}
|
local radiated_players = {}
|
||||||
|
|
||||||
@ -294,6 +293,8 @@ local function calculate_damage_multiplier(object)
|
|||||||
end
|
end
|
||||||
if ag.radiation then
|
if ag.radiation then
|
||||||
return 0.01 * ag.radiation
|
return 0.01 * ag.radiation
|
||||||
|
elseif armor_enabled then
|
||||||
|
return 0
|
||||||
end
|
end
|
||||||
if ag.fleshy then
|
if ag.fleshy then
|
||||||
return math.sqrt(0.01 * ag.fleshy)
|
return math.sqrt(0.01 * ag.fleshy)
|
||||||
@ -309,7 +310,7 @@ local function calculate_object_center(object)
|
|||||||
end
|
end
|
||||||
|
|
||||||
local function dmg_object(pos, object, strength)
|
local function dmg_object(pos, object, strength)
|
||||||
local obj_pos = vector.add(object:getpos(), calculate_object_center(object))
|
local obj_pos = vector.add(object:get_pos(), calculate_object_center(object))
|
||||||
local mul
|
local mul
|
||||||
if armor_enabled or entity_damage then
|
if armor_enabled or entity_damage then
|
||||||
-- we need to check may the object be damaged even if armor is disabled
|
-- we need to check may the object be damaged even if armor is disabled
|
||||||
@ -338,7 +339,7 @@ local function dmg_abm(pos, node)
|
|||||||
local max_dist = strength * rad_dmg_mult_sqrt
|
local max_dist = strength * rad_dmg_mult_sqrt
|
||||||
for _, o in pairs(minetest.get_objects_inside_radius(pos,
|
for _, o in pairs(minetest.get_objects_inside_radius(pos,
|
||||||
max_dist + abdomen_offset)) do
|
max_dist + abdomen_offset)) do
|
||||||
if entity_damage or o:is_player() then
|
if (entity_damage or o:is_player()) and o:get_hp() > 0 then
|
||||||
dmg_object(pos, o, strength)
|
dmg_object(pos, o, strength)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -427,7 +428,7 @@ for _, state in pairs({"flowing", "source"}) do
|
|||||||
liquidtype = state,
|
liquidtype = state,
|
||||||
liquid_alternative_flowing = "technic:corium_flowing",
|
liquid_alternative_flowing = "technic:corium_flowing",
|
||||||
liquid_alternative_source = "technic:corium_source",
|
liquid_alternative_source = "technic:corium_source",
|
||||||
liquid_viscosity = LAVA_VISC,
|
liquid_viscosity = 7, -- like lava
|
||||||
liquid_renewable = false,
|
liquid_renewable = false,
|
||||||
damage_per_second = 6,
|
damage_per_second = 6,
|
||||||
post_effect_color = {a=192, r=80, g=160, b=80},
|
post_effect_color = {a=192, r=80, g=160, b=80},
|
||||||
@ -513,4 +514,3 @@ if griefing then
|
|||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
|