Updated several mods:
technic unified_inventory item_tweaks maptools moreblocks moreores random_buildings/cottages xban2master
|
@ -1,3 +1,3 @@
|
||||||
local modpath = minetest.get_modpath(minetest.get_current_modname())
|
local modpath = minetest.get_modpath(minetest.get_current_modname())
|
||||||
dofile(modpath.."/item_entity.lua")
|
|
||||||
dofile(modpath.."/item_drop.lua")
|
dofile(modpath.."/item_drop.lua")
|
||||||
|
|
|
@ -6,16 +6,6 @@ if drops == nil then
|
||||||
drops = {}
|
drops = {}
|
||||||
end
|
end
|
||||||
|
|
||||||
local function iprint(...)
|
|
||||||
-- wtf
|
|
||||||
local thingies = {...}
|
|
||||||
|
|
||||||
for i, v in ipairs(thingies) do
|
|
||||||
thingies[i] = tostring(v)
|
|
||||||
end
|
|
||||||
print('\27[1m[item_drop] '..table.concat(thingies, ' '), '\27[m')
|
|
||||||
end
|
|
||||||
|
|
||||||
local movers = {}
|
local movers = {}
|
||||||
|
|
||||||
local removedAlreadyDammit = {}
|
local removedAlreadyDammit = {}
|
||||||
|
|
|
@ -1,22 +1,15 @@
|
||||||
Calinou's Minetest Mods
|
Map Tools
|
||||||
=====================
|
==========================================================
|
||||||
|
|
||||||
Calinou's Mods for Minetest [http://minetest.net], a free and opensource Minecraft-like game.
|
Map Tools for Minetest (http://minetest.net), a free and open source infinite
|
||||||
|
world block sandbox game.
|
||||||
|
|
||||||
This Git repository is mostly made for servers; it allows easy updating.
|
**Moved to Gitorious:** https://gitorious.com/calinou/maptools/
|
||||||
|
|
||||||
To install, just clone this repository somewhere, then copy the "calinou_mods" folder in the "mods/minetest" folder of Minetest's installation folder.
|
----------------------
|
||||||
|
|
||||||
|
To install, just clone this repository into your "mods" directory.
|
||||||
|
|
||||||
|
Map Tools code is under CC0, textures are under CC BY-SA 3.0 unported.
|
||||||
|
|
||||||
Misc stuff
|
Forum topic: http://minetest.net/forum/viewtopic.php?id=1882
|
||||||
=====================
|
|
||||||
|
|
||||||
All these mods' source codes, except More Ores are under the zlib/libpng license. More Ores is under the GNU GPLv3; the mods' textures are under the CC BY-SA 3.0 Unported.
|
|
||||||
|
|
||||||
Mods' forum threads:
|
|
||||||
More Blocks: http://minetest.net/forum/viewtopic.php?id=509
|
|
||||||
More Ores: http://minetest.net/forum/viewtopic.php?id=549
|
|
||||||
Map Tools: http://minetest.net/forum/viewtopic.php?id=1882
|
|
||||||
Doors+: http://minetest.net/forum/viewtopic.php?id=2059
|
|
||||||
Stairs+: http://minetest.net/forum/viewtopic.php?id=2092
|
|
||||||
|
|
|
@ -182,10 +182,11 @@ minetest.register_node("maptools:grass", {
|
||||||
range = 12,
|
range = 12,
|
||||||
stack_max = 10000,
|
stack_max = 10000,
|
||||||
tiles = {"default_grass.png", "default_dirt.png", "default_dirt.png^default_grass_side.png"},
|
tiles = {"default_grass.png", "default_dirt.png", "default_dirt.png^default_grass_side.png"},
|
||||||
|
paramtype2 = "facedir",
|
||||||
drop = "",
|
drop = "",
|
||||||
groups = {unbreakable = 1, not_in_creative_inventory = maptools_creative},
|
groups = {unbreakable = 1, not_in_creative_inventory = maptools_creative},
|
||||||
sounds = default.node_sound_dirt_defaults({
|
sounds = default.node_sound_dirt_defaults({
|
||||||
footstep = {name="default_grass_footstep", gain=0.4},
|
footstep = {name="default_grass_footstep", gain = 0.4},
|
||||||
}),
|
}),
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -201,6 +202,26 @@ minetest.register_node("maptools:fullgrass", {
|
||||||
}),
|
}),
|
||||||
})
|
})
|
||||||
|
|
||||||
|
for slab_num=1,3,1 do
|
||||||
|
minetest.register_node("maptools:slab_grass_" .. slab_num * 4, {
|
||||||
|
description = S("Grass Slab"),
|
||||||
|
range = 12,
|
||||||
|
stack_max = 10000,
|
||||||
|
tiles = {"default_grass.png", "default_dirt.png", "default_dirt.png^maptools_grass_side_" .. slab_num * 4 .. ".png"},
|
||||||
|
drawtype = "nodebox",
|
||||||
|
node_box = {
|
||||||
|
type = "fixed",
|
||||||
|
fixed = {-0.5, -0.5, -0.5, 0.5, -0.5 + slab_num * 0.25, 0.5},
|
||||||
|
},
|
||||||
|
sunlight_propagates = true,
|
||||||
|
paramtype = "light",
|
||||||
|
paramtype2 = "facedir",
|
||||||
|
drop = "",
|
||||||
|
groups = {unbreakable = 1, not_in_creative_inventory = maptools_creative},
|
||||||
|
sounds = default.node_sound_dirt_defaults({footstep = {name="default_grass_footstep", gain = 0.4}}),
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
minetest.register_node("maptools:cobble", {
|
minetest.register_node("maptools:cobble", {
|
||||||
description = S("Unbreakable Cobblestone"),
|
description = S("Unbreakable Cobblestone"),
|
||||||
range = 12,
|
range = 12,
|
||||||
|
|
After Width: | Height: | Size: 561 B |
After Width: | Height: | Size: 294 B |
After Width: | Height: | Size: 466 B |
Before Width: | Height: | Size: 126 B After Width: | Height: | Size: 231 B |
|
@ -1,9 +1,13 @@
|
||||||
More Blocks
|
More Blocks
|
||||||
==========
|
==========================================================
|
||||||
|
|
||||||
More Blocks for Minetest (http://minetest.net), a free and open source infinite
|
More Blocks for Minetest (http://minetest.net), a free and open source infinite
|
||||||
world block sandbox game.
|
world block sandbox game.
|
||||||
|
|
||||||
|
**Moved to Gitorious:** https://gitorious.com/calinou/moreblocks/
|
||||||
|
|
||||||
|
----------------------
|
||||||
|
|
||||||
To install, just clone this repository into your "mods" directory.
|
To install, just clone this repository into your "mods" directory.
|
||||||
|
|
||||||
More Blocks code is under the zlib license, textures are under CC BY-SA 3.0 unported.
|
More Blocks code is under the zlib license, textures are under CC BY-SA 3.0 unported.
|
||||||
|
|
|
@ -1,22 +1,16 @@
|
||||||
Calinou's Minetest Mods
|
More Ores
|
||||||
=====================
|
==========================================================
|
||||||
|
|
||||||
Calinou's Mods for Minetest [http://minetest.net], a free and opensource Minecraft-like game.
|
More Ores for Minetest (http://minetest.net), a free and open source infinite
|
||||||
|
world block sandbox game.
|
||||||
|
|
||||||
This Git repository is mostly made for servers; it allows easy updating.
|
**Moved to Gitorious:** https://gitorious.com/calinou/moreores/
|
||||||
|
|
||||||
To install, just clone this repository somewhere, then copy the "calinou_mods" folder in the "mods/minetest" folder of Minetest's installation folder.
|
----------------------
|
||||||
|
|
||||||
|
To install, just clone this repository into your "mods" directory.
|
||||||
|
|
||||||
|
More Ores code is under CC0, textures are under CC BY-SA 3.0 unported.
|
||||||
|
|
||||||
Misc stuff
|
Forum topic: http://forum.minetest.net/viewtopic.php?id=549
|
||||||
=====================
|
|
||||||
|
|
||||||
All these mods' source codes, except More Ores are under the zlib/libpng license. More Ores is under the GNU GPLv3; the mods' textures are under the CC BY-SA 3.0 Unported.
|
|
||||||
|
|
||||||
Mods' forum threads:
|
|
||||||
More Blocks: http://minetest.net/forum/viewtopic.php?id=509
|
|
||||||
More Ores: http://minetest.net/forum/viewtopic.php?id=549
|
|
||||||
Map Tools: http://minetest.net/forum/viewtopic.php?id=1882
|
|
||||||
Doors+: http://minetest.net/forum/viewtopic.php?id=2059
|
|
||||||
Stairs+: http://minetest.net/forum/viewtopic.php?id=2092
|
|
||||||
|
|
|
@ -4,3 +4,5 @@ WARNING: random_buildings:build looks like a chest and "spawns" a building. It d
|
||||||
|
|
||||||
The mod 'cottages' is ready for usage.
|
The mod 'cottages' is ready for usage.
|
||||||
'random_buildings' and 'mobf_trader' are in development stage. If you want to run this modpack on a server, delete these two subfolders for now!
|
'random_buildings' and 'mobf_trader' are in development stage. If you want to run this modpack on a server, delete these two subfolders for now!
|
||||||
|
|
||||||
|
The texture cottages/textures/cottages_slate.png is derived from Universal schema.jpg by Stefanie Lindener, which can be found here: http://de.wikipedia.org/w/index.php?title=Datei:Universal_schema.jpg&filetimestamp=20060510110309& The texture is CC-by-sa 2.0/de.
|
||||||
|
|
|
@ -82,16 +82,25 @@ Roof wood = Holzdach
|
||||||
Roof black = Schwarzes Dach
|
Roof black = Schwarzes Dach
|
||||||
Roof red = Rotes Dach
|
Roof red = Rotes Dach
|
||||||
Roof brown = Braunes Dach
|
Roof brown = Braunes Dach
|
||||||
|
Roof reet = Reetdach
|
||||||
|
Roof slate = Schieferdach
|
||||||
Roof connector straw = Strohdachverbinder
|
Roof connector straw = Strohdachverbinder
|
||||||
Roof connector wood = Holzdachverbinder
|
Roof connector wood = Holzdachverbinder
|
||||||
Roof connector black = Schwarzer Dachverbinder
|
Roof connector black = Schwarzer Dachverbinder
|
||||||
Roof connector red = Roter Dachverbinder
|
Roof connector red = Roter Dachverbinder
|
||||||
Roof connector brown = Brauner Dachverbinder
|
Roof connector brown = Brauner Dachverbinder
|
||||||
|
Roof connector reet = Reet-Dachverbinder
|
||||||
|
Roof connector slate = Schiefer-Dachverbinder
|
||||||
Roof (flat) straw = Strohdach (flach)
|
Roof (flat) straw = Strohdach (flach)
|
||||||
Roof (flat) wood = Holzdach (flach)
|
Roof (flat) wood = Holzdach (flach)
|
||||||
Roof (flat) black = Schwarzes Dach (flach)
|
Roof (flat) black = Schwarzes Dach (flach)
|
||||||
Roof (flat) red = Rotes Dach (flach)
|
Roof (flat) red = Rotes Dach (flach)
|
||||||
Roof (flat) brown = Braunes Dach (flach)
|
Roof (flat) brown = Braunes Dach (flach)
|
||||||
|
Roof (flat) reet = Reetdach (flach)
|
||||||
|
Roof (flat) slate = Schieferdach (flach)
|
||||||
|
Vertical Slate = Vertikaler Schiefer
|
||||||
|
Reet for thatching = Reet
|
||||||
|
|
||||||
|
|
||||||
### nodes_straw.lua ###
|
### nodes_straw.lua ###
|
||||||
layer of straw = Strohschicht
|
layer of straw = Strohschicht
|
||||||
|
|
|
@ -82,16 +82,24 @@ Roof wood =
|
||||||
Roof black =
|
Roof black =
|
||||||
Roof red =
|
Roof red =
|
||||||
Roof brown =
|
Roof brown =
|
||||||
|
Roof reet =
|
||||||
|
Roof slate =
|
||||||
Roof connector straw =
|
Roof connector straw =
|
||||||
Roof connector wood =
|
Roof connector wood =
|
||||||
Roof connector black =
|
Roof connector black =
|
||||||
Roof connector red =
|
Roof connector red =
|
||||||
Roof connector brown =
|
Roof connector brown =
|
||||||
|
Roof connector reet =
|
||||||
|
Roof connector slate =
|
||||||
Roof (flat) straw =
|
Roof (flat) straw =
|
||||||
Roof (flat) wood =
|
Roof (flat) wood =
|
||||||
Roof (flat) black =
|
Roof (flat) black =
|
||||||
Roof (flat) red =
|
Roof (flat) red =
|
||||||
Roof (flat) brown =
|
Roof (flat) brown =
|
||||||
|
Roof (flat) reet =
|
||||||
|
Roof (flat) slate =
|
||||||
|
Vertical Slate =
|
||||||
|
Reet for thatching =
|
||||||
|
|
||||||
### nodes_straw.lua ###
|
### nodes_straw.lua ###
|
||||||
layer of straw =
|
layer of straw =
|
||||||
|
|
|
@ -157,6 +157,9 @@ end -- of cottages.register_roof( name, tiles, basic_material )
|
||||||
cottages.register_roof( 'straw',
|
cottages.register_roof( 'straw',
|
||||||
{"cottages_darkage_straw.png","cottages_darkage_straw.png","cottages_darkage_straw.png","cottages_darkage_straw.png","cottages_darkage_straw.png","cottages_darkage_straw.png"},
|
{"cottages_darkage_straw.png","cottages_darkage_straw.png","cottages_darkage_straw.png","cottages_darkage_straw.png","cottages_darkage_straw.png","cottages_darkage_straw.png"},
|
||||||
'cottages:straw_mat', nil );
|
'cottages:straw_mat', nil );
|
||||||
|
cottages.register_roof( 'reet',
|
||||||
|
{"cottages_reet.png","cottages_reet.png","cottages_reet.png","cottages_reet.png","cottages_reet.png","cottages_reet.png"},
|
||||||
|
'default:papyrus', nil );
|
||||||
cottages.register_roof( 'wood',
|
cottages.register_roof( 'wood',
|
||||||
{"default_tree.png","default_wood.png","default_wood.png","default_wood.png","default_wood.png","default_tree.png"},
|
{"default_tree.png","default_wood.png","default_wood.png","default_wood.png","default_wood.png","default_tree.png"},
|
||||||
'default:wood', nil);
|
'default:wood', nil);
|
||||||
|
@ -169,3 +172,43 @@ cottages.register_roof( 'red',
|
||||||
cottages.register_roof( 'brown',
|
cottages.register_roof( 'brown',
|
||||||
{"cottages_homedecor_shingles_wood.png","default_wood.png","default_wood.png","default_wood.png","default_wood.png","cottages_homedecor_shingles_wood.png"},
|
{"cottages_homedecor_shingles_wood.png","default_wood.png","default_wood.png","default_wood.png","default_wood.png","cottages_homedecor_shingles_wood.png"},
|
||||||
'homedecor:shingles_wood', 'default:dirt');
|
'homedecor:shingles_wood', 'default:dirt');
|
||||||
|
cottages.register_roof( 'slate',
|
||||||
|
{"cottages_slate.png","default_wood.png","cottages_slate.png","cottages_slate.png","default_wood.png","cottages_slate.png"},
|
||||||
|
'default:stone', nil);
|
||||||
|
|
||||||
|
|
||||||
|
---------------------------------------------------------------------------------------
|
||||||
|
-- slate roofs are sometimes on vertical fronts of houses
|
||||||
|
---------------------------------------------------------------------------------------
|
||||||
|
minetest.register_node("cottages:slate_vertical", {
|
||||||
|
description = S("Vertical Slate"),
|
||||||
|
tiles = {"cottages_slate.png","default_wood.png","cottages_slate.png","cottages_slate.png","default_wood.png","cottages_slate.png"},
|
||||||
|
paramtype2 = "facedir",
|
||||||
|
groups = {cracky=2, stone=1},
|
||||||
|
sounds = default.node_sound_stone_defaults(),
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = "cottages:slate_vertical",
|
||||||
|
recipe = { {'default:stone', 'default:wood', '' }
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
---------------------------------------------------------------------------------------
|
||||||
|
-- Reed might also be needed as a full block
|
||||||
|
---------------------------------------------------------------------------------------
|
||||||
|
minetest.register_node("cottages:reet", {
|
||||||
|
description = S("Reet for thatching"),
|
||||||
|
tiles = {"cottages_reet.png"},
|
||||||
|
groups = {snappy=3,choppy=3,oddly_breakable_by_hand=3,flammable=3},
|
||||||
|
sounds = default.node_sound_wood_defaults(),
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = "cottages:reet",
|
||||||
|
recipe = { {'default:papyrus','default:papyrus'},
|
||||||
|
{'default:papyrus','default:papyrus'},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
After Width: | Height: | Size: 8.4 KiB |
|
@ -18,12 +18,19 @@ minetest.register_alias("technic:concrete_post33", "technic:concrete_post3")
|
||||||
minetest.register_alias("technic:concrete_post34", "technic:concrete_post28")
|
minetest.register_alias("technic:concrete_post34", "technic:concrete_post28")
|
||||||
minetest.register_alias("technic:concrete_post35", "technic:concrete_post19")
|
minetest.register_alias("technic:concrete_post35", "technic:concrete_post19")
|
||||||
|
|
||||||
|
local steel_ingot
|
||||||
|
if minetest.get_modpath("technic_worldgen") then
|
||||||
|
steel_ingot = "technic:carbon_steel_ingot"
|
||||||
|
else
|
||||||
|
steel_ingot = "default:steel_ingot"
|
||||||
|
end
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = 'technic:rebar 6',
|
output = 'technic:rebar 6',
|
||||||
recipe = {
|
recipe = {
|
||||||
{'','', 'default:steel_ingot'},
|
{'','', steel_ingot},
|
||||||
{'','default:steel_ingot',''},
|
{'',steel_ingot,''},
|
||||||
{'default:steel_ingot', '', ''},
|
{steel_ingot, '', ''},
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,68 @@
|
||||||
|
Notes on iron and steel
|
||||||
|
=======================
|
||||||
|
|
||||||
|
Alloying iron with carbon is of huge importance, but in some processes
|
||||||
|
the alloying is an implicit side effect rather than the product of
|
||||||
|
explicit mixing, so it is a complex area. In the real world, there is
|
||||||
|
a huge variety of kinds of iron and steel, differing in the proportion
|
||||||
|
of carbon included and in other elements added to the mix.
|
||||||
|
|
||||||
|
The Minetest default mod doesn't distinguish between types of iron and
|
||||||
|
steel at all. This mod introduces multiple types in order to get a bit
|
||||||
|
of complexity and flavour.
|
||||||
|
|
||||||
|
Leaving aside explicit addition of other elements, the iron/carbon
|
||||||
|
spectrum is here represented by three substances: wrought iron,
|
||||||
|
carbon steel, and cast iron. Wrought iron has low carbon content
|
||||||
|
(less than 0.25%), resists shattering, and is easily welded, but is
|
||||||
|
relatively soft and susceptible to rusting. It was used for rails,
|
||||||
|
gates, chains, wire, pipes, fasteners, and other purposes. Cast iron
|
||||||
|
has high carbon content (2.1% to 4%), is especially hard, and resists
|
||||||
|
corrosion, but is relatively brittle, and difficult to work. It was used
|
||||||
|
to build large structures such as bridges, and for cannons, cookware,
|
||||||
|
and engine cylinders. Carbon steel has medium carbon content (0.25%
|
||||||
|
to 2.1%), and intermediate properties: moderately hard and also tough,
|
||||||
|
somewhat resistant to corrosion. It is now used for most of the purposes
|
||||||
|
previously satisfied by wrought iron and many of those of cast iron,
|
||||||
|
but has historically been especially important for its use in swords,
|
||||||
|
armour, skyscrapers, large bridges, and machines.
|
||||||
|
|
||||||
|
Historically, the first form of iron to be refined was wrought iron,
|
||||||
|
produced from ore by a low-temperature furnace process in which the
|
||||||
|
ore/iron remains solid and impurities (slag) are progressively removed.
|
||||||
|
Cast iron, by contrast, was produced somewhat later by a high-temperature
|
||||||
|
process in a blast furnace, in which the metal is melted, and carbon is
|
||||||
|
unavoidably incorporated from the furnace's fuel. (In fact, it's done
|
||||||
|
in two stages, first producing pig iron from ore, and then remelting the
|
||||||
|
pig iron to cast as cast iron.) Carbon steel requires a more advanced
|
||||||
|
process, in which molten pig iron is processed to remove the carbon,
|
||||||
|
and then a controlled amount of carbon is explicitly mixed back in.
|
||||||
|
Other processes are possible to refine iron ore and to adjust its
|
||||||
|
carbon content.
|
||||||
|
|
||||||
|
Unfortunately, Minetest doesn't let us readily distinguish between
|
||||||
|
low-temperature and high-temperature processes: in the default game, the
|
||||||
|
same furnace is used both to cook food (low temperature) and to cast metal
|
||||||
|
ingots (varying high temperatures). So we can't sensibly have wrought
|
||||||
|
iron and cast iron produced by different types of furnace. Nor can
|
||||||
|
furnace recipes discriminate by which kind of fuel is used (and thus
|
||||||
|
by the availability of carbon). The alloy furnace allows for explicit
|
||||||
|
alloying, which appropriately represents how carbon steel is made, but
|
||||||
|
is not sensible for the other two, and is a relatively advanced process.
|
||||||
|
About the only option to make a second iron-processing furnace process
|
||||||
|
readily available is to cook multiple times; happily, this bears a slight
|
||||||
|
resemblance to the real process with pig iron as an intermediate product.
|
||||||
|
|
||||||
|
The default mod's refined iron, which it calls "steel", is identified
|
||||||
|
with this mod's wrought iron. Cooking an iron lump (representing ore)
|
||||||
|
initially produces wrought iron; the cooking process here represents a
|
||||||
|
low-temperature bloomery process. Cooking wrought iron then produces
|
||||||
|
cast iron; this time the cooking process represents a blast furnace.
|
||||||
|
Alloy cooking wrought iron with coal dust (carbon) produces carbon steel;
|
||||||
|
this represents the explicit mixing stage of carbon steel production.
|
||||||
|
Additionally, alloy cooking carbon steel with coal dust produces cast
|
||||||
|
iron, which is logical but not very useful. Furthermore, to make it
|
||||||
|
possible to turn any of the forms of iron into any other, cooking carbon
|
||||||
|
steel or cast iron produces wrought iron, in an abbreviated form of the
|
||||||
|
bloomery process. As usual for metals, the same cooking and alloying
|
||||||
|
processes can be performed in parallel forms on ingots or dust.
|
|
@ -100,36 +100,36 @@ minetest.register_craft({
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = 'technic:copper_coil 1',
|
output = 'technic:copper_coil 1',
|
||||||
recipe = {
|
recipe = {
|
||||||
{'technic:fine_copper_wire', 'default:steel_ingot', 'technic:fine_copper_wire'},
|
{'technic:fine_copper_wire', 'technic:wrought_iron_ingot', 'technic:fine_copper_wire'},
|
||||||
{'default:steel_ingot', '', 'default:steel_ingot'},
|
{'technic:wrought_iron_ingot', '', 'technic:wrought_iron_ingot'},
|
||||||
{'technic:fine_copper_wire', 'default:steel_ingot', 'technic:fine_copper_wire'},
|
{'technic:fine_copper_wire', 'technic:wrought_iron_ingot', 'technic:fine_copper_wire'},
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = 'technic:motor',
|
output = 'technic:motor',
|
||||||
recipe = {
|
recipe = {
|
||||||
{'default:steel_ingot', 'technic:copper_coil', 'default:steel_ingot'},
|
{'technic:carbon_steel_ingot', 'technic:copper_coil', 'technic:carbon_steel_ingot'},
|
||||||
{'default:steel_ingot', 'technic:copper_coil', 'default:steel_ingot'},
|
{'technic:carbon_steel_ingot', 'technic:copper_coil', 'technic:carbon_steel_ingot'},
|
||||||
{'default:steel_ingot', 'default:copper_ingot', 'default:steel_ingot'},
|
{'technic:carbon_steel_ingot', 'default:copper_ingot', 'technic:carbon_steel_ingot'},
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = 'technic:lv_transformer',
|
output = 'technic:lv_transformer',
|
||||||
recipe = {
|
recipe = {
|
||||||
{'default:iron_lump', 'default:iron_lump', 'default:iron_lump'},
|
{'technic:wrought_iron_ingot', 'technic:wrought_iron_ingot', 'technic:wrought_iron_ingot'},
|
||||||
{'technic:copper_coil', 'default:iron_lump', 'technic:copper_coil'},
|
{'technic:copper_coil', 'technic:wrought_iron_ingot', 'technic:copper_coil'},
|
||||||
{'default:iron_lump', 'default:iron_lump', 'default:iron_lump'},
|
{'technic:wrought_iron_ingot', 'technic:wrought_iron_ingot', 'technic:wrought_iron_ingot'},
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = 'technic:mv_transformer',
|
output = 'technic:mv_transformer',
|
||||||
recipe = {
|
recipe = {
|
||||||
{'default:steel_ingot', 'default:steel_ingot', 'default:steel_ingot'},
|
{'technic:carbon_steel_ingot', 'technic:carbon_steel_ingot', 'technic:carbon_steel_ingot'},
|
||||||
{'technic:copper_coil', 'default:steel_ingot', 'technic:copper_coil'},
|
{'technic:copper_coil', 'technic:carbon_steel_ingot', 'technic:copper_coil'},
|
||||||
{'default:steel_ingot', 'default:steel_ingot', 'default:steel_ingot'},
|
{'technic:carbon_steel_ingot', 'technic:carbon_steel_ingot', 'technic:carbon_steel_ingot'},
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
@ -24,6 +24,7 @@ technic.legacy_nodenames = {
|
||||||
["technic:mv_battery_box"] = "technic:mv_battery_box0",
|
["technic:mv_battery_box"] = "technic:mv_battery_box0",
|
||||||
["technic:generator"] = "technic:lv_generator",
|
["technic:generator"] = "technic:lv_generator",
|
||||||
["technic:generator_active"] = "technic:lv_generator_active",
|
["technic:generator_active"] = "technic:lv_generator_active",
|
||||||
|
["technic:iron_dust"] = "technic:wrought_iron_dust",
|
||||||
}
|
}
|
||||||
|
|
||||||
for old, new in pairs(technic.legacy_nodenames) do
|
for old, new in pairs(technic.legacy_nodenames) do
|
||||||
|
|
|
@ -36,6 +36,7 @@ Inventory move disallowed due to protection = Das Inventar ist geschuetzt, Zugri
|
||||||
# $1: Machine name (Includes tier)
|
# $1: Machine name (Includes tier)
|
||||||
%s Active = %s ist eingeschaltet
|
%s Active = %s ist eingeschaltet
|
||||||
%s Disabled = %s ist ausgeschaltet
|
%s Disabled = %s ist ausgeschaltet
|
||||||
|
%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
|
||||||
|
@ -135,7 +136,6 @@ Cobble = Pflasterstein:
|
||||||
Dirt = Erde:
|
Dirt = Erde:
|
||||||
Leaves = Laub:
|
Leaves = Laub:
|
||||||
Sandstone = Sandstein:
|
Sandstone = Sandstein:
|
||||||
Steel = Stahl:
|
|
||||||
Stone = Stein:
|
Stone = Stein:
|
||||||
Tree = Baumstamm:
|
Tree = Baumstamm:
|
||||||
Wooden = Holz:
|
Wooden = Holz:
|
||||||
|
@ -148,16 +148,18 @@ Alatro = Alatro
|
||||||
Arol = Arol
|
Arol = Arol
|
||||||
Brass = Messing
|
Brass = Messing
|
||||||
Bronze = Bronze
|
Bronze = Bronze
|
||||||
|
Carbon Steel = Kohlenstoffstahl
|
||||||
|
Cast Iron = Gusseisen
|
||||||
Chromium = Chrom
|
Chromium = Chrom
|
||||||
Coal = Kohle
|
Coal = Kohle
|
||||||
Copper = Kupfer
|
Copper = Kupfer
|
||||||
Gold = Gold
|
Gold = Gold
|
||||||
Iron = Eisen
|
|
||||||
Mithril = Mithril
|
Mithril = Mithril
|
||||||
Silver = Silber
|
Silver = Silber
|
||||||
Stainless Steel = Edelstahl
|
Stainless Steel = Edelstahl
|
||||||
Talinite = Talinite
|
Talinite = Talinite
|
||||||
Tin = Zinn
|
Tin = Zinn
|
||||||
|
Wrought Iron = Schmiedeeisen
|
||||||
Zinc = Zink
|
Zinc = Zink
|
||||||
|
|
||||||
## Tools
|
## Tools
|
||||||
|
|
|
@ -35,6 +35,7 @@ Machine cannot be removed because it is not empty = La maquina no puede removers
|
||||||
Inventory move disallowed due to protection =
|
Inventory move disallowed due to protection =
|
||||||
# $1: Machine name (Includes tier)
|
# $1: Machine name (Includes tier)
|
||||||
%s Active = %s Activo
|
%s Active = %s Activo
|
||||||
|
%s Enabled =
|
||||||
%s Idle = %s Quieto
|
%s Idle = %s Quieto
|
||||||
%s Unpowered = %s Sin Energia
|
%s Unpowered = %s Sin Energia
|
||||||
%s Out Of Fuel = %s Sin Combustible
|
%s Out Of Fuel = %s Sin Combustible
|
||||||
|
@ -121,7 +122,6 @@ Slope Edge = Borde de Rampa
|
||||||
Slope = Rampa
|
Slope = Rampa
|
||||||
Element T = Elemento T
|
Element T = Elemento T
|
||||||
Cylinder = Cilindro
|
Cylinder = Cilindro
|
||||||
Steel = Acero
|
|
||||||
Cobble = Adoquines
|
Cobble = Adoquines
|
||||||
Stone = Piedra
|
Stone = Piedra
|
||||||
Brick = Ladrillo
|
Brick = Ladrillo
|
||||||
|
@ -138,16 +138,18 @@ Alatro = Alatro
|
||||||
Arol = Arol
|
Arol = Arol
|
||||||
Brass = Laton
|
Brass = Laton
|
||||||
Bronze = Bronce
|
Bronze = Bronce
|
||||||
|
Carbon Steel = Acero al Carbono
|
||||||
|
Cast Iron = Hierro Fundido
|
||||||
Chromium = Cromo
|
Chromium = Cromo
|
||||||
Coal = Carbon
|
Coal = Carbon
|
||||||
Copper = Cobre
|
Copper = Cobre
|
||||||
Gold = Oro
|
Gold = Oro
|
||||||
Iron = Hierro
|
|
||||||
Mithril = Mitrilo
|
Mithril = Mitrilo
|
||||||
Silver = Plata
|
Silver = Plata
|
||||||
Stainless Steel = Acero Inoxidable
|
Stainless Steel = Acero Inoxidable
|
||||||
Talinite = Talinita
|
Talinite = Talinita
|
||||||
Tin = Estanio
|
Tin = Estanio
|
||||||
|
Wrought Iron = Hierro Forjado
|
||||||
Zinc = Zinc
|
Zinc = Zinc
|
||||||
|
|
||||||
## Tools
|
## Tools
|
||||||
|
|
|
@ -33,6 +33,7 @@ Inventory move disallowed due to protection = Impossibile muovere l'inventario a
|
||||||
# $1: Machine name (Includes tier)
|
# $1: Machine name (Includes tier)
|
||||||
%s Active = %s Attivo
|
%s Active = %s Attivo
|
||||||
%s Disabled = %s Disabilitato
|
%s Disabled = %s Disabilitato
|
||||||
|
%s Enabled =
|
||||||
%s Idle = %s Inattivo
|
%s Idle = %s Inattivo
|
||||||
%s Improperly Placed = %s Piazzato impropiamente
|
%s Improperly Placed = %s Piazzato impropiamente
|
||||||
%s Unpowered = %s Non alimentato
|
%s Unpowered = %s Non alimentato
|
||||||
|
@ -132,7 +133,6 @@ Cobble = Ciottolato
|
||||||
Dirt = Terra
|
Dirt = Terra
|
||||||
Leaves = Foglie
|
Leaves = Foglie
|
||||||
Sandstone = Arenaria
|
Sandstone = Arenaria
|
||||||
Steel = Acciaio
|
|
||||||
Stone = Pietra
|
Stone = Pietra
|
||||||
Tree = Albero
|
Tree = Albero
|
||||||
Wooden = Legno
|
Wooden = Legno
|
||||||
|
@ -145,16 +145,18 @@ Alatro = Alatro
|
||||||
Arol = Arol
|
Arol = Arol
|
||||||
Brass = Ottone
|
Brass = Ottone
|
||||||
Bronze = Bronzo
|
Bronze = Bronzo
|
||||||
|
Carbon Steel = Acciaio al Carbonio
|
||||||
|
Cast Iron = Ghisa
|
||||||
Chromium = Cromo
|
Chromium = Cromo
|
||||||
Coal = Carbone
|
Coal = Carbone
|
||||||
Copper = Rame
|
Copper = Rame
|
||||||
Gold = Oro
|
Gold = Oro
|
||||||
Iron = Ferro
|
|
||||||
Mithril = Mithril
|
Mithril = Mithril
|
||||||
Silver = Argento
|
Silver = Argento
|
||||||
Stainless Steel = Acciaio Inossidabile
|
Stainless Steel = Acciaio Inossidabile
|
||||||
Talinite = Talinite
|
Talinite = Talinite
|
||||||
Tin = Stagno
|
Tin = Stagno
|
||||||
|
Wrought Iron = Ferro Battuto
|
||||||
Zinc = Zinco
|
Zinc = Zinco
|
||||||
|
|
||||||
## Tools
|
## Tools
|
||||||
|
|
|
@ -36,6 +36,7 @@ Inventory move disallowed due to protection =
|
||||||
# $1: Machine name (Includes tier)
|
# $1: Machine name (Includes tier)
|
||||||
%s Active =
|
%s Active =
|
||||||
%s Disabled =
|
%s Disabled =
|
||||||
|
%s Enabled =
|
||||||
%s Idle =
|
%s Idle =
|
||||||
%s Improperly Placed =
|
%s Improperly Placed =
|
||||||
%s Unpowered =
|
%s Unpowered =
|
||||||
|
@ -135,7 +136,6 @@ Cobble =
|
||||||
Dirt =
|
Dirt =
|
||||||
Leaves =
|
Leaves =
|
||||||
Sandstone =
|
Sandstone =
|
||||||
Steel =
|
|
||||||
Stone =
|
Stone =
|
||||||
Tree =
|
Tree =
|
||||||
Wooden =
|
Wooden =
|
||||||
|
@ -148,16 +148,18 @@ Alatro =
|
||||||
Arol =
|
Arol =
|
||||||
Brass =
|
Brass =
|
||||||
Bronze =
|
Bronze =
|
||||||
|
Carbon Steel =
|
||||||
|
Cast Iron =
|
||||||
Chromium =
|
Chromium =
|
||||||
Coal =
|
Coal =
|
||||||
Copper =
|
Copper =
|
||||||
Gold =
|
Gold =
|
||||||
Iron =
|
|
||||||
Mithril =
|
Mithril =
|
||||||
Silver =
|
Silver =
|
||||||
Stainless Steel =
|
Stainless Steel =
|
||||||
Talinite =
|
Talinite =
|
||||||
Tin =
|
Tin =
|
||||||
|
Wrought Iron =
|
||||||
Zinc =
|
Zinc =
|
||||||
|
|
||||||
## Tools
|
## Tools
|
||||||
|
|
|
@ -15,5 +15,7 @@ technic.register_battery_box({
|
||||||
discharge_rate = 400000,
|
discharge_rate = 400000,
|
||||||
charge_step = 10000,
|
charge_step = 10000,
|
||||||
discharge_step = 40000,
|
discharge_step = 40000,
|
||||||
|
upgrade = 1,
|
||||||
|
tube = 1,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
@ -3,41 +3,37 @@ local S = technic.getter
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
recipe = {
|
recipe = {
|
||||||
{"default:steelblock", "pipeworks:filter", "default:steelblock"},
|
{"technic:carbon_steel_block", "pipeworks:filter", "technic:carbon_steel_block"},
|
||||||
{"default:steelblock", "technic:motor", "default:steelblock"},
|
{"technic:carbon_steel_block", "technic:motor", "technic:carbon_steel_block"},
|
||||||
{"default:steelblock", "technic:diamond_drill_head", "default:steelblock"}},
|
{"technic:carbon_steel_block", "technic:diamond_drill_head", "technic:carbon_steel_block"}},
|
||||||
output = "technic:quarry",
|
output = "technic:quarry",
|
||||||
})
|
})
|
||||||
|
|
||||||
local quarry_dig_above_nodes = 3 -- How far above the quarry we will dig nodes
|
local quarry_dig_above_nodes = 3 -- How far above the quarry we will dig nodes
|
||||||
local quarry_max_depth = 100
|
local quarry_max_depth = 100
|
||||||
|
|
||||||
local function get_quarry_formspec(size)
|
local function set_quarry_formspec(meta)
|
||||||
return "size[3,1.5]"..
|
local formspec = "size[3,1.5]"..
|
||||||
"field[1,0.5;2,1;size;Radius;"..size.."]"..
|
"field[1,0.5;2,1;size;Radius;"..meta:get_int("size").."]"
|
||||||
"button[0,1;3,1;toggle;"..S("Enable/Disable").."]"
|
if meta:get_int("enabled") == 0 then
|
||||||
|
formspec = formspec.."button[0,1;3,1;enable;"..S("%s Disabled"):format(S("Quarry")).."]"
|
||||||
|
else
|
||||||
|
formspec = formspec.."button[0,1;3,1;disable;"..S("%s Enabled"):format(S("Quarry")).."]"
|
||||||
|
end
|
||||||
|
meta:set_string("formspec", formspec)
|
||||||
end
|
end
|
||||||
|
|
||||||
local function quarry_receive_fields(pos, formname, fields, sender)
|
local function quarry_receive_fields(pos, formname, fields, sender)
|
||||||
local meta = minetest.get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
local size = tonumber(fields.size) or 0
|
if fields.size then
|
||||||
|
local size = tonumber(fields.size) or 0
|
||||||
if fields.toggle then
|
size = math.max(size, 2)
|
||||||
if meta:get_int("enabled") == 0 then
|
size = math.min(size, 8)
|
||||||
meta:set_int("enabled", 1)
|
|
||||||
else
|
|
||||||
meta:set_int("enabled", 0)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Smallest size is 2. Largest is 8.
|
|
||||||
size = math.max(size, 2)
|
|
||||||
size = math.min(size, 8)
|
|
||||||
|
|
||||||
if meta:get_int("size") ~= size then
|
|
||||||
meta:set_int("size", size)
|
meta:set_int("size", size)
|
||||||
meta:set_string("formspec", get_quarry_formspec(size))
|
|
||||||
end
|
end
|
||||||
|
if fields.enable then meta:set_int("enabled", 1) end
|
||||||
|
if fields.disable then meta:set_int("enabled", 0) end
|
||||||
|
set_quarry_formspec(meta)
|
||||||
end
|
end
|
||||||
|
|
||||||
local function get_quarry_center(pos, size)
|
local function get_quarry_center(pos, size)
|
||||||
|
@ -103,19 +99,15 @@ local function quarry_dig(pos, center, size)
|
||||||
end
|
end
|
||||||
if minetest.is_protected and minetest.is_protected(digpos, owner) then
|
if minetest.is_protected and minetest.is_protected(digpos, owner) then
|
||||||
meta:set_int("enabled", 0)
|
meta:set_int("enabled", 0)
|
||||||
|
set_quarry_formspec(meta)
|
||||||
return {}
|
return {}
|
||||||
end
|
end
|
||||||
dig_y = digpos.y
|
dig_y = digpos.y
|
||||||
local node = minetest.get_node(digpos)
|
local node = minetest.get_node(digpos)
|
||||||
drops = minetest.get_node_drops(node.name, "")
|
local node_def = minetest.registered_nodes[node.name] or { diggable = false }
|
||||||
minetest.dig_node(digpos)
|
if node_def.diggable and ((not node_def.can_dig) or node_def.can_dig(digpos, nil)) then
|
||||||
if minetest.get_node(digpos).name == node.name then
|
minetest.remove_node(digpos)
|
||||||
-- We tried to dig something undigable like a
|
drops = minetest.get_node_drops(node.name, "")
|
||||||
-- filled chest. Notice that we check for a node
|
|
||||||
-- change, not for air. This is so that we get drops
|
|
||||||
-- from things like concrete posts with platforms,
|
|
||||||
-- which turn into regular concrete posts when dug.
|
|
||||||
drops = {}
|
|
||||||
end
|
end
|
||||||
elseif not (dig_y < pos.y - quarry_max_depth) then
|
elseif not (dig_y < pos.y - quarry_max_depth) then
|
||||||
dig_y = dig_y - 16
|
dig_y = dig_y - 16
|
||||||
|
@ -136,20 +128,19 @@ end
|
||||||
|
|
||||||
minetest.register_node("technic:quarry", {
|
minetest.register_node("technic:quarry", {
|
||||||
description = S("Quarry"),
|
description = S("Quarry"),
|
||||||
tiles = {"default_steel_block.png", "default_steel_block.png",
|
tiles = {"technic_carbon_steel_block.png", "technic_carbon_steel_block.png",
|
||||||
"default_steel_block.png", "default_steel_block.png",
|
"technic_carbon_steel_block.png", "technic_carbon_steel_block.png",
|
||||||
"default_steel_block.png^default_tool_mesepick.png", "default_steel_block.png"},
|
"technic_carbon_steel_block.png^default_tool_mesepick.png", "technic_carbon_steel_block.png"},
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
groups = {cracky=2, tubedevice=1},
|
groups = {cracky=2, tubedevice=1},
|
||||||
tube = {
|
tube = {
|
||||||
connect_sides = {top = 1},
|
connect_sides = {top = 1},
|
||||||
},
|
},
|
||||||
on_construct = function(pos)
|
on_construct = function(pos)
|
||||||
local size = 4
|
|
||||||
local meta = minetest.get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
meta:set_string("infotext", S("Quarry"))
|
meta:set_string("infotext", S("Quarry"))
|
||||||
meta:set_string("formspec", get_quarry_formspec(4))
|
meta:set_int("size", 4)
|
||||||
meta:set_int("size", size)
|
set_quarry_formspec(meta)
|
||||||
meta:set_int("dig_y", pos.y)
|
meta:set_int("dig_y", pos.y)
|
||||||
end,
|
end,
|
||||||
after_place_node = function(pos, placer, itemstack)
|
after_place_node = function(pos, placer, itemstack)
|
||||||
|
|
|
@ -4,9 +4,9 @@
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = 'technic:solar_array_hv 1',
|
output = 'technic:solar_array_hv 1',
|
||||||
recipe = {
|
recipe = {
|
||||||
{'technic:solar_array_mv', 'technic:solar_array_mv', 'technic:solar_array_mv'},
|
{'technic:solar_array_mv', 'technic:solar_array_mv', 'technic:solar_array_mv'},
|
||||||
{'default:steel_ingot', 'technic:hv_transformer', 'default:steel_ingot'},
|
{'technic:carbon_steel_ingot', 'technic:hv_transformer', 'technic:carbon_steel_ingot'},
|
||||||
{'', 'technic:hv_cable0', ''},
|
{'', 'technic:hv_cable0', ''},
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
@ -4,9 +4,9 @@
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = 'technic:lv_alloy_furnace',
|
output = 'technic:lv_alloy_furnace',
|
||||||
recipe = {
|
recipe = {
|
||||||
{'default:brick', 'default:brick', 'default:brick'},
|
{'default:brick', 'default:brick', 'default:brick'},
|
||||||
{'default:brick', '', 'default:brick'},
|
{'default:brick', '', 'default:brick'},
|
||||||
{'default:steel_ingot', 'default:copper_ingot', 'default:steel_ingot'},
|
{'technic:cast_iron_ingot', 'default:copper_ingot', 'technic:cast_iron_ingot'},
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = 'technic:lv_battery_box0',
|
output = 'technic:lv_battery_box0',
|
||||||
recipe = {
|
recipe = {
|
||||||
{'technic:battery', 'group:wood', 'technic:battery'},
|
{'technic:battery', 'group:wood', 'technic:battery'},
|
||||||
{'technic:battery', 'default:copper_ingot', 'technic:battery'},
|
{'technic:battery', 'default:copper_ingot', 'technic:battery'},
|
||||||
{'default:steel_ingot', 'default:steel_ingot', 'default:steel_ingot'},
|
{'technic:cast_iron_ingot', 'technic:cast_iron_ingot', 'technic:cast_iron_ingot'},
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
@ -229,8 +229,8 @@ minetest.register_craft({
|
||||||
output = 'technic:cnc',
|
output = 'technic:cnc',
|
||||||
recipe = {
|
recipe = {
|
||||||
{'default:glass', 'technic:diamond_drill_head', 'default:glass'},
|
{'default:glass', 'technic:diamond_drill_head', 'default:glass'},
|
||||||
{'technic:control_logic_unit', 'technic:motor', 'default:steel_ingot'},
|
{'technic:control_logic_unit', 'technic:motor', 'technic:carbon_steel_ingot'},
|
||||||
{'default:steel_ingot', 'default:copper_ingot', 'default:steel_ingot'},
|
{'technic:carbon_steel_ingot', 'default:copper_ingot', 'technic:carbon_steel_ingot'},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
@ -58,12 +58,13 @@ technic.cnc.register_all("default:tree",
|
||||||
{snappy=1, choppy=2, oddly_breakable_by_hand=2, flammable=3, wood=1, not_in_creative_inventory=1},
|
{snappy=1, choppy=2, oddly_breakable_by_hand=2, flammable=3, wood=1, not_in_creative_inventory=1},
|
||||||
{"default_tree.png"},
|
{"default_tree.png"},
|
||||||
S("Tree"))
|
S("Tree"))
|
||||||
-- STEEL
|
|
||||||
--------
|
-- WROUGHT IRON
|
||||||
|
---------------
|
||||||
technic.cnc.register_all("default:steelblock",
|
technic.cnc.register_all("default:steelblock",
|
||||||
{cracky=1, level=2, not_in_creative_inventory=1},
|
{cracky=1, level=2, not_in_creative_inventory=1},
|
||||||
{"default_steel_block.png"},
|
{"technic_wrought_iron_block.png"},
|
||||||
S("Steel"))
|
S("Wrought Iron"))
|
||||||
|
|
||||||
-- Bronze
|
-- Bronze
|
||||||
--------
|
--------
|
||||||
|
|
|
@ -5,9 +5,9 @@
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = 'technic:electric_furnace',
|
output = 'technic:electric_furnace',
|
||||||
recipe = {
|
recipe = {
|
||||||
{'default:cobble', 'default:cobble', 'default:cobble'},
|
{'default:cobble', 'default:cobble', 'default:cobble'},
|
||||||
{'default:cobble', '', 'default:cobble'},
|
{'default:cobble', '', 'default:cobble'},
|
||||||
{'default:steel_ingot', 'moreores:copper_ingot', 'default:steel_ingot'},
|
{'technic:cast_iron_ingot', 'moreores:copper_ingot', 'technic:cast_iron_ingot'},
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
@ -8,9 +8,9 @@
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = 'technic:solar_array_lv 1',
|
output = 'technic:solar_array_lv 1',
|
||||||
recipe = {
|
recipe = {
|
||||||
{'technic:solar_panel', 'technic:solar_panel', 'technic:solar_panel'},
|
{'technic:solar_panel', 'technic:solar_panel', 'technic:solar_panel'},
|
||||||
{'default:steel_ingot', 'technic:lv_transformer', 'default:steel_ingot'},
|
{'technic:carbon_steel_ingot', 'technic:lv_transformer', 'technic:carbon_steel_ingot'},
|
||||||
{'', 'technic:lv_cable0', ''},
|
{'', 'technic:lv_cable0', ''},
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,7 @@ 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'},
|
||||||
{'default:steel_ingot', 'technic:lv_cable0', 'default:steel_ingot'},
|
{'technic:wrought_iron_ingot', 'technic:lv_cable0', 'technic:wrought_iron_ingot'},
|
||||||
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
@ -16,5 +16,7 @@ technic.register_battery_box({
|
||||||
discharge_rate = 80000,
|
discharge_rate = 80000,
|
||||||
charge_step = 2000,
|
charge_step = 2000,
|
||||||
discharge_step = 8000,
|
discharge_step = 8000,
|
||||||
|
upgrade = 1,
|
||||||
|
tube = 1,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = 'technic:solar_array_mv 1',
|
output = 'technic:solar_array_mv 1',
|
||||||
recipe = {
|
recipe = {
|
||||||
{'technic:solar_array_lv', 'technic:solar_array_lv', 'technic:solar_array_lv'},
|
{'technic:solar_array_lv', 'technic:solar_array_lv', 'technic:solar_array_lv'},
|
||||||
{'default:steel_ingot', 'technic:mv_transformer', 'default:steel_ingot'},
|
{'technic:carbon_steel_ingot', 'technic:mv_transformer', 'technic:carbon_steel_ingot'},
|
||||||
{'', 'technic:mv_cable0', ''},
|
{'', 'technic:mv_cable0', ''},
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
@ -4,25 +4,25 @@ local S = technic.getter
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = 'technic:wind_mill_frame 5',
|
output = 'technic:wind_mill_frame 5',
|
||||||
recipe = {
|
recipe = {
|
||||||
{'default:steel_ingot', '', 'default:steel_ingot'},
|
{'technic:carbon_steel_ingot', '', 'technic:carbon_steel_ingot'},
|
||||||
{'', 'default:steel_ingot', ''},
|
{'', 'technic:carbon_steel_ingot', ''},
|
||||||
{'default:steel_ingot', '', 'default:steel_ingot'},
|
{'technic:carbon_steel_ingot', '', 'technic:carbon_steel_ingot'},
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = 'technic:wind_mill',
|
output = 'technic:wind_mill',
|
||||||
recipe = {
|
recipe = {
|
||||||
{'', 'default:steel_ingot', ''},
|
{'', 'technic:carbon_steel_ingot', ''},
|
||||||
{'default:steel_ingot', 'technic:motor', 'default:steel_ingot'},
|
{'technic:carbon_steel_ingot', 'technic:motor', 'technic:carbon_steel_ingot'},
|
||||||
{'', 'default:steelblock', ''},
|
{'', 'technic:carbon_steel_block', ''},
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("technic:wind_mill_frame", {
|
minetest.register_node("technic:wind_mill_frame", {
|
||||||
description = S("Wind Mill Frame"),
|
description = S("Wind Mill Frame"),
|
||||||
drawtype = "glasslike_framed",
|
drawtype = "glasslike_framed",
|
||||||
tiles = {"default_steel_block.png", "default_glass.png"},
|
tiles = {"technic_carbon_steel_block.png", "default_glass.png"},
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
groups = {cracky=3},
|
groups = {cracky=3},
|
||||||
sounds = default.node_sound_stone_defaults(),
|
sounds = default.node_sound_stone_defaults(),
|
||||||
|
@ -31,7 +31,7 @@ minetest.register_node("technic:wind_mill_frame", {
|
||||||
|
|
||||||
minetest.register_node("technic:wind_mill", {
|
minetest.register_node("technic:wind_mill", {
|
||||||
description = S("Wind Mill"),
|
description = S("Wind Mill"),
|
||||||
tiles = {"default_steel_block.png"},
|
tiles = {"technic_carbon_steel_block.png"},
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
groups = {cracky=1},
|
groups = {cracky=1},
|
||||||
sounds = default.node_sound_stone_defaults(),
|
sounds = default.node_sound_stone_defaults(),
|
||||||
|
|
|
@ -45,6 +45,36 @@ technic.register_alloy_recipe = function(metal1, count1, metal2, count2, result,
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
minetest.after(0.01, function ()
|
||||||
|
for _, recipe in pairs(technic.alloy_recipes) do
|
||||||
|
local in1 = recipe.input[1]
|
||||||
|
local in2 = recipe.input[2]
|
||||||
|
local in1n = in1.name
|
||||||
|
local in2n = in2.name
|
||||||
|
while minetest.registered_aliases[in1n] do
|
||||||
|
in1n = minetest.registered_aliases[in1n]
|
||||||
|
end
|
||||||
|
while minetest.registered_aliases[in2n] do
|
||||||
|
in2n = minetest.registered_aliases[in2n]
|
||||||
|
end
|
||||||
|
if in1n > in2n then
|
||||||
|
local temp = in1
|
||||||
|
in1 = in2
|
||||||
|
in2 = temp
|
||||||
|
temp = in1n
|
||||||
|
in1n = in2n
|
||||||
|
in2n = temp
|
||||||
|
end
|
||||||
|
technic.alloy_recipes[in1n.." "..in2n] = {
|
||||||
|
input = {
|
||||||
|
{ name = in1n, count = in1.count },
|
||||||
|
{ name = in2n, count = in2.count },
|
||||||
|
},
|
||||||
|
output = recipe.output,
|
||||||
|
}
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
|
||||||
-- Retrieve a recipe given the input metals.
|
-- Retrieve a recipe given the input metals.
|
||||||
function technic.get_alloy_recipe(stack1, stack2)
|
function technic.get_alloy_recipe(stack1, stack2)
|
||||||
-- Sort the stacks alphebetically
|
-- Sort the stacks alphebetically
|
||||||
|
@ -65,8 +95,12 @@ end
|
||||||
|
|
||||||
technic.register_alloy_recipe("technic:copper_dust", 3, "technic:tin_dust", 1, "technic:bronze_dust", 4)
|
technic.register_alloy_recipe("technic:copper_dust", 3, "technic:tin_dust", 1, "technic:bronze_dust", 4)
|
||||||
technic.register_alloy_recipe("default:copper_ingot", 3, "moreores:tin_ingot", 1, "moreores:bronze_ingot", 4)
|
technic.register_alloy_recipe("default:copper_ingot", 3, "moreores:tin_ingot", 1, "moreores:bronze_ingot", 4)
|
||||||
technic.register_alloy_recipe("technic:iron_dust", 3, "technic:chromium_dust", 1, "technic:stainless_steel_dust", 4)
|
technic.register_alloy_recipe("technic:wrought_iron_dust", 1, "technic:coal_dust", 1, "technic:carbon_steel_dust", 1)
|
||||||
technic.register_alloy_recipe("default:steel_ingot", 3, "technic:chromium_ingot", 1, "technic:stainless_steel_ingot", 4)
|
technic.register_alloy_recipe("technic:wrought_iron_ingot", 1, "technic:coal_dust", 1, "technic:carbon_steel_ingot", 1)
|
||||||
|
technic.register_alloy_recipe("technic:carbon_steel_dust", 1, "technic:coal_dust", 1, "technic:cast_iron_dust", 1)
|
||||||
|
technic.register_alloy_recipe("technic:carbon_steel_ingot", 1, "technic:coal_dust", 1, "technic:cast_iron_ingot", 1)
|
||||||
|
technic.register_alloy_recipe("technic:carbon_steel_dust", 3, "technic:chromium_dust", 1, "technic:stainless_steel_dust", 4)
|
||||||
|
technic.register_alloy_recipe("technic:carbon_steel_ingot", 3, "technic:chromium_ingot", 1, "technic:stainless_steel_ingot", 4)
|
||||||
technic.register_alloy_recipe("technic:copper_dust", 2, "technic:zinc_dust", 1, "technic:brass_dust", 3)
|
technic.register_alloy_recipe("technic:copper_dust", 2, "technic:zinc_dust", 1, "technic:brass_dust", 3)
|
||||||
technic.register_alloy_recipe("default:copper_ingot", 2, "technic:zinc_ingot", 1, "technic:brass_ingot", 3)
|
technic.register_alloy_recipe("default:copper_ingot", 2, "technic:zinc_ingot", 1, "technic:brass_ingot", 3)
|
||||||
technic.register_alloy_recipe("default:sand", 2, "technic:coal_dust", 2, "technic:silicon_wafer", 1)
|
technic.register_alloy_recipe("default:sand", 2, "technic:coal_dust", 2, "technic:silicon_wafer", 1)
|
||||||
|
|
|
@ -29,6 +29,33 @@ minetest.register_tool("technic:battery", {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
local tube = {
|
||||||
|
insert_object = function(pos, node, stack, direction)
|
||||||
|
if direction.y == 0 then
|
||||||
|
return stack
|
||||||
|
end
|
||||||
|
local meta = minetest.get_meta(pos)
|
||||||
|
local inv = meta:get_inventory()
|
||||||
|
if direction.y > 0 then
|
||||||
|
return inv:add_item("src", stack)
|
||||||
|
else
|
||||||
|
return inv:add_item("dst", stack)
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
can_insert = function(pos, node, stack, direction)
|
||||||
|
if direction.y == 0 then
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
local meta = minetest.get_meta(pos)
|
||||||
|
local inv = meta:get_inventory()
|
||||||
|
if direction.y > 0 then
|
||||||
|
return inv:room_for_item("src", stack)
|
||||||
|
else
|
||||||
|
return inv:room_for_item("dst", stack)
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
connect_sides = {left=1, right=1, back=1, top=1, bottom=1},
|
||||||
|
}
|
||||||
|
|
||||||
function technic.register_battery_box(data)
|
function technic.register_battery_box(data)
|
||||||
local tier = data.tier
|
local tier = data.tier
|
||||||
|
@ -45,12 +72,25 @@ function technic.register_battery_box(data)
|
||||||
"label[5,0;"..S("Discharge").."]"..
|
"label[5,0;"..S("Discharge").."]"..
|
||||||
"label[1,3;"..S("Power level").."]"..
|
"label[1,3;"..S("Power level").."]"..
|
||||||
"list[current_player;main;0,5;8,4;]"
|
"list[current_player;main;0,5;8,4;]"
|
||||||
|
|
||||||
|
if data.upgrade then
|
||||||
|
formspec = formspec..
|
||||||
|
"list[current_name;upgrade1;3.5,3;1,1;]"..
|
||||||
|
"list[current_name;upgrade2;4.5,3;1,1;]"..
|
||||||
|
"label[3.5,4;"..S("Upgrade Slots").."]"
|
||||||
|
end
|
||||||
|
|
||||||
for i = 0, 8 do
|
for i = 0, 8 do
|
||||||
local groups = {snappy=2, choppy=2, oddly_breakable_by_hand=2}
|
local groups = {snappy=2, choppy=2, oddly_breakable_by_hand=2}
|
||||||
if i ~= 0 then
|
if i ~= 0 then
|
||||||
groups.not_in_creative_inventory = 1
|
groups.not_in_creative_inventory = 1
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if data.tube then
|
||||||
|
groups.tubedevice = 1
|
||||||
|
groups.tubedevice_receiver = 1
|
||||||
|
end
|
||||||
|
|
||||||
minetest.register_node("technic:"..ltier.."_battery_box"..i, {
|
minetest.register_node("technic:"..ltier.."_battery_box"..i, {
|
||||||
description = S("%s Battery Box"):format(tier),
|
description = S("%s Battery Box"):format(tier),
|
||||||
tiles = {"technic_"..ltier.."_battery_box_top.png",
|
tiles = {"technic_"..ltier.."_battery_box_top.png",
|
||||||
|
@ -60,6 +100,8 @@ function technic.register_battery_box(data)
|
||||||
"technic_"..ltier.."_battery_box_side.png^technic_power_meter"..i..".png",
|
"technic_"..ltier.."_battery_box_side.png^technic_power_meter"..i..".png",
|
||||||
"technic_"..ltier.."_battery_box_side.png^technic_power_meter"..i..".png"},
|
"technic_"..ltier.."_battery_box_side.png^technic_power_meter"..i..".png"},
|
||||||
groups = groups,
|
groups = groups,
|
||||||
|
tube = data.tube and tube or nil,
|
||||||
|
paramtype2 = "facedir",
|
||||||
sounds = default.node_sound_wood_defaults(),
|
sounds = default.node_sound_wood_defaults(),
|
||||||
drop = "technic:"..ltier.."_battery_box0",
|
drop = "technic:"..ltier.."_battery_box0",
|
||||||
on_construct = function(pos)
|
on_construct = function(pos)
|
||||||
|
@ -75,6 +117,8 @@ function technic.register_battery_box(data)
|
||||||
meta:set_float("internal_EU_charge", 0)
|
meta:set_float("internal_EU_charge", 0)
|
||||||
inv:set_size("src", 1)
|
inv:set_size("src", 1)
|
||||||
inv:set_size("dst", 1)
|
inv:set_size("dst", 1)
|
||||||
|
inv:set_size("upgrade1", 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,
|
||||||
|
@ -100,30 +144,49 @@ function technic.register_battery_box(data)
|
||||||
-- Power off automatically if no longer connected to a switching station
|
-- Power off automatically if no longer connected to a switching station
|
||||||
technic.switching_station_timeout_count(pos, tier)
|
technic.switching_station_timeout_count(pos, tier)
|
||||||
|
|
||||||
|
local EU_upgrade, tube_upgrade = 0, 0
|
||||||
|
if data.upgrade then
|
||||||
|
EU_upgrade, tube_upgrade = technic.handle_machine_upgrades(meta)
|
||||||
|
end
|
||||||
|
local max_charge = data.max_charge * (1 + EU_upgrade / 10)
|
||||||
|
|
||||||
-- Charge/discharge the battery with the input EUs
|
-- Charge/discharge the battery with the input EUs
|
||||||
if eu_input >= 0 then
|
if eu_input >= 0 then
|
||||||
current_charge = math.min(current_charge + eu_input, data.max_charge)
|
current_charge = math.min(current_charge + eu_input, max_charge)
|
||||||
else
|
else
|
||||||
current_charge = math.max(current_charge + eu_input, 0)
|
current_charge = math.max(current_charge + eu_input, 0)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Charging/discharging tools here
|
-- Charging/discharging tools here
|
||||||
current_charge = technic.charge_tools(meta,
|
local tool_full, tool_empty
|
||||||
|
current_charge, tool_full = technic.charge_tools(meta,
|
||||||
current_charge, data.charge_step)
|
current_charge, data.charge_step)
|
||||||
current_charge = technic.discharge_tools(meta,
|
current_charge, tool_empty = technic.discharge_tools(meta,
|
||||||
current_charge, data.discharge_step,
|
current_charge, data.discharge_step,
|
||||||
data.max_charge)
|
max_charge)
|
||||||
|
|
||||||
|
if data.tube then
|
||||||
|
local inv = meta:get_inventory()
|
||||||
|
technic.handle_machine_pipeworks(pos, tube_upgrade,
|
||||||
|
function(pos, x_velocity, z_velocity)
|
||||||
|
if tool_full and not inv:is_empty("src") then
|
||||||
|
technic.send_items(pos, x_velocity, z_velocity, "src")
|
||||||
|
elseif tool_empty and not inv:is_empty("dst") then
|
||||||
|
technic.send_items(pos, x_velocity, z_velocity, "dst")
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
|
||||||
-- We allow batteries to charge on less than the demand
|
-- We allow batteries to charge on less than the demand
|
||||||
meta:set_int(tier.."_EU_demand",
|
meta:set_int(tier.."_EU_demand",
|
||||||
math.min(data.charge_rate, data.max_charge - current_charge))
|
math.min(data.charge_rate, max_charge - current_charge))
|
||||||
meta:set_int(tier.."_EU_supply",
|
meta:set_int(tier.."_EU_supply",
|
||||||
math.min(data.discharge_rate, current_charge))
|
math.min(data.discharge_rate, current_charge))
|
||||||
|
|
||||||
meta:set_int("internal_EU_charge", current_charge)
|
meta:set_int("internal_EU_charge", current_charge)
|
||||||
|
|
||||||
-- Select node textures
|
-- Select node textures
|
||||||
local charge_count = math.ceil((current_charge / data.max_charge) * 8)
|
local charge_count = math.ceil((current_charge / max_charge) * 8)
|
||||||
charge_count = math.min(charge_count, 8)
|
charge_count = math.min(charge_count, 8)
|
||||||
charge_count = math.max(charge_count, 0)
|
charge_count = math.max(charge_count, 0)
|
||||||
local last_count = meta:get_float("last_side_shown")
|
local last_count = meta:get_float("last_side_shown")
|
||||||
|
@ -132,7 +195,7 @@ function technic.register_battery_box(data)
|
||||||
meta:set_float("last_side_shown", charge_count)
|
meta:set_float("last_side_shown", charge_count)
|
||||||
end
|
end
|
||||||
|
|
||||||
local charge_percent = math.floor(current_charge / data.max_charge * 100)
|
local charge_percent = math.floor(current_charge / max_charge * 100)
|
||||||
meta:set_string("formspec",
|
meta:set_string("formspec",
|
||||||
formspec..
|
formspec..
|
||||||
"image[1,1;1,2;technic_power_meter_bg.png"
|
"image[1,1;1,2;technic_power_meter_bg.png"
|
||||||
|
@ -140,7 +203,7 @@ function technic.register_battery_box(data)
|
||||||
..":technic_power_meter_fg.png]")
|
..":technic_power_meter_fg.png]")
|
||||||
|
|
||||||
local infotext = S("%s Battery Box: %d/%d"):format(tier,
|
local infotext = S("%s Battery Box: %d/%d"):format(tier,
|
||||||
current_charge, data.max_charge)
|
current_charge, max_charge)
|
||||||
if eu_input == 0 then
|
if eu_input == 0 then
|
||||||
infotext = S("%s Idle"):format(infotext)
|
infotext = S("%s Idle"):format(infotext)
|
||||||
end
|
end
|
||||||
|
@ -160,14 +223,13 @@ end -- End registration
|
||||||
function technic.charge_tools(meta, batt_charge, charge_step)
|
function technic.charge_tools(meta, batt_charge, charge_step)
|
||||||
local inv = meta:get_inventory()
|
local inv = meta:get_inventory()
|
||||||
if inv:is_empty("src") then
|
if inv:is_empty("src") then
|
||||||
return batt_charge
|
return batt_charge, false
|
||||||
end
|
end
|
||||||
local srcstack = inv:get_stack("src", 1)
|
local srcstack = inv:get_stack("src", 1)
|
||||||
local src_meta = minetest.deserialize(srcstack:get_metadata())
|
|
||||||
|
|
||||||
local toolname = srcstack:get_name()
|
local toolname = srcstack:get_name()
|
||||||
if not technic.power_tools[toolname] then
|
if not technic.power_tools[toolname] then
|
||||||
return batt_charge
|
return batt_charge, false
|
||||||
end
|
end
|
||||||
-- Set meta data for the tool if it didn't do it itself
|
-- Set meta data for the tool if it didn't do it itself
|
||||||
src_meta = minetest.deserialize(srcstack:get_metadata())
|
src_meta = minetest.deserialize(srcstack:get_metadata())
|
||||||
|
@ -178,8 +240,10 @@ function technic.charge_tools(meta, batt_charge, charge_step)
|
||||||
-- Do the charging
|
-- Do the charging
|
||||||
local item_max_charge = technic.power_tools[toolname]
|
local item_max_charge = technic.power_tools[toolname]
|
||||||
local tool_charge = src_meta.charge
|
local tool_charge = src_meta.charge
|
||||||
if tool_charge >= item_max_charge or batt_charge <= 0 then
|
if tool_charge >= item_max_charge then
|
||||||
return batt_charge
|
return batt_charge, true
|
||||||
|
elseif batt_charge <= 0 then
|
||||||
|
return batt_charge, false
|
||||||
end
|
end
|
||||||
charge_step = math.min(charge_step, batt_charge)
|
charge_step = math.min(charge_step, batt_charge)
|
||||||
charge_step = math.min(charge_step, item_max_charge - tool_charge)
|
charge_step = math.min(charge_step, item_max_charge - tool_charge)
|
||||||
|
@ -189,19 +253,19 @@ function technic.charge_tools(meta, batt_charge, charge_step)
|
||||||
src_meta.charge = tool_charge
|
src_meta.charge = tool_charge
|
||||||
srcstack:set_metadata(minetest.serialize(src_meta))
|
srcstack:set_metadata(minetest.serialize(src_meta))
|
||||||
inv:set_stack("src", 1, srcstack)
|
inv:set_stack("src", 1, srcstack)
|
||||||
return batt_charge
|
return batt_charge, (tool_charge == item_max_charge)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
function technic.discharge_tools(meta, batt_charge, charge_step, max_charge)
|
function technic.discharge_tools(meta, batt_charge, charge_step, max_charge)
|
||||||
local inv = meta:get_inventory()
|
local inv = meta:get_inventory()
|
||||||
if inv:is_empty("dst") then
|
if inv:is_empty("dst") then
|
||||||
return batt_charge
|
return batt_charge, false
|
||||||
end
|
end
|
||||||
srcstack = inv:get_stack("dst", 1)
|
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
|
return batt_charge, false
|
||||||
end
|
end
|
||||||
-- Set meta data for the tool if it didn't do it itself :-(
|
-- Set meta data for the tool if it didn't do it itself :-(
|
||||||
local src_meta = minetest.deserialize(srcstack:get_metadata())
|
local src_meta = minetest.deserialize(srcstack:get_metadata())
|
||||||
|
@ -213,8 +277,10 @@ function technic.discharge_tools(meta, batt_charge, charge_step, max_charge)
|
||||||
-- Do the discharging
|
-- Do the discharging
|
||||||
local item_max_charge = technic.power_tools[toolname]
|
local item_max_charge = technic.power_tools[toolname]
|
||||||
local tool_charge = src_meta.charge
|
local tool_charge = src_meta.charge
|
||||||
if tool_charge <= 0 or batt_charge >= max_charge then
|
if tool_charge <= 0 then
|
||||||
return batt_charge
|
return batt_charge, true
|
||||||
|
elseif batt_charge >= max_charge then
|
||||||
|
return batt_charge, false
|
||||||
end
|
end
|
||||||
charge_step = math.min(charge_step, max_charge - batt_charge)
|
charge_step = math.min(charge_step, max_charge - batt_charge)
|
||||||
charge_step = math.min(charge_step, tool_charge)
|
charge_step = math.min(charge_step, tool_charge)
|
||||||
|
@ -224,6 +290,6 @@ function technic.discharge_tools(meta, batt_charge, charge_step, max_charge)
|
||||||
src_meta.charge = tool_charge
|
src_meta.charge = tool_charge
|
||||||
srcstack:set_metadata(minetest.serialize(src_meta))
|
srcstack:set_metadata(minetest.serialize(src_meta))
|
||||||
inv:set_stack("dst", 1, srcstack)
|
inv:set_stack("dst", 1, srcstack)
|
||||||
return batt_charge
|
return batt_charge, (tool_charge == 0)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -37,12 +37,16 @@ function technic.handle_machine_upgrades(meta)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
function technic.send_items(pos, x_velocity, z_velocity)
|
function technic.send_items(pos, x_velocity, z_velocity, output_name)
|
||||||
-- Send items on their way in the pipe system.
|
-- Send items on their way in the pipe system.
|
||||||
|
if output_name == nil then
|
||||||
|
output_name = "dst"
|
||||||
|
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("dst")) 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()
|
||||||
|
@ -53,7 +57,7 @@ function technic.send_items(pos, x_velocity, z_velocity)
|
||||||
item1:setvelocity({x=x_velocity, y=0, z=z_velocity})
|
item1:setvelocity({x=x_velocity, y=0, z=z_velocity})
|
||||||
item1:setacceleration({x=0, y=0, z=0})
|
item1:setacceleration({x=0, y=0, z=0})
|
||||||
stack:take_item(1)
|
stack:take_item(1)
|
||||||
inv:set_stack("dst", i, stack)
|
inv:set_stack(output_name, i, stack)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -81,7 +85,11 @@ function technic.smelt_item(meta, result, speed)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function technic.handle_machine_pipeworks(pos, tube_upgrade)
|
function technic.handle_machine_pipeworks(pos, tube_upgrade, send_function)
|
||||||
|
if send_function == nil then
|
||||||
|
send_function = technic.send_items
|
||||||
|
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 inv = meta:get_inventory()
|
||||||
|
@ -105,7 +113,7 @@ function technic.handle_machine_pipeworks(pos, tube_upgrade)
|
||||||
if tube_time >= 2 then
|
if tube_time >= 2 then
|
||||||
tube_time = 0
|
tube_time = 0
|
||||||
if output_tube_connected then
|
if output_tube_connected then
|
||||||
technic.send_items(pos, x_velocity, z_velocity)
|
send_function(pos, x_velocity, z_velocity)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
meta:set_int("tube_time", tube_time)
|
meta:set_int("tube_time", tube_time)
|
||||||
|
|
|
@ -24,6 +24,16 @@ function technic.register_grinder_recipe(data)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
minetest.after(0.01, function ()
|
||||||
|
for ingredient, recipe in pairs(technic.grinder_recipes) do
|
||||||
|
ingredient = minetest.registered_aliases[ingredient]
|
||||||
|
while ingredient do
|
||||||
|
technic.grinder_recipes[ingredient] = recipe
|
||||||
|
ingredient = minetest.registered_aliases[ingredient]
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
|
||||||
-- Receive an ItemStack of result by an ItemStack input
|
-- Receive an ItemStack of result by an ItemStack input
|
||||||
function technic.get_grinder_recipe(itemstack)
|
function technic.get_grinder_recipe(itemstack)
|
||||||
return technic.grinder_recipes[itemstack:get_name()]
|
return technic.grinder_recipes[itemstack:get_name()]
|
||||||
|
@ -40,27 +50,33 @@ local recipes = {
|
||||||
{"default:gold_ingot", "technic:gold_dust 1"},
|
{"default:gold_ingot", "technic:gold_dust 1"},
|
||||||
{"default:gold_lump", "technic:gold_dust 2"},
|
{"default:gold_lump", "technic:gold_dust 2"},
|
||||||
{"default:gravel", "default:dirt"},
|
{"default:gravel", "default:dirt"},
|
||||||
{"default:iron_lump", "technic:iron_dust 2"},
|
{"default:iron_lump", "technic:wrought_iron_dust 2"},
|
||||||
{"default:steel_ingot", "technic:iron_dust 1"},
|
|
||||||
{"default:stone", "default:sand"},
|
{"default:stone", "default:sand"},
|
||||||
{"gloopores:alatro_lump", "technic:alatro_dust 2"},
|
|
||||||
{"gloopores:kalite_lump", "technic:kalite_dust 2"},
|
|
||||||
{"gloopores:arol_lump", "technic:arol_dust 2"},
|
|
||||||
{"gloopores:talinite_lump", "technic:talinite_dust 2"},
|
|
||||||
{"gloopores:akalin_lump", "technic:akalin_dust 2"},
|
|
||||||
{"moreores:mithril_ingot", "technic:mithril_dust 1"},
|
{"moreores:mithril_ingot", "technic:mithril_dust 1"},
|
||||||
{"moreores:mithril_lump", "technic:mithril_dust 2"},
|
{"moreores:mithril_lump", "technic:mithril_dust 2"},
|
||||||
{"moreores:silver_ingot", "technic:silver_dust 1"},
|
{"moreores:silver_ingot", "technic:silver_dust 1"},
|
||||||
{"moreores:silver_lump", "technic:silver_dust 2"},
|
{"moreores:silver_lump", "technic:silver_dust 2"},
|
||||||
{"moreores:tin_ingot", "technic:tin_dust 1"},
|
{"moreores:tin_ingot", "technic:tin_dust 1"},
|
||||||
{"moreores:tin_lump", "technic:tin_dust 2"},
|
{"moreores:tin_lump", "technic:tin_dust 2"},
|
||||||
|
{"technic:cast_iron_ingot", "technic:cast_iron_dust 1"},
|
||||||
{"technic:chromium_ingot", "technic:chromium_dust 1"},
|
{"technic:chromium_ingot", "technic:chromium_dust 1"},
|
||||||
{"technic:chromium_lump", "technic:chromium_dust 2"},
|
{"technic:chromium_lump", "technic:chromium_dust 2"},
|
||||||
|
{"technic:wrought_iron_ingot", "technic:wrought_iron_dust 1"},
|
||||||
|
{"technic:carbon_steel_ingot", "technic:carbon_steel_dust 1"},
|
||||||
|
{"technic:stainless_steel_ingot", "technic:stainless_steel_dust 1"},
|
||||||
{"technic:zinc_ingot", "technic:zinc_dust 1"},
|
{"technic:zinc_ingot", "technic:zinc_dust 1"},
|
||||||
{"technic:zinc_lump", "technic:zinc_dust 2"},
|
{"technic:zinc_lump", "technic:zinc_dust 2"},
|
||||||
{"technic:brass_ingot", "technic:brass_dust 1"},
|
{"technic:brass_ingot", "technic:brass_dust 1"},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if minetest.get_modpath("gloopores") then
|
||||||
|
table.insert(recipes, {"gloopores:alatro_lump", "technic:alatro_dust 2"})
|
||||||
|
table.insert(recipes, {"gloopores:kalite_lump", "technic:kalite_dust 2"})
|
||||||
|
table.insert(recipes, {"gloopores:arol_lump", "technic:arol_dust 2"})
|
||||||
|
table.insert(recipes, {"gloopores:talinite_lump", "technic:talinite_dust 2"})
|
||||||
|
table.insert(recipes, {"gloopores:akalin_lump", "technic:akalin_dust 2"})
|
||||||
|
end
|
||||||
|
|
||||||
if minetest.get_modpath("homedecor") then
|
if minetest.get_modpath("homedecor") then
|
||||||
table.insert(recipes, {"home_decor:brass_ingot", "technic:brass_dust 1"})
|
table.insert(recipes, {"home_decor:brass_ingot", "technic:brass_dust 1"})
|
||||||
end
|
end
|
||||||
|
@ -87,22 +103,26 @@ local function register_dust(name, ingot)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Sorted alphibeticaly
|
-- Sorted alphibeticaly
|
||||||
register_dust("Akalin", "glooptest:akalin_ingot")
|
|
||||||
register_dust("Alatro", "glooptest:alatro_ingot")
|
|
||||||
register_dust("Arol", "glooptest:arol_ingot")
|
|
||||||
register_dust("Brass", "technic:brass_ingot")
|
register_dust("Brass", "technic:brass_ingot")
|
||||||
register_dust("Bronze", "default:bronze_ingot")
|
register_dust("Bronze", "default:bronze_ingot")
|
||||||
|
register_dust("Carbon Steel", "technic:carbon_steel_ingot")
|
||||||
|
register_dust("Cast Iron", "technic:cast_iron_ingot")
|
||||||
register_dust("Chromium", "technic:chromium_ingot")
|
register_dust("Chromium", "technic:chromium_ingot")
|
||||||
register_dust("Coal", nil)
|
register_dust("Coal", nil)
|
||||||
register_dust("Copper", "default:copper_ingot")
|
register_dust("Copper", "default:copper_ingot")
|
||||||
register_dust("Gold", "default:gold_ingot")
|
register_dust("Gold", "default:gold_ingot")
|
||||||
register_dust("Iron", "default:steel_ingot")
|
|
||||||
register_dust("Mithril", "moreores:mithril_ingot")
|
register_dust("Mithril", "moreores:mithril_ingot")
|
||||||
register_dust("Silver", "moreores:silver_ingot")
|
register_dust("Silver", "moreores:silver_ingot")
|
||||||
register_dust("Stainless Steel", "technic:stainless_steel_ingot")
|
register_dust("Stainless Steel", "technic:stainless_steel_ingot")
|
||||||
register_dust("Talinite", "glooptest:talinite_ingot")
|
|
||||||
register_dust("Tin", "moreores:tin_ingot")
|
register_dust("Tin", "moreores:tin_ingot")
|
||||||
|
register_dust("Wrought Iron", "technic:wrought_iron_ingot")
|
||||||
register_dust("Zinc", "technic:zinc_ingot")
|
register_dust("Zinc", "technic:zinc_ingot")
|
||||||
|
if minetest.get_modpath("gloopores") then
|
||||||
|
register_dust("Akalin", "glooptest:akalin_ingot")
|
||||||
|
register_dust("Alatro", "glooptest:alatro_ingot")
|
||||||
|
register_dust("Arol", "glooptest:arol_ingot")
|
||||||
|
register_dust("Talinite", "glooptest:talinite_ingot")
|
||||||
|
end
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
type = "fuel",
|
type = "fuel",
|
||||||
|
|
|
@ -76,6 +76,6 @@ minetest.register_abm({
|
||||||
})
|
})
|
||||||
|
|
||||||
for tier, machines in pairs(technic.machines) do
|
for tier, machines in pairs(technic.machines) do
|
||||||
technic.register_machine(tier, "technic:supply_converter", technic.battery)
|
technic.register_machine(tier, "technic:supply_converter", technic.producer_receiver)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -35,9 +35,9 @@ local S = technic.getter
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "technic:switching_station",
|
output = "technic:switching_station",
|
||||||
recipe = {
|
recipe = {
|
||||||
{"default:steel_ingot", "technic:lv_transformer", "default:steel_ingot"},
|
{"technic:cast_iron_ingot", "technic:lv_transformer", "technic:cast_iron_ingot"},
|
||||||
{"default:copper_ingot", "technic:lv_cable0", "default:copper_ingot"},
|
{"default:copper_ingot", "technic:lv_cable0", "default:copper_ingot"},
|
||||||
{"default:steel_ingot", "technic:lv_cable0", "default:steel_ingot"}
|
{"technic:cast_iron_ingot", "technic:lv_cable0", "technic:cast_iron_ingot"}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -106,6 +106,9 @@ local check_node_subp = function(PR_nodes, RE_nodes, BA_nodes, all_nodes, pos, m
|
||||||
add_new_cable_node(PR_nodes, pos)
|
add_new_cable_node(PR_nodes, pos)
|
||||||
elseif machines[name] == technic.receiver then
|
elseif machines[name] == technic.receiver then
|
||||||
add_new_cable_node(RE_nodes, pos)
|
add_new_cable_node(RE_nodes, pos)
|
||||||
|
elseif machines[name] == technic.producer_receiver then
|
||||||
|
add_new_cable_node(PR_nodes, pos)
|
||||||
|
add_new_cable_node(RE_nodes, pos)
|
||||||
elseif machines[name] == technic.battery then
|
elseif machines[name] == technic.battery then
|
||||||
add_new_cable_node(BA_nodes, pos)
|
add_new_cable_node(BA_nodes, pos)
|
||||||
end
|
end
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
|
|
||||||
technic.receiver = "RE"
|
technic.receiver = "RE"
|
||||||
technic.producer = "PR"
|
technic.producer = "PR"
|
||||||
|
technic.producer_receiver = "PR_RE"
|
||||||
technic.battery = "BA"
|
technic.battery = "BA"
|
||||||
|
|
||||||
technic.machines = {}
|
technic.machines = {}
|
||||||
|
|
After Width: | Height: | Size: 416 B |
After Width: | Height: | Size: 420 B |
After Width: | Height: | Size: 448 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.2 KiB |
|
@ -7,8 +7,8 @@ minetest.register_craft({
|
||||||
output = 'technic:water_can 1',
|
output = 'technic:water_can 1',
|
||||||
recipe = {
|
recipe = {
|
||||||
{'technic:zinc_ingot', 'technic:rubber','technic:zinc_ingot'},
|
{'technic:zinc_ingot', 'technic:rubber','technic:zinc_ingot'},
|
||||||
{'default:steel_ingot', '', 'default:steel_ingot'},
|
{'technic:carbon_steel_ingot', '', 'technic:carbon_steel_ingot'},
|
||||||
{'technic:zinc_ingot', 'default:steel_ingot', 'technic:zinc_ingot'},
|
{'technic:zinc_ingot', 'technic:carbon_steel_ingot', 'technic:zinc_ingot'},
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
@ -16,25 +16,25 @@ local S = technic.getter
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = 'technic:laser_mk1',
|
output = 'technic:laser_mk1',
|
||||||
recipe = {
|
recipe = {
|
||||||
{'default:diamond', 'default:steel_ingot', 'technic:red_energy_crystal'},
|
{'default:diamond', 'technic:carbon_steel_ingot', 'technic:red_energy_crystal'},
|
||||||
{'', 'default:steel_ingot', 'default:steel_ingot'},
|
{'', 'technic:carbon_steel_ingot', 'technic:carbon_steel_ingot'},
|
||||||
{'', '', 'default:copper_ingot'},
|
{'', '', 'default:copper_ingot'},
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = 'technic:laser_mk2',
|
output = 'technic:laser_mk2',
|
||||||
recipe = {
|
recipe = {
|
||||||
{'default:diamond', 'default:steel_ingot', 'technic:laser_mk1'},
|
{'default:diamond', 'technic:carbon_steel_ingot', 'technic:laser_mk1'},
|
||||||
{'', 'default:steel_ingot', 'technic:green_energy_crystal'},
|
{'', 'technic:carbon_steel_ingot', 'technic:green_energy_crystal'},
|
||||||
{'', '', 'default:copper_ingot'},
|
{'', '', 'default:copper_ingot'},
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = 'technic:laser_mk3',
|
output = 'technic:laser_mk3',
|
||||||
recipe = {
|
recipe = {
|
||||||
{'default:diamond', 'default:steel_ingot', 'technic:laser_mk2'},
|
{'default:diamond', 'technic:carbon_steel_ingot', 'technic:laser_mk2'},
|
||||||
{'', 'default:steel_ingot', 'technic:blue_energy_crystal'},
|
{'', 'technic:carbon_steel_ingot', 'technic:blue_energy_crystal'},
|
||||||
{'', '', 'default:copper_ingot'},
|
{'', '', 'default:copper_ingot'},
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -107,9 +107,9 @@ local function laser_nodes(pos, dir, player, range)
|
||||||
local t_dir = get_used_dir(dir)
|
local t_dir = get_used_dir(dir)
|
||||||
local dir_typ = t_dir[1]
|
local dir_typ = t_dir[1]
|
||||||
if t_dir[3] == "+" then
|
if t_dir[3] == "+" then
|
||||||
f_tab = {0, range}
|
f_tab = {1, range}
|
||||||
else
|
else
|
||||||
f_tab = {-range,0}
|
f_tab = {-range, -1}
|
||||||
end
|
end
|
||||||
local d_ch = t_dir[2]
|
local d_ch = t_dir[2]
|
||||||
if dir_typ == "x" then
|
if dir_typ == "x" then
|
||||||
|
|
|
@ -19,7 +19,7 @@ minetest.register_craft({
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = 'technic:copper_locked_chest 1',
|
output = 'technic:copper_locked_chest 1',
|
||||||
recipe = {
|
recipe = {
|
||||||
{'default:steel_ingot'},
|
{'technic:wrought_iron_ingot'},
|
||||||
{'technic:copper_chest'},
|
{'technic:copper_chest'},
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
default
|
default
|
||||||
technic
|
technic
|
||||||
|
technic_worldgen
|
||||||
moreores
|
moreores
|
||||||
pipeworks
|
pipeworks
|
||||||
intllib?
|
intllib?
|
||||||
|
|
|
@ -20,7 +20,7 @@ minetest.register_craft({
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = 'technic:gold_locked_chest',
|
output = 'technic:gold_locked_chest',
|
||||||
recipe = {
|
recipe = {
|
||||||
{'default:steel_ingot'},
|
{'technic:wrought_iron_ingot'},
|
||||||
{'technic:gold_chest'},
|
{'technic:gold_chest'},
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
@ -2,25 +2,25 @@
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = 'technic:iron_chest 1',
|
output = 'technic:iron_chest 1',
|
||||||
recipe = {
|
recipe = {
|
||||||
{'default:steel_ingot','default:steel_ingot','default:steel_ingot'},
|
{'technic:cast_iron_ingot','technic:cast_iron_ingot','technic:cast_iron_ingot'},
|
||||||
{'default:steel_ingot','default:chest','default:steel_ingot'},
|
{'technic:cast_iron_ingot','default:chest','technic:cast_iron_ingot'},
|
||||||
{'default:steel_ingot','default:steel_ingot','default:steel_ingot'},
|
{'technic:cast_iron_ingot','technic:cast_iron_ingot','technic:cast_iron_ingot'},
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = 'technic:iron_locked_chest 1',
|
output = 'technic:iron_locked_chest 1',
|
||||||
recipe = {
|
recipe = {
|
||||||
{'default:steel_ingot','default:steel_ingot','default:steel_ingot'},
|
{'technic:cast_iron_ingot','technic:cast_iron_ingot','technic:cast_iron_ingot'},
|
||||||
{'default:steel_ingot','default:chest_locked','default:steel_ingot'},
|
{'technic:cast_iron_ingot','default:chest_locked','technic:cast_iron_ingot'},
|
||||||
{'default:steel_ingot','default:steel_ingot','default:steel_ingot'},
|
{'technic:cast_iron_ingot','technic:cast_iron_ingot','technic:cast_iron_ingot'},
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = 'technic:iron_locked_chest 1',
|
output = 'technic:iron_locked_chest 1',
|
||||||
recipe = {
|
recipe = {
|
||||||
{'default:steel_ingot'},
|
{'technic:wrought_iron_ingot'},
|
||||||
{'technic:iron_chest'},
|
{'technic:iron_chest'},
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
@ -19,7 +19,7 @@ minetest.register_craft({
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = 'technic:mithril_locked_chest 1',
|
output = 'technic:mithril_locked_chest 1',
|
||||||
recipe = {
|
recipe = {
|
||||||
{'default:steel_ingot'},
|
{'technic:wrought_iron_ingot'},
|
||||||
{'technic:mithril_chest'},
|
{'technic:mithril_chest'},
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
@ -19,7 +19,7 @@ minetest.register_craft({
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = 'technic:silver_locked_chest',
|
output = 'technic:silver_locked_chest',
|
||||||
recipe = {
|
recipe = {
|
||||||
{'default:steel_ingot'},
|
{'technic:wrought_iron_ingot'},
|
||||||
{'technic:silver_chest'},
|
{'technic:silver_chest'},
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
@ -34,6 +34,23 @@ minetest.register_craftitem(":technic:brass_ingot", {
|
||||||
inventory_image = "technic_brass_ingot.png",
|
inventory_image = "technic_brass_ingot.png",
|
||||||
})
|
})
|
||||||
|
|
||||||
|
minetest.register_alias("technic:wrought_iron_ingot", "default:steel_ingot")
|
||||||
|
|
||||||
|
minetest.override_item("default:steel_ingot", {
|
||||||
|
description = S("Wrought Iron Ingot"),
|
||||||
|
inventory_image = "technic_wrought_iron_ingot.png",
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craftitem(":technic:cast_iron_ingot", {
|
||||||
|
description = S("Cast Iron Ingot"),
|
||||||
|
inventory_image = "technic_cast_iron_ingot.png",
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craftitem(":technic:carbon_steel_ingot", {
|
||||||
|
description = S("Carbon Steel Ingot"),
|
||||||
|
inventory_image = "technic_carbon_steel_ingot.png",
|
||||||
|
})
|
||||||
|
|
||||||
minetest.register_craftitem(":technic:stainless_steel_ingot", {
|
minetest.register_craftitem(":technic:stainless_steel_ingot", {
|
||||||
description = S("Stainless Steel Ingot"),
|
description = S("Stainless Steel Ingot"),
|
||||||
inventory_image = "technic_stainless_steel_ingot.png",
|
inventory_image = "technic_stainless_steel_ingot.png",
|
||||||
|
@ -61,6 +78,8 @@ register_block("technic:uranium_block", "technic:uranium")
|
||||||
register_block("technic:chromium_block", "technic:chromium_ingot")
|
register_block("technic:chromium_block", "technic:chromium_ingot")
|
||||||
register_block("technic:zinc_block", "technic:zinc_ingot")
|
register_block("technic:zinc_block", "technic:zinc_ingot")
|
||||||
register_block("technic:brass_block", "technic:brass_ingot")
|
register_block("technic:brass_block", "technic:brass_ingot")
|
||||||
|
register_block("technic:cast_iron_block", "technic:cast_iron_ingot")
|
||||||
|
register_block("technic:carbon_steel_block", "technic:carbon_steel_ingot")
|
||||||
register_block("technic:stainless_steel_block", "technic:stainless_steel_ingot")
|
register_block("technic:stainless_steel_block", "technic:stainless_steel_ingot")
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
|
@ -75,3 +94,59 @@ minetest.register_craft({
|
||||||
output = "technic:chromium_ingot",
|
output = "technic:chromium_ingot",
|
||||||
})
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
type = 'cooking',
|
||||||
|
recipe = minetest.registered_aliases["technic:wrought_iron_ingot"],
|
||||||
|
output = "technic:cast_iron_ingot",
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
type = 'cooking',
|
||||||
|
recipe = "technic:cast_iron_ingot",
|
||||||
|
cooktime = 2,
|
||||||
|
output = "technic:wrought_iron_ingot",
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
type = 'cooking',
|
||||||
|
recipe = "technic:carbon_steel_ingot",
|
||||||
|
cooktime = 2,
|
||||||
|
output = "technic:wrought_iron_ingot",
|
||||||
|
})
|
||||||
|
|
||||||
|
local function for_each_registered_craftitem(action)
|
||||||
|
local already_reg = {}
|
||||||
|
for k, _ in pairs(minetest.registered_items) do
|
||||||
|
table.insert(already_reg, k)
|
||||||
|
end
|
||||||
|
local really_register_craftitem = minetest.register_craftitem
|
||||||
|
minetest.register_craftitem = function(name, def)
|
||||||
|
really_register_craftitem(name, def)
|
||||||
|
action(string.gsub(name, "^:", ""))
|
||||||
|
end
|
||||||
|
for _, name in ipairs(already_reg) do
|
||||||
|
action(name)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local steel_to_iron = {}
|
||||||
|
for _, i in ipairs({
|
||||||
|
"default:axe_steel",
|
||||||
|
"default:pick_steel",
|
||||||
|
"default:shovel_steel",
|
||||||
|
"default:sword_steel",
|
||||||
|
"doors:door_steel",
|
||||||
|
"farming:hoe_steel",
|
||||||
|
"mesecons_doors:op_door_steel",
|
||||||
|
"mesecons_doors:sig_door_steel",
|
||||||
|
"vessels:steel_bottle",
|
||||||
|
}) do
|
||||||
|
steel_to_iron[i] = true
|
||||||
|
end
|
||||||
|
|
||||||
|
for_each_registered_craftitem(function(item_name)
|
||||||
|
local item_def = minetest.registered_items[item_name]
|
||||||
|
if steel_to_iron[item_name] and string.find(item_def.description, "Steel") then
|
||||||
|
minetest.override_item(item_name, { description = string.gsub(item_def.description, "Steel", S("Iron")) })
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
|
|
@ -9,7 +9,11 @@ Chromium Ingot = Chrombarren
|
||||||
Zinc Lump = Zinkklumpen
|
Zinc Lump = Zinkklumpen
|
||||||
Zinc Ingot = Zinkbarren
|
Zinc Ingot = Zinkbarren
|
||||||
Brass Ingot = Messingbarren
|
Brass Ingot = Messingbarren
|
||||||
|
Wrought Iron Ingot = Schmiedeeisenbarren
|
||||||
|
Cast Iron Ingot = Gusseisenbarren
|
||||||
|
Carbon Steel Ingot = Kohlenstoffstahlbarren
|
||||||
Stainless Steel Ingot = Edelstahlbarren
|
Stainless Steel Ingot = Edelstahlbarren
|
||||||
|
Iron = Eisen
|
||||||
|
|
||||||
## nodes.lua
|
## nodes.lua
|
||||||
Uranium Ore = Uranerz
|
Uranium Ore = Uranerz
|
||||||
|
@ -21,8 +25,12 @@ Marble Bricks = Marmorziegel
|
||||||
Uranium Block = Uranblock
|
Uranium Block = Uranblock
|
||||||
Chromium Block = Chromblock
|
Chromium Block = Chromblock
|
||||||
Zinc Block = Zinkblock
|
Zinc Block = Zinkblock
|
||||||
|
Wrought Iron Block = Schmiedeeisenblock
|
||||||
|
Cast Iron Block = Gusseisenblock
|
||||||
|
Carbon Steel Block = Kohlenstoffstahlblock
|
||||||
Stainless Steel Block = Edelstahlblock
|
Stainless Steel Block = Edelstahlblock
|
||||||
Brass Block = Messingblock
|
Brass Block = Messingblock
|
||||||
|
Wrought Iron = Schmiedeeisen
|
||||||
|
|
||||||
## rubber.lua
|
## rubber.lua
|
||||||
Rubber Tree Sapling = Gummibaumsetzling
|
Rubber Tree Sapling = Gummibaumsetzling
|
||||||
|
|
|
@ -8,7 +8,11 @@ Chromium Ingot =
|
||||||
Zinc Lump =
|
Zinc Lump =
|
||||||
Zinc Ingot =
|
Zinc Ingot =
|
||||||
Brass Ingot =
|
Brass Ingot =
|
||||||
|
Wrought Iron Ingot =
|
||||||
|
Cast Iron Ingot =
|
||||||
|
Carbon Steel Ingot =
|
||||||
Stainless Steel Ingot =
|
Stainless Steel Ingot =
|
||||||
|
Iron =
|
||||||
|
|
||||||
###nodes.lua
|
###nodes.lua
|
||||||
Uranium Ore =
|
Uranium Ore =
|
||||||
|
@ -20,8 +24,12 @@ Marble Bricks =
|
||||||
Uranium Block =
|
Uranium Block =
|
||||||
Chromium Block =
|
Chromium Block =
|
||||||
Zinc Block =
|
Zinc Block =
|
||||||
|
Wrought Iron Block =
|
||||||
|
Cast Iron Block =
|
||||||
|
Carbon Steel Block =
|
||||||
Stainless Steel Block =
|
Stainless Steel Block =
|
||||||
Brass Block =
|
Brass Block =
|
||||||
|
Wrought Iron =
|
||||||
|
|
||||||
###rubber.lua
|
###rubber.lua
|
||||||
Rubber Tree Sapling =
|
Rubber Tree Sapling =
|
||||||
|
|
|
@ -76,6 +76,29 @@ minetest.register_node(":technic:zinc_block", {
|
||||||
sounds = default.node_sound_stone_defaults()
|
sounds = default.node_sound_stone_defaults()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
minetest.register_alias("technic:wrought_iron_block", "default:steelblock")
|
||||||
|
|
||||||
|
minetest.override_item("default:steelblock", {
|
||||||
|
description = S("Wrought Iron Block"),
|
||||||
|
tiles = { "technic_wrought_iron_block.png" },
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_node(":technic:cast_iron_block", {
|
||||||
|
description = S("Cast Iron Block"),
|
||||||
|
tiles = { "technic_cast_iron_block.png" },
|
||||||
|
is_ground_content = true,
|
||||||
|
groups = {cracky=1, level=2},
|
||||||
|
sounds = default.node_sound_stone_defaults()
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_node(":technic:carbon_steel_block", {
|
||||||
|
description = S("Carbon Steel Block"),
|
||||||
|
tiles = { "technic_carbon_steel_block.png" },
|
||||||
|
is_ground_content = true,
|
||||||
|
groups = {cracky=1, level=2},
|
||||||
|
sounds = default.node_sound_stone_defaults()
|
||||||
|
})
|
||||||
|
|
||||||
minetest.register_node(":technic:stainless_steel_block", {
|
minetest.register_node(":technic:stainless_steel_block", {
|
||||||
description = S("Stainless Steel Block"),
|
description = S("Stainless Steel Block"),
|
||||||
tiles = { "technic_stainless_steel_block.png" },
|
tiles = { "technic_stainless_steel_block.png" },
|
||||||
|
@ -104,3 +127,37 @@ minetest.register_alias("technic:diamond_block", "default:diamondblock")
|
||||||
minetest.register_alias("technic:diamond", "default:diamond")
|
minetest.register_alias("technic:diamond", "default:diamond")
|
||||||
minetest.register_alias("technic:mineral_diamond", "default:stone_with_diamond")
|
minetest.register_alias("technic:mineral_diamond", "default:stone_with_diamond")
|
||||||
|
|
||||||
|
local function for_each_registered_node(action)
|
||||||
|
local already_reg = {}
|
||||||
|
for k, _ in pairs(minetest.registered_nodes) do
|
||||||
|
table.insert(already_reg, k)
|
||||||
|
end
|
||||||
|
local really_register_node = minetest.register_node
|
||||||
|
minetest.register_node = function(name, def)
|
||||||
|
really_register_node(name, def)
|
||||||
|
action(string.gsub(name, "^:", ""))
|
||||||
|
end
|
||||||
|
for _, name in ipairs(already_reg) do
|
||||||
|
action(name)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
for_each_registered_node(function(node_name)
|
||||||
|
local node_def = minetest.registered_nodes[node_name]
|
||||||
|
if node_name ~= "default:steelblock" and string.find(node_name, "steelblock") and string.find(node_def.description, "Steel") then
|
||||||
|
minetest.override_item(node_name, { description = string.gsub(node_def.description, "Steel", S("Wrought Iron")) })
|
||||||
|
end
|
||||||
|
if node_def.tiles or node_def.tile_images then
|
||||||
|
local tn = node_def.tiles and "tiles" or "tile_images"
|
||||||
|
local tl = {}
|
||||||
|
local ca = false
|
||||||
|
for i, t in ipairs(node_def[tn]) do
|
||||||
|
if type(t) == "string" and t == "default_steel_block.png" then
|
||||||
|
ca = true
|
||||||
|
t = "technic_wrought_iron_block.png"
|
||||||
|
end
|
||||||
|
table.insert(tl, t)
|
||||||
|
end
|
||||||
|
if ca then minetest.override_item(node_name, { [tn] = tl }) end
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
|
After Width: | Height: | Size: 606 B |
After Width: | Height: | Size: 312 B |
After Width: | Height: | Size: 606 B |
After Width: | Height: | Size: 315 B |
After Width: | Height: | Size: 572 B |
After Width: | Height: | Size: 293 B |
|
@ -1,5 +1,6 @@
|
||||||
default
|
default
|
||||||
technic
|
technic
|
||||||
technic_chests
|
technic_chests
|
||||||
|
technic_worldgen
|
||||||
intllib?
|
intllib?
|
||||||
|
|
||||||
|
|
|
@ -165,8 +165,8 @@ minetest.register_tool("wrench:wrench", {
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "wrench:wrench",
|
output = "wrench:wrench",
|
||||||
recipe = {
|
recipe = {
|
||||||
{"default:steel_ingot", "", "default:steel_ingot"},
|
{"technic:carbon_steel_ingot", "", "technic:carbon_steel_ingot"},
|
||||||
{"", "default:steel_ingot", ""},
|
{"", "technic:carbon_steel_ingot", ""},
|
||||||
{"", "default:steel_ingot", ""},
|
{"", "technic:carbon_steel_ingot", ""},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
|
@ -1,2 +0,0 @@
|
||||||
*~
|
|
||||||
|
|
|
@ -144,3 +144,48 @@ function unified_inventory.items_in_group(groups)
|
||||||
end
|
end
|
||||||
return items
|
return items
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function unified_inventory.sort_inventory(inv)
|
||||||
|
local inlist = inv:get_list("main")
|
||||||
|
local typecnt = {}
|
||||||
|
local typekeys = {}
|
||||||
|
for _, st in ipairs(inlist) do
|
||||||
|
if not st:is_empty() then
|
||||||
|
local n = st:get_name()
|
||||||
|
local w = st:get_wear()
|
||||||
|
local m = st:get_metadata()
|
||||||
|
local k = string.format("%s %05d %s", n, w, m)
|
||||||
|
if not typecnt[k] then
|
||||||
|
typecnt[k] = {
|
||||||
|
name = n,
|
||||||
|
wear = w,
|
||||||
|
metadata = m,
|
||||||
|
stack_max = st:get_stack_max(),
|
||||||
|
count = 0,
|
||||||
|
}
|
||||||
|
table.insert(typekeys, k)
|
||||||
|
end
|
||||||
|
typecnt[k].count = typecnt[k].count + st:get_count()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
table.sort(typekeys)
|
||||||
|
local outlist = {}
|
||||||
|
for _, k in ipairs(typekeys) do
|
||||||
|
local tc = typecnt[k]
|
||||||
|
while tc.count > 0 do
|
||||||
|
local c = math.min(tc.count, tc.stack_max)
|
||||||
|
table.insert(outlist, ItemStack({
|
||||||
|
name = tc.name,
|
||||||
|
wear = tc.wear,
|
||||||
|
metadata = tc.metadata,
|
||||||
|
count = c,
|
||||||
|
}))
|
||||||
|
tc.count = tc.count - c
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if #outlist > #inlist then return end
|
||||||
|
while #outlist < #inlist do
|
||||||
|
table.insert(outlist, ItemStack(nil))
|
||||||
|
end
|
||||||
|
inv:set_list("main", outlist)
|
||||||
|
end
|
||||||
|
|
|
@ -235,7 +235,7 @@ minetest.register_chatcommand("xban_record", {
|
||||||
end
|
end
|
||||||
if e.last_pos then
|
if e.last_pos then
|
||||||
minetest.chat_send_player(name,
|
minetest.chat_send_player(name,
|
||||||
("[%s]: User was last seen at %s"):format(
|
("User was last seen at %s"):format(
|
||||||
minetest.pos_to_string(e.last_pos)))
|
minetest.pos_to_string(e.last_pos)))
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
|
|