70 Commits

Author SHA1 Message Date
88f2bc388f Add issue template 2020-06-13 14:14:14 +02:00
a8daa417c4 Add GitHub workflow and luacheck (#545)
Add badge to README
Fix luacheck warnings
Remove node_ownership globals (and support)
2020-06-12 20:39:00 +02:00
befe3ecc86 Fix incorrect numeric types for 5.3.0-dev
5.3.0-dev adds strict type checks for registration fields, hence this was not noticed earlier due to implicit string-number conversions
2020-05-27 18:32:57 +02:00
df7f2e464a Alloy furnace: More realistic recipe balance (#549) 2020-05-13 19:13:33 +02:00
31a052d7e6 Chainsaw update (bushes and moretrees fixed) (#551)
Add missing moretrees nodes to the chainsaw
Cut all nodes with the "tree" and "leaves" group too.
2020-05-10 14:42:57 +02:00
88f42539bb Fix error caused by locked chest recipes (#548) 2020-05-03 19:53:43 +02:00
b2a124dd83 Deal with lava cans wasting lava (#532)
Rather than replacing lava source with lava source, the lava can will now attempt to place lava to the node "above".
This change applies the same for all registered cans.
2020-05-01 21:24:12 +02:00
34f2894321 Update dependencies in manual.md (#547)
Add basic_materials to the list of dependencies in manual.md.
2020-05-01 21:11:53 +02:00
fb4fef783b Shapeless locked chests crafts (chest + lockpad) (#530)
This was only done for `default:chest`.
2020-04-26 11:33:12 +02:00
4a9ad94bf9 Fix chest formspec protection (#540)
This closes #539.
2020-04-26 11:32:42 +02:00
f3828c1943 Fix pipeworks link in manual (#533) 2020-03-15 17:29:18 +01:00
0e10e8360d Fix crash when placing cable plates (#534)
All coordinates can be equal if pointed_thing.above is identical
to pointed_thing.under.
2020-03-15 17:27:36 +01:00
fbc4cc8511 technic_cnc/cnc.lua: Fix access to non-existant stack parameter (#528) 2020-01-28 21:38:13 +01:00
904800abde Add river water can (#527) 2020-01-26 14:29:44 +01:00
1a45ad19d4 Alloy furnace: Accept only unique ItemStacks from tubes (#523)
Co-authored-by: Luke aka SwissalpS <Luke@SwissalpS.ws>
Co-authored-by: SmallJoker <SmallJoker@users.noreply.github.com>
2020-01-11 22:06:24 +01:00
e90b28895c battery_box.lua: Make "srcstack" local (#525)
Fixes warning:
Assignment to undeclared global "srcstack" inside a function at battery_box.lua:454
2020-01-06 21:50:15 +01:00
7696546d47 Fix steel strut overlay texture name (#526) 2020-01-06 21:49:05 +01:00
da95be53ec Fix radiation protection when armor group is not set (#509)
The radiation damage group can be not set when armor completely
protects against radiation or when no mod has set a default value
for the damage group. We want to apply radiation damage in the
second case but not in the first.
2019-12-30 21:02:01 +01:00
76a39e71b9 Cleanup duplicate call (#522)
No need to call get_inventory twice
2019-12-25 22:23:34 +01:00
08b660ba99 Add recipe to extract violet dye from blueberries (#518) 2019-12-14 10:20:32 +01:00
cb84439266 French translation: fix some errors and ortho (part 2) 2019-10-26 19:35:00 +02:00
c41f6509cf French translation: fix some errors and ortho (#513) 2019-10-26 19:34:17 +02:00
d5df30c3ff Replace deprecated functions with newer ones (#510)
Use mod.conf
2019-09-14 12:55:41 +02:00
e66bb281a4 Add cool_trees support to the chainsaw (#511)
Make list of timber node names less repetitive
2019-09-07 13:02:21 +02:00
768fbecc64 Add french translation (#417) 2019-08-26 19:53:24 +02:00
707fa5a97c Fix typos 2019-08-26 19:52:41 +02:00
505ad8d045 Add translation for wrench mod 2019-08-26 19:52:41 +02:00
a75cb7252d Add translation for technic_worldgen mod 2019-08-26 19:52:41 +02:00
662cc7e7ef Add translation for technic_chests mod 2019-08-26 19:52:41 +02:00
e12220be79 Add translation for technic mod 2019-08-26 19:52:41 +02:00
19e045e042 Add translation for extranodes mod 2019-08-26 19:52:41 +02:00
e8e5df3f4a Add translation for concrete mod 2019-08-26 19:52:41 +02:00
d119a67482 Refactor switching station ABMs (#508)
When the function is defined inside the ABM, a new closure is allocated every time the ABM runs. 
Since the action function is already way too long, it's better for readability and performance to split it out.
2019-08-26 19:45:11 +02:00
bb05ff8fd2 Reject constructor in constructor slot inventories (#505) 2019-07-21 12:40:57 +02:00
d1bf386b80 Use Unified Dyes on_dig where needed (#506)
Requires Unified Dyes commit 9ff40a7f or later
2019-07-21 12:37:56 +02:00
dc4f4f66e6 Apply radiation damage only if entity is not dead (#504)
This prevents on_dieplayer being called unnecessarily, causing problems such as repeated death messages.
2019-07-10 20:27:01 +02:00
62fdb853ec Optimize PNG images losslessly (#501)
This incorporates non-interlaced PNGs from #500 to fix warnings thrown by libpng.
2019-06-20 18:35:26 +02:00
8a987bb361 Add tubelib support to technic chests (#498) 2019-06-09 20:48:52 +02:00
e8f1033d49 Add alloy ice + bucket = water bucket (#470) 2019-06-01 12:33:31 +02:00
a9b10cc4b1 Fix Polish translation (#497) 2019-04-14 11:43:30 +02:00
b81d1d3f2d Check protection of the forcefield and Quarry (#468) 2019-04-13 20:45:49 +02:00
c9ba4b329d Add Polish translation (#493) 2019-03-31 13:00:48 +02:00
700faca5cb Add moretrees poplar to chainsaw (#489) 2019-03-10 11:40:52 +01:00
c14521cbd2 Quarry: Fix server freeze when max depth is reduced (#487)
Endless loop if max-depth is changed but some quarries are below that new limit
The old comparison (~=) did not account for that
2019-03-02 11:14:05 +01:00
4f78a69ffc Fix trailing whitespace (#482)
Trim all trailing whitespace characters,
2019-01-26 14:15:40 +01:00
5f6b87d43a Fix spelling errors (#481) 2019-01-26 14:15:07 +01:00
6e58a8e939 Make power meter work on LV battery box (#483) 2019-01-26 14:14:45 +01:00
8ebc1de29c make sure MV turbines only turn on in response to *flowing* water 2018-12-17 08:03:18 +01:00
e1a71a8fb0 Add MV-Freezer (#457)
New Grinder-recipe: ice => snowblock
New recipe for freezer: Freezer now generates ice
2018-12-09 17:37:58 +01:00
701240bc3a Quarry: Check for valid facedir to fix server freeze #465 (#466)
Checks if facedir is valid. If the face points up or down the depth-check would run endless and freeze the server
2018-12-09 16:01:10 +01:00
aa82fa1d13 Forcefield: Remove deprecated update_map() call (#467) 2018-12-09 15:57:48 +01:00
bdd13beeff fix brass block->ingot recipe
(clearing basic_materials' copper/silver recipe killed this one also)
2018-11-27 21:24:52 +01:00
f5bf0d98b1 Add mod check for strut register 2018-11-26 22:05:20 +01:00
3cafe7553a minor fix for "LV" translations 2018-11-25 16:10:23 +01:00
bc26b047d2 add blast-resistant concrete
and some basic_materials nodes
2018-11-25 16:10:23 +01:00
83ec1b2476 fix dirt textures
add grassy shapes cut from default:dirt_with_grass
2018-11-25 16:10:23 +01:00
c068edec65 fix excessive "element straight" quantity 2018-11-25 16:10:23 +01:00
4ecb3d4334 make "half"/"full" buttons work 2018-11-25 16:10:23 +01:00
d40946fa38 allow CNC to work without technic
minetest.conf technic_cnc_use_technic = false disables
use of power, returns items instantly, uses only default
stuff in craft recipe

(defaults to enabled if technic is installed)
2018-11-25 16:10:23 +01:00
dc0689018d move CNC machine into its own mod 2018-11-25 16:10:23 +01:00
51d7bd81ff let moreblocks handle brass block stairs et. al (#456) 2018-11-24 17:35:06 +01:00
2b2411d1ee blast-resistant concrete stairs/slopes/et. al (#455)
if moreblocks is installed.
2018-11-23 20:48:23 +01:00
8409be32fc Fix cable plate placement (#446)
Cable plate placement now uses minetest.item_place
2018-11-23 20:25:32 +01:00
3d52b679b0 Quarry: Make use of fake digger from pipeworks (#453)
Fixes crash when digging empty protected chests (https://github.com/minetest/minetest_game/blob/backport-0.4/mods/default/nodes.lua#L1868)
2018-11-16 21:36:03 +01:00
44cb8df048 use basic_materials mod where possible. 2018-11-11 09:54:20 +01:00
f702a6597b fix missing worldgen depends 2018-11-11 09:53:27 +01:00
Tim
e931041358 Fix clear_craft crash due to dependency order via soft-dependency on dye (#449)
Fixes Fix #448
2018-10-23 18:42:52 +02:00
DS
5b97d94dae New sandstone crafts, fix dye crafting (#390) 2018-10-05 19:46:33 +02:00
92dd0f4af8 Add a new type of cable clip
Uses Zeg9's steel mod's "steel:strut_mount" or streetsmod's
"streets:steel_support" as the base/blocky part, with an overlay copied
from the steel mod to make it look like the clip is fixed to the strut
with a steel band.

Textures will adjust to match whichever mod is installed, preferring the
steel mod.

Can be crafted from any of these standard/shaped recipes:

- - -        - f d
- f -   or   - s -
- m -        - i -

f = fencepost-shaped clip
m = steel mod strut with mount
s = steel mod strut without mount, or streets mod steel support
i = default steel ingot
d = dye (optional, see below)

If the user has Unified Dyes (commit 2a816534 or later), the clip can be
dyed (well, the white part anyway :-) ), either by adding a portion of
dye as above, or by crafting an existing clip + dye. Uses
"colorwallmounted" mode for 32-color support.
2018-09-07 17:13:18 -07:00
29f746369f Switch to colored itemstacks (#438)
with full crafting recipes
(requires Unified Dyes commit 2a816534 or later)
2018-08-25 21:24:52 +02:00
875 changed files with 2769 additions and 955 deletions

20
.github/ISSUE_TEMPLATE/bug_report.md vendored Normal file
View 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
View 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: https://raw.githubusercontent.com/minetest-mods/technic/master/.luacheckrc

48
.luacheckrc Normal file
View File

@ -0,0 +1,48 @@
unused_args = false
allow_defined_top = true
max_line_length = 999
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",
}
files["concrete/init.lua"].ignore = { "steel_ingot" }
files["technic/machines/MV/tool_workshop.lua"].ignore = { "pos" }
files["technic/machines/other/frames.lua"].ignore = { "item_texture", "item_type", "adj", "connected", "" }
files["technic/machines/register/battery_box.lua"].ignore = { "pos", "tube_upgrade" }
files["technic/machines/register/cables.lua"].ignore = { "name", "from_below", "p" }
files["technic/machines/register/common.lua"].ignore = { "result" }
files["technic/machines/register/generator.lua"].ignore = { "node" }
files["technic/machines/switching_station.lua"].ignore = { "pos1", "tier", "poshash" }
files["technic/radiation.lua"].ignore = { "LAVA_VISC" }
files["technic/tools/chainsaw.lua"].ignore = { "pos" }
files["technic/tools/mining_drill.lua"].ignore = { "mode" }
files["technic_chests/register.lua"].ignore = { "fs_helpers", "name", "locked_after_place" }
files["technic_cnc/cnc.lua"].ignore = { "multiplier" }
files["wrench/init.lua"].ignore = { "name", "stack" }

View File

@ -1,6 +1,9 @@
Technic Technic
======= =======
[![Build status](https://github.com/minetest-mods/technic/workflows/Check%20&%20Release/badge.svg)](https://github.com/minetest-mods/technic/actions)
[![License](https://img.shields.io/badge/license-LGPLv2.0%2B-purple.svg)](https://www.gnu.org/licenses/old-licenses/lgpl-2.0.en.html)
Credits for contributing to the project (in alphabetical order): Credits for contributing to the project (in alphabetical order):
* kpoppel * kpoppel
* Nekogloop * Nekogloop
@ -18,6 +21,6 @@ FAQ
License License
------- -------
Unless otherwise stated, all components of this modpack are licensed under the Unless otherwise stated, all components of this modpack are licensed under the
LGPL, V2 or later. See also the individual mod folders for their LGPL, V2 or later. See also the individual mod folders for their
secondary/alternate licenses, if any. secondary/alternate licenses, if any.

View File

@ -1,3 +1,4 @@
default default
basic_materials
intllib? intllib?
moreblocks?

View File

@ -1,4 +1,4 @@
--Minetest 0.4.7 mod: concrete --Minetest 0.4.7 mod: concrete
--(c) 2013 by RealBadAngel <mk@realbadangel.pl> --(c) 2013 by RealBadAngel <mk@realbadangel.pl>
local technic = rawget(_G, "technic") or {} local technic = rawget(_G, "technic") or {}
@ -23,24 +23,6 @@ else
steel_ingot = "default:steel_ingot" steel_ingot = "default:steel_ingot"
end 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 +33,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 +48,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 +61,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,19 +85,19 @@ 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",
drawtype = "nodebox", drawtype = "nodebox",
node_box = { node_box = {
type = "fixed", type = "fixed",
fixed = {box_platform} fixed = {box_platform}
}, },
on_place = function (itemstack, placer, pointed_thing) on_place = function (itemstack, placer, pointed_thing)
local node = minetest.get_node(pointed_thing.under) local node = minetest.get_node(pointed_thing.under)
if node.name ~= "technic:concrete_post" then if node.name ~= "technic:concrete_post" then
return minetest.item_place_node(itemstack, placer, pointed_thing) return minetest.item_place_node(itemstack, placer, pointed_thing)
end end
minetest.set_node(pointed_thing.under, {name="technic:concrete_post_with_platform"}) minetest.set_node(pointed_thing.under, {name="technic:concrete_post_with_platform"})
itemstack:take_item() itemstack:take_item()
@ -133,7 +117,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
View 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

10
concrete/locale/pl.txt Normal file
View 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
View 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
View File

@ -0,0 +1,3 @@
name = concrete
depends = default
optional_depends = basic_materials, intllib, moreblocks

Binary file not shown.

Before

Width:  |  Height:  |  Size: 311 B

After

Width:  |  Height:  |  Size: 214 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 500 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 813 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 813 B

After

Width:  |  Height:  |  Size: 583 B

View File

@ -1,6 +1,9 @@
default default
technic_worldgen technic_worldgen
basic_materials
concrete concrete
unifieddyes? unifieddyes?
intllib? intllib?
moreblocks? moreblocks?
steel?
streetsmod?

View File

@ -30,7 +30,7 @@ if minetest.get_modpath("moreblocks") then
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,12 +57,6 @@ 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", {
description=S("Brass Block"),
groups={cracky=1, not_in_creative_inventory=1},
tiles={"technic_brass_block.png"},
})
function register_technic_stairs_alias(modname, origname, newmod, newname) function register_technic_stairs_alias(modname, origname, newmod, newname)
minetest.register_alias(modname .. ":slab_" .. origname, newmod..":slab_" .. newname) minetest.register_alias(modname .. ":slab_" .. origname, newmod..":slab_" .. newname)
minetest.register_alias(modname .. ":slab_" .. origname .. "_inverted", newmod..":slab_" .. newname .. "_inverted") minetest.register_alias(modname .. ":slab_" .. origname .. "_inverted", newmod..":slab_" .. newname .. "_inverted")
@ -93,7 +87,7 @@ if minetest.get_modpath("moreblocks") then
minetest.register_alias(modname .. ":panel_" .. origname .. "_vertical", newmod..":panel_" .. newname .. "_vertical") minetest.register_alias(modname .. ":panel_" .. origname .. "_vertical", newmod..":panel_" .. newname .. "_vertical")
minetest.register_alias(modname .. ":micro_" .. origname .. "_bottom", newmod..":micro_" .. newname .. "_bottom") minetest.register_alias(modname .. ":micro_" .. origname .. "_bottom", newmod..":micro_" .. newname .. "_bottom")
minetest.register_alias(modname .. ":micro_" .. origname .. "_top", newmod..":micro_" .. newname .. "_top") minetest.register_alias(modname .. ":micro_" .. origname .. "_top", newmod..":micro_" .. newname .. "_top")
end end
register_technic_stairs_alias("stairsplus", "concrete", "technic", "concrete") register_technic_stairs_alias("stairsplus", "concrete", "technic", "concrete")
register_technic_stairs_alias("stairsplus", "marble", "technic", "marble") register_technic_stairs_alias("stairsplus", "marble", "technic", "marble")
@ -103,7 +97,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 +107,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 +140,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 +214,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
View File

@ -0,0 +1,7 @@
# technic_extranodes translation template
Marble = Marbre
Marble Bricks = Briques en marbre
Granite = Granite
Concrete = Béton

9
extranodes/locale/pl.txt Normal file
View 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

View 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
View File

@ -0,0 +1,3 @@
name = extranodes
depends = default, technic_worldgen, basic_materials, concrete
optional_depends = unifieddyes, intllib, moreblocks, steel, streetsmod

View 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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 226 B

After

Width:  |  Height:  |  Size: 202 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 103 B

View File

@ -13,14 +13,16 @@ The technic modpack depends on some other modpacks:
signalling elements signalling elements
* pipeworks, which supports the automation of item transport * pipeworks, which supports the automation of item transport
* moreores, which provides some additional ore types * moreores, which provides some additional ore types
* basic_materials, which provides some basic craft items
This manual doesn't explain how to use these other modpacks, which have This manual doesn't explain how to use these other modpacks, which have
their own manuals: 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://gitlab.com/VanessaE/pipeworks/-/wikis/home)
* [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, Recipes for constructable items in technic are generally not guessable,
and are also not specifically documented here. You should use a and are also not specifically documented here. You should use a
@ -74,9 +76,9 @@ 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 Tin is part of the basic Minetest game (having migrated there from
moreores). It is found from elevation +8 downwards, with no moreores). It is found from elevation +8 downwards, with no
elevation-dependent variations in abundance beyond that point. elevation-dependent variations in abundance beyond that point.
It is a common metal. Its main use in pure form is as a component 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 of electrical batteries. Apart from that its main purpose is
as the secondary ingredient in bronze (the base being copper), but bronze 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, is itself little used. Its abundance is well in excess of its usage,
@ -1152,7 +1154,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.

1
modpack.conf Normal file
View File

@ -0,0 +1 @@
name = technic

View File

@ -1 +0,0 @@

View File

@ -21,6 +21,9 @@ 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
RealBadAngel: (WTFPL) RealBadAngel: (WTFPL)
* Everything else. * Everything else.
@ -32,4 +35,4 @@ 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/> CC BY-SA 4.0: <https://creativecommons.org/licenses/by-sa/4.0/>

View File

@ -38,6 +38,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 +83,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 +135,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,7 +162,7 @@ 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" },
}, },
}) })

View File

@ -1,6 +1,7 @@
default default
pipeworks pipeworks
technic_worldgen technic_worldgen
basic_materials
bucket? bucket?
screwdriver? screwdriver?
mesecons? mesecons?
@ -10,3 +11,4 @@ digiline_remote?
intllib? intllib?
unified_inventory? unified_inventory?
vector_extras? vector_extras?
dye?

View File

@ -64,6 +64,10 @@ Registration functions
### Specific machines ### Specific machines
* `technic.register_solar_array(data)` * `technic.register_solar_array(data)`
* data is a table * data is a table
* `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.
Used itemdef fields Used itemdef fields
------------------- -------------------

View File

@ -83,7 +83,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 +91,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 +221,3 @@ function technic.trace_node_ray_fat(pos, dir, range)
return p return p
end, vector.round(pos) end, vector.round(pos)
end end

View File

@ -26,10 +26,10 @@ dofile(modpath.."/config.lua")
-- Helper functions -- Helper functions
dofile(modpath.."/helpers.lua") dofile(modpath.."/helpers.lua")
-- Items -- Items
dofile(modpath.."/items.lua") dofile(modpath.."/items.lua")
-- Craft recipes for items -- Craft recipes for items
dofile(modpath.."/crafts.lua") dofile(modpath.."/crafts.lua")
-- Register functions -- Register functions

View File

@ -35,7 +35,7 @@ minetest.register_tool("technic:blue_energy_crystal", {
fleshy = {times={}, uses=10000, maxlevel=0} fleshy = {times={}, uses=10000, maxlevel=0}
} }
} }
}) })
minetest.register_tool("technic:green_energy_crystal", { minetest.register_tool("technic:green_energy_crystal", {
description = S("Green Energy Crystal"), description = S("Green Energy Crystal"),
@ -51,7 +51,7 @@ minetest.register_tool("technic:green_energy_crystal", {
fleshy = {times={}, uses=10000, maxlevel=0} fleshy = {times={}, uses=10000, maxlevel=0}
} }
} }
}) })
minetest.register_tool("technic:red_energy_crystal", { minetest.register_tool("technic:red_energy_crystal", {
description = S("Red Energy Crystal"), description = S("Red Energy Crystal"),
@ -67,22 +67,6 @@ minetest.register_tool("technic:red_energy_crystal", {
fleshy = {times={}, uses=10000, maxlevel=0} fleshy = {times={}, uses=10000, maxlevel=0}
} }
} }
})
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", {
@ -90,11 +74,6 @@ minetest.register_craftitem("technic: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",

View File

@ -25,7 +25,7 @@ Mixed Metal Ingot = Mischmetallbarren
Composite Plate = Verbundplatte Composite Plate = Verbundplatte
Copper Plate = Kupferplatte Copper Plate = Kupferplatte
Carbon Plate = Kohlefaserplatte Carbon Plate = Kohlefaserplatte
Graphite = Graphit Graphite = Graphit
Carbon Cloth = Kohlefasergewebe Carbon Cloth = Kohlefasergewebe
Raw Latex = Rohlatex Raw Latex = Rohlatex
Rubber Fiber = Gummifaser Rubber Fiber = Gummifaser
@ -42,7 +42,7 @@ Inventory move disallowed due to protection = Das Inventar ist geschuetzt, Zugri
%s Enabled = %s Enabled =
%s Idle = %s ist bereit %s Idle = %s ist bereit
%s Improperly Placed = %s ist falsch plaziert %s Improperly Placed = %s ist falsch plaziert
%s Unpowered = %s hat keine Stromversorgung %s Unpowered = %s hat keine Stromversorgung
%s Out Of Fuel = %s hat keinen Brennstoff %s Out Of Fuel = %s hat keinen Brennstoff
%s Has Bad Cabling = %s ist falsch verkabelt %s Has Bad Cabling = %s ist falsch verkabelt
%s Has No Network = %s hat kein Netzwerk %s Has No Network = %s hat kein Netzwerk
@ -67,10 +67,9 @@ 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
%s Furnace = %s Ofen %s Furnace = %s Ofen
%s Grinder = %s Schleifmaschine %s Grinder = %s Schleifmaschine
%s Music Player = %s Musikspieler %s Music Player = %s Musikspieler
@ -106,7 +105,7 @@ Administrative World Anchor =
Charge = Aufladen Charge = Aufladen
Discharge = Entladen Discharge = Entladen
Power level = Energiestufe Power level = Energiestufe
# $1: Tier $2: current_charge $3: max_charge # $1: Tier $2: current_charge $3: max_charge
@1 Battery Box: @2/@3 = @1 Batteriebox: @2/@3 @1 Battery Box: @2/@3 = @1 Batteriebox: @2/@3
# $1: Machine name $2: Supply $3: Demand # $1: Machine name $2: Supply $3: Demand
@1. Supply: @2 Demand: @3 = @1. Versorgung: @2 Bedarf: @3 @1. Supply: @2 Demand: @3 = @1. Versorgung: @2 Bedarf: @3
@ -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

View File

@ -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
@ -102,7 +101,7 @@ Administrative World Anchor =
Charge = Cargar Charge = Cargar
Discharge = Descargar Discharge = Descargar
Power level = Nivel de Poder Power level = Nivel de Poder
# $1: Tier $2: current_charge $3: max_charge # $1: Tier $2: current_charge $3: max_charge
@1 Battery Box: @2/@3 = Caja de Bateria @1: @2/@3 @1 Battery Box: @2/@3 = Caja de Bateria @1: @2/@3
# $1: Machine name $2: Supply $3: Demand # $1: Machine name $2: Supply $3: Demand
@1. Supply: @2 Demand: @3 = @1. Alimentacion: @2 Demanda: @3 @1. Supply: @2 Demand: @3 = @1. Alimentacion: @2 Demanda: @3
@ -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
View 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

View File

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

View File

@ -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 =
@ -111,7 +112,7 @@ Administrative World Anchor =
Charge = Charge =
Discharge = Discharge =
Power level = Power level =
# $1: Tier $2: current_charge $3: max_charge # $1: Tier $2: current_charge $3: max_charge
@1 Battery Box: @2/@3 = @1 Battery Box: @2/@3 =
# $1: Machine name $2: Supply $3: Demand # $1: Machine name $2: Supply $3: Demand
@1. Supply: @2 Demand: @3 = @1. Supply: @2 Demand: @3 =
@ -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

View File

@ -6,7 +6,7 @@ minetest.register_craft({
{'technic:mv_cable', 'technic:mv_cable', 'technic:mv_cable'}, {'technic:mv_cable', 'technic:mv_cable', 'technic:mv_cable'},
{'homedecor:plastic_sheeting', 'homedecor:plastic_sheeting', 'homedecor:plastic_sheeting'}, {'homedecor:plastic_sheeting', 'homedecor:plastic_sheeting', 'homedecor:plastic_sheeting'},
} }
}) })
technic.register_cable("HV", 3/16) technic.register_cable("HV", 3/16)

View File

@ -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)
@ -126,6 +121,12 @@ local function set_forcefield_formspec(meta)
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 +274,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

View File

@ -455,7 +455,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)

View File

@ -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",
}) })
@ -60,6 +60,12 @@ local function set_quarry_demand(meta)
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)
@ -112,6 +118,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 +135,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
@ -146,15 +157,9 @@ local function quarry_run(pos, node)
dignode = technic.get_or_load_node(digpos) or minetest.get_node(digpos) dignode = technic.get_or_load_node(digpos) or minetest.get_node(digpos)
local dignodedef = minetest.registered_nodes[dignode.name] or {diggable=false} local dignodedef = minetest.registered_nodes[dignode.name] or {diggable=false}
-- doors mod among other thing does NOT like a nil digger... -- doors mod among other thing does NOT like a nil digger...
local fakedigger = { local fakedigger = pipeworks.create_fake_player({
get_player_name = function() name = owner
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 if not dignodedef.diggable or (dignodedef.can_dig and not dignodedef.can_dig(digpos, fakedigger)) then
can_dig = false can_dig = false
end end

View File

@ -8,7 +8,7 @@ minetest.register_craft({
{'default:copper_ingot', 'default:copper_ingot', 'default:copper_ingot'}, {'default:copper_ingot', 'default:copper_ingot', 'default:copper_ingot'},
{'default:paper', 'default:paper', 'default:paper'}, {'default:paper', 'default:paper', 'default:paper'},
} }
}) })
technic.register_cable("LV", 2/16) technic.register_cable("LV", 2/16)

View File

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

View File

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

View File

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

View File

@ -11,19 +11,23 @@ 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", {
description = S("Geothermal %s Generator"):format("LV"), description = S("Geothermal %s Generator"):format("LV"),
}) })
local check_node_around = function(pos) local check_node_around = function(pos)
local node = minetest.get_node(pos) local node = minetest.get_node(pos)
if node.name == "default:water_source" or node.name == "default:water_flowing" then return 1 end if node.name == "default:water_source" or node.name == "default:water_flowing" then return 1 end
if node.name == "default:lava_source" or node.name == "default:lava_flowing" then return 2 end if node.name == "default:lava_source" or node.name == "default:lava_flowing" then return 2 end
return 0 return 0
end end

View File

@ -22,8 +22,3 @@ dofile(path.."/extractor.lua")
dofile(path.."/compressor.lua") dofile(path.."/compressor.lua")
dofile(path.."/music_player.lua") dofile(path.."/music_player.lua")
dofile(path.."/cnc.lua")
dofile(path.."/cnc_api.lua")
dofile(path.."/cnc_nodes.lua")

View File

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

View File

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

View File

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

View File

@ -8,7 +8,7 @@ minetest.register_craft({
{'technic:lv_cable', 'technic:lv_cable', 'technic:lv_cable'}, {'technic:lv_cable', 'technic:lv_cable', 'technic:lv_cable'},
{'technic:rubber', 'technic:rubber', 'technic:rubber'}, {'technic:rubber', 'technic:rubber', 'technic:rubber'},
} }
}) })
technic.register_cable("MV", 2.5/16) technic.register_cable("MV", 2.5/16)

View File

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

View 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})

View File

@ -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,20 +18,20 @@ 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
end end
--- ---
-- 10 times better than LV hydro because of 2 extra water mills and 4 stainless steel, a transformer and whatnot ;P. -- 10 times better than LV hydro because of 2 extra water mills and 4 stainless steel, a transformer and whatnot ;P.
-- Man hydro turbines are tough and long lasting. So, give it some value :) -- Man hydro turbines are tough and long lasting. So, give it some value :)
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 = {

View File

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

View File

@ -45,11 +45,10 @@ 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)
if not technic_homedecor_node_is_owned(pointed_thing.under, placer) if not technic_homedecor_node_is_owned(pointed_thing.under, placer)
and not technic_homedecor_node_is_owned(pointed_thing.above, placer) then and not technic_homedecor_node_is_owned(pointed_thing.above, placer) then
local node = minetest.get_node(pointed_thing.under) local node = minetest.get_node(pointed_thing.under)
if not minetest.registered_nodes[node.name] or not minetest.registered_nodes[node.name].on_rightclick then if not minetest.registered_nodes[node.name] or not minetest.registered_nodes[node.name].on_rightclick then
@ -58,7 +57,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()
@ -76,7 +74,7 @@ local technic_homedecor_rotate_and_place = function(itemstack, placer, pointed_t
if not minetest.registered_nodes[minetest.get_node(pos1).name]["buildable_to"] then return end if not minetest.registered_nodes[minetest.get_node(pos1).name]["buildable_to"] then return end
if iswall then if iswall then
minetest.add_node(pos1, {name = wield_name, param2 = dirs2[fdir+1] }) -- place wall variant minetest.add_node(pos1, {name = wield_name, param2 = dirs2[fdir+1] }) -- place wall variant
elseif isceiling then elseif isceiling then
minetest.add_node(pos1, {name = wield_name, param2 = 20 }) -- place upside down variant minetest.add_node(pos1, {name = wield_name, param2 = 20 }) -- place upside down variant
@ -159,7 +157,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 +238,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 +320,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 +401,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 +482,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 +563,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},

View File

@ -177,8 +177,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

View File

@ -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
@ -71,7 +70,7 @@ local run = function(pos, node)
meta:set_int("MV_EU_demand", 0) meta:set_int("MV_EU_demand", 0)
return return
end end
if eu_input < workshop_demand[EU_upgrade+1] then if eu_input < workshop_demand[EU_upgrade+1] then
meta:set_string("infotext", S("%s Unpowered"):format(machine_name)) meta:set_string("infotext", S("%s Unpowered"):format(machine_name))
elseif eu_input >= workshop_demand[EU_upgrade+1] then elseif eu_input >= workshop_demand[EU_upgrade+1] then
@ -105,7 +104,7 @@ minetest.register_node("technic:tool_workshop", {
inv:set_size("src", 1) inv:set_size("src", 1)
inv:set_size("upgrade1", 1) inv:set_size("upgrade1", 1)
inv:set_size("upgrade2", 1) inv:set_size("upgrade2", 1)
end, end,
can_dig = technic.machine_can_dig, can_dig = technic.machine_can_dig,
allow_metadata_inventory_put = technic.machine_inventory_put, allow_metadata_inventory_put = technic.machine_inventory_put,
allow_metadata_inventory_take = technic.machine_inventory_take, allow_metadata_inventory_take = technic.machine_inventory_take,

View File

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

View File

@ -77,14 +77,12 @@ minetest.register_abm({
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 meta = minetest.get_meta(pos)
local inv = meta:get_inventory() local inv = meta:get_inventory()
if inv:get_size("src") == 1 then -- Old furnace -> convert it if inv:get_size("src") == 1 then -- Old furnace -> convert it
inv:set_size("src", 2) inv:set_size("src", 2)
inv:set_stack("src", 2, inv:get_stack("src2", 1)) inv:set_stack("src", 2, inv:get_stack("src2", 1))
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",

View File

@ -118,6 +118,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 +135,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)
@ -160,7 +167,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 +183,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

View File

@ -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
@ -100,7 +98,7 @@ end
local function add_table(table, toadd) local function add_table(table, toadd)
local i = 1 local i = 1
while true do while true do
o = table[i] local o = table[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
@ -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
@ -349,8 +347,8 @@ for zp = 0, 1 do
end end
-- Run script hook -- Run script hook
local _, callback local callback = nil
for _, callback in ipairs(minetest.registered_on_placenodes) do for _, _ 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 }
local newnode_copy = { name = def.name, param1 = 0, param2 = 0 } local newnode_copy = { name = def.name, param1 = 0, param2 = 0 }
@ -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
@ -414,7 +412,7 @@ minetest.register_entity("technic:frame_entity", {
item_texture = minetest.registered_items[itemname].inventory_image item_texture = minetest.registered_items[itemname].inventory_image
item_type = minetest.registered_items[itemname].type item_type = minetest.registered_items[itemname].type
end end
prop = { local prop = {
is_visible = true, is_visible = true,
textures = { node.name }, textures = { node.name },
} }
@ -431,14 +429,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 +448,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 +466,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 +545,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 +587,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 +693,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 +855,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 +977,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 +986,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 +994,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 +1014,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', '' },
} }
}) })

View File

@ -6,7 +6,7 @@ local fs_helpers = pipeworks.fs_helpers
local tube_entry = "^pipeworks_tube_connection_metallic.png" local tube_entry = "^pipeworks_tube_connection_metallic.png"
local function inject_items (pos) local function inject_items (pos)
local meta=minetest.get_meta(pos) local meta=minetest.get_meta(pos)
local inv = meta:get_inventory() local inv = meta:get_inventory()
local mode=meta:get_string("mode") local mode=meta:get_string("mode")
if mode=="single items" then if mode=="single items" then
@ -15,8 +15,8 @@ local function inject_items (pos)
i=i+1 i=i+1
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)
@ -31,7 +31,7 @@ local function inject_items (pos)
i=i+1 i=i+1
if stack then if stack then
local item0=stack:to_table() local item0=stack:to_table()
if item0 then if item0 then
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:clear() stack:clear()
inv:set_stack("main", i, stack) inv:set_stack("main", i, stack)
@ -40,7 +40,7 @@ local function inject_items (pos)
end end
end end
end end
end end
minetest.register_craft({ minetest.register_craft({
@ -95,7 +95,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)
@ -142,7 +142,7 @@ minetest.register_abm({
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 pos1 = vector.add(pos, vector.new(0, -1, 0)) local pos1 = vector.add(pos, vector.new(0, -1, 0))
local node1 = minetest.get_node(pos1) local node1 = minetest.get_node(pos1)
if minetest.get_item_group(node1.name, "tubedevice") > 0 then if minetest.get_item_group(node1.name, "tubedevice") > 0 then
inject_items(pos) inject_items(pos)
end end

View File

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

View File

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

View File

@ -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",
@ -312,7 +312,6 @@ function technic.register_battery_box(data)
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,7 +342,7 @@ 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, tube_upgrade = 0, 0
@ -452,7 +450,7 @@ 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 srcstack = inv:get_stack("dst", 1)
local toolname = srcstack:get_name() local toolname = srcstack:get_name()
if technic.power_tools[toolname] == nil then if technic.power_tools[toolname] == nil then
return batt_charge, false return batt_charge, false

View File

@ -117,6 +117,19 @@ local function clear_networks(pos)
end end
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
function technic.register_cable(tier, size) function technic.register_cable(tier, size)
local ltier = string.lower(tier) local ltier = string.lower(tier)
cable_tier["technic:"..ltier.."_cable"] = tier cable_tier["technic:"..ltier.."_cable"] = tier
@ -202,7 +215,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 +225,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 +241,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

View File

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

View File

@ -65,16 +65,16 @@ function technic.send_items(pos, x_velocity, z_velocity, output_name)
if output_name == nil then if output_name == nil then
output_name = "dst" output_name = "dst"
end end
local meta = minetest.get_meta(pos) local meta = minetest.get_meta(pos)
local inv = meta:get_inventory() local inv = meta:get_inventory()
local i = 0 local i = 0
for _, stack in ipairs(inv:get_list(output_name)) do for _, stack in ipairs(inv:get_list(output_name)) do
i = i + 1 i = i + 1
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)
@ -109,10 +108,9 @@ function technic.handle_machine_pipeworks(pos, tube_upgrade, send_function)
if send_function == nil then if send_function == nil then
send_function = technic.send_items send_function = technic.send_items
end end
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
@ -124,7 +122,7 @@ function technic.handle_machine_pipeworks(pos, tube_upgrade, send_function)
if node.param2 == 0 then pos1.x = pos1.x + 1 x_velocity = 1 end if node.param2 == 0 then pos1.x = pos1.x + 1 x_velocity = 1 end
local output_tube_connected = false local output_tube_connected = false
local node1 = minetest.get_node(pos1) local node1 = minetest.get_node(pos1)
if minetest.get_item_group(node1.name, "tubedevice") > 0 then if minetest.get_item_group(node1.name, "tubedevice") > 0 then
output_tube_connected = true output_tube_connected = true
end end

View File

@ -11,6 +11,8 @@ end
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"},
@ -21,10 +23,21 @@ local recipes = {
-- defuse the default sandstone recipe, since we have the compressor to take over in a more realistic manner -- defuse the default sandstone recipe, since we have the compressor to take over in a more realistic manner
minetest.clear_craft({ minetest.clear_craft({
output = "default:sandstone",
recipe = { recipe = {
{'group:sand', 'group:sand'}, {"default:sand", "default:sand"},
{'group:sand', 'group:sand'} {"default:sand", "default:sand"},
},
})
minetest.clear_craft({
recipe = {
{"default:desert_sand", "default:desert_sand"},
{"default:desert_sand", "default:desert_sand"},
},
})
minetest.clear_craft({
recipe = {
{"default:silver_sand", "default:silver_sand"},
{"default:silver_sand", "default:silver_sand"},
}, },
}) })

View File

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

View 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

View 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

View File

@ -41,9 +41,9 @@ function technic.register_generator(data)
"image[4,1;1,1;default_furnace_fire_bg.png]".. "image[4,1;1,1;default_furnace_fire_bg.png]"..
"list[current_player;main;0,5;8,4;]".. "list[current_player;main;0,5;8,4;]"..
"listring[]" "listring[]"
local desc = S("Fuel-Fired %s Generator"):format(tier) local desc = S("Fuel-Fired %s Generator"):format(tier)
local run = function(pos, node) local run = function(pos, node)
local meta = minetest.get_meta(pos) local meta = minetest.get_meta(pos)
local burn_time = meta:get_int("burn_time") local burn_time = meta:get_int("burn_time")
@ -57,7 +57,7 @@ function technic.register_generator(data)
-- Burn another piece of fuel -- Burn another piece of fuel
if burn_time == 0 then if burn_time == 0 then
local inv = meta:get_inventory() local inv = meta:get_inventory()
if not inv:is_empty("src") then if not inv:is_empty("src") then
local fuellist = inv:get_list("src") local fuellist = inv:get_list("src")
local fuel local fuel
local afterfuel local afterfuel
@ -96,7 +96,7 @@ function technic.register_generator(data)
} }
)..pipeworks.button_label )..pipeworks.button_label
end end
meta:set_string("formspec", meta:set_string("formspec",
"size[8, 9]".. "size[8, 9]"..
"label[0, 0;"..minetest.formspec_escape(desc).."]".. "label[0, 0;"..minetest.formspec_escape(desc).."]"..
"list[current_name;src;3, 1;1, 1;]".. "list[current_name;src;3, 1;1, 1;]"..
@ -120,7 +120,7 @@ function technic.register_generator(data)
"technic_"..ltier.."_generator_side.png"..tentry, "technic_"..ltier.."_generator_side.png"..tentry,
"technic_"..ltier.."_generator_side.png"..tentry, "technic_"..ltier.."_generator_side.png"..tentry,
"technic_"..ltier.."_generator_front.png" "technic_"..ltier.."_generator_front.png"
}, },
paramtype2 = "facedir", paramtype2 = "facedir",
groups = groups, groups = groups,
connect_sides = {"bottom", "back", "left", "right"}, connect_sides = {"bottom", "back", "left", "right"},
@ -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,15 +203,15 @@ 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)
-- Connected back? -- Connected back?
if meta:get_int(tier.."_EU_timeout") > 0 then return false end if meta:get_int(tier.."_EU_timeout") > 0 then return false end
local burn_time = meta:get_int("burn_time") or 0 local burn_time = meta:get_int("burn_time") or 0
if burn_time <= 0 then if burn_time <= 0 then
@ -240,7 +239,7 @@ function technic.register_generator(data)
} }
)..pipeworks.button_label )..pipeworks.button_label
end end
meta:set_string("formspec", meta:set_string("formspec",
"size[8, 9]".. "size[8, 9]"..
"label[0, 0;"..minetest.formspec_escape(desc).."]".. "label[0, 0;"..minetest.formspec_escape(desc).."]"..
"list[current_name;src;3, 1;1, 1;]".. "list[current_name;src;3, 1;1, 1;]"..
@ -274,7 +273,7 @@ function technic.register_generator(data)
local burn_time = meta:get_int("burn_time") local burn_time = meta:get_int("burn_time")
local percent = math.floor(burn_time / burn_totaltime * 100) local percent = math.floor(burn_time / burn_totaltime * 100)
meta:set_string("formspec", meta:set_string("formspec",
"size[8, 9]".. "size[8, 9]"..
"label[0, 0;"..minetest.formspec_escape(desc).."]".. "label[0, 0;"..minetest.formspec_escape(desc).."]"..
"list[current_name;src;3, 1;1, 1;]".. "list[current_name;src;3, 1;1, 1;]"..

View File

@ -23,17 +23,31 @@ 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"},
-- 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"},
} }
-- 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"}
}, },
}) })
@ -81,7 +95,7 @@ local function register_dust(name, ingot)
end end
-- Sorted alphibeticaly -- Sorted alphibeticaly
register_dust("Brass", "technic:brass_ingot") register_dust("Brass", "basic_materials:brass_ingot")
register_dust("Bronze", "default:bronze_ingot") register_dust("Bronze", "default:bronze_ingot")
register_dust("Carbon Steel", "technic:carbon_steel_ingot") register_dust("Carbon Steel", "technic:carbon_steel_ingot")
register_dust("Cast Iron", "technic:cast_iron_ingot") register_dust("Cast Iron", "technic:cast_iron_ingot")

View File

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

View File

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

View File

@ -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"}
@ -64,6 +68,14 @@ 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()
@ -144,10 +156,11 @@ 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("technic:"..ltier.."_"..machine_name, {
description = machine_desc:format(tier), description = machine_desc:format(tier),
tiles = { tiles = {
"technic_"..ltier.."_"..machine_name.."_top.png"..tentry, "technic_"..ltier.."_"..machine_name.."_top.png"..tentry,
"technic_"..ltier.."_"..machine_name.."_bottom.png"..tentry, "technic_"..ltier.."_"..machine_name.."_bottom.png"..tentry,
"technic_"..ltier.."_"..machine_name.."_side.png"..tentry, "technic_"..ltier.."_"..machine_name.."_side.png"..tentry,
"technic_"..ltier.."_"..machine_name.."_side.png"..tentry, "technic_"..ltier.."_"..machine_name.."_side.png"..tentry,

View File

@ -39,7 +39,7 @@ local function register_recipe(typename, data)
else else
data.output = ItemStack(data.output):to_string() data.output = ItemStack(data.output):to_string()
end end
local recipe = {time = data.time, input = {}, output = data.output} local recipe = {time = data.time, input = {}, output = data.output}
local index = get_recipe_index(data.input) local index = get_recipe_index(data.input)
if not index then if not index then
@ -49,7 +49,7 @@ local function register_recipe(typename, data)
for _, stack in ipairs(data.input) do for _, stack in ipairs(data.input) do
recipe.input[ItemStack(stack):get_name()] = ItemStack(stack):get_count() recipe.input[ItemStack(stack):get_name()] = ItemStack(stack):get_count()
end end
technic.recipes[typename].recipes[index] = recipe technic.recipes[typename].recipes[index] = recipe
if have_ui and technic.recipes[typename].output_size == 1 then if have_ui and technic.recipes[typename].output_size == 1 then
unified_inventory.register_craft({ unified_inventory.register_craft({

View File

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

View File

@ -201,10 +201,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

View File

@ -119,13 +119,13 @@ 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) 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)
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, tier) then
add_cable_node(all_nodes, pos,network_id, queue) add_cable_node(all_nodes, pos,network_id, queue)
elseif machines[name] then elseif machines[name] then
--dprint(name.." is a "..machines[name]) --dprint(name.." is a "..machines[name])
local meta = minetest.get_meta(pos)
meta:set_string(tier.."_network",minetest.pos_to_string(sw_pos)) meta:set_string(tier.."_network",minetest.pos_to_string(sw_pos))
if machines[name] == technic.producer then if machines[name] == technic.producer then
add_network_node(PR_nodes, pos, network_id) add_network_node(PR_nodes, pos, network_id)
@ -227,6 +227,20 @@ minetest.register_chatcommand("powerctrl", {
end end
}) })
-- Run all the nodes
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", -- allows the mtt profiler to profile this abm individually
@ -235,12 +249,8 @@ minetest.register_abm({
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 pos1 = {}
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 tier = ""
local PR_nodes local PR_nodes
@ -281,21 +291,6 @@ minetest.register_abm({
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)
@ -467,7 +462,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)
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] and switching_station_timeout_count(pos, tier) then
local nodedef = minetest.registered_nodes[node.name] local nodedef = minetest.registered_nodes[node.name]
@ -493,7 +487,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
View 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

View File

@ -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
@ -513,4 +514,3 @@ if griefing then
end, end,
}) })
end end

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 896 B

After

Width:  |  Height:  |  Size: 675 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 82 KiB

After

Width:  |  Height:  |  Size: 75 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 248 KiB

After

Width:  |  Height:  |  Size: 210 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.9 KiB

After

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 463 B

After

Width:  |  Height:  |  Size: 405 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 207 B

After

Width:  |  Height:  |  Size: 184 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 873 B

After

Width:  |  Height:  |  Size: 648 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 240 B

After

Width:  |  Height:  |  Size: 168 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 241 B

After

Width:  |  Height:  |  Size: 168 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 227 B

After

Width:  |  Height:  |  Size: 168 B

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