forked from minetest-mods/technic
Compare commits
19 Commits
d5df30c3ff
...
nalc-1.2-d
Author | SHA1 | Date | |
---|---|---|---|
d69064c14e | |||
12b65e857b | |||
88f42539bb | |||
b2a124dd83 | |||
34f2894321 | |||
fb4fef783b | |||
4a9ad94bf9 | |||
f3828c1943 | |||
0e10e8360d | |||
fbc4cc8511 | |||
904800abde | |||
1a45ad19d4 | |||
e90b28895c | |||
7696546d47 | |||
da95be53ec | |||
76a39e71b9 | |||
08b660ba99 | |||
cb84439266 | |||
c41f6509cf |
@ -142,7 +142,7 @@ local iclipfence_def = {
|
|||||||
|
|
||||||
local sclip_tex = {
|
local sclip_tex = {
|
||||||
"technic_insulator_clip.png",
|
"technic_insulator_clip.png",
|
||||||
{ name = "strut.png^steel_strut_overlay.png", color = "white" },
|
{ name = "strut.png^technic_steel_strut_overlay.png", color = "white" },
|
||||||
{ name = "strut.png", color = "white" }
|
{ name = "strut.png", color = "white" }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -13,14 +13,16 @@ The technic modpack depends on some other modpacks:
|
|||||||
signalling elements
|
signalling elements
|
||||||
* pipeworks, which supports the automation of item transport
|
* pipeworks, which supports the automation of item transport
|
||||||
* moreores, which provides some additional ore types
|
* moreores, which provides some additional ore types
|
||||||
|
* basic_materials, which provides some basic craft items
|
||||||
|
|
||||||
This manual doesn't explain how to use these other modpacks, which have
|
This manual doesn't explain how to use these other modpacks, which have
|
||||||
their own manuals:
|
their own manuals:
|
||||||
|
|
||||||
* [Minetest Game Documentation](https://wiki.minetest.net/Main_Page)
|
* [Minetest Game Documentation](https://wiki.minetest.net/Main_Page)
|
||||||
* [Mesecons Documentation](http://mesecons.net/items.html)
|
* [Mesecons Documentation](http://mesecons.net/items.html)
|
||||||
* [Pipeworks Documentation](https://github.com/minetest-mods/pipeworks/wiki)
|
* [Pipeworks Documentation](https://gitlab.com/VanessaE/pipeworks/-/wikis/home)
|
||||||
* [Moreores Forum Post](https://forum.minetest.net/viewtopic.php?t=549)
|
* [Moreores Forum Post](https://forum.minetest.net/viewtopic.php?t=549)
|
||||||
|
* [Basic materials Repository](https://gitlab.com/VanessaE/basic_materials)
|
||||||
|
|
||||||
Recipes for constructable items in technic are generally not guessable,
|
Recipes for constructable items in technic are generally not guessable,
|
||||||
and are also not specifically documented here. You should use a
|
and are also not specifically documented here. You should use a
|
||||||
|
@ -21,6 +21,9 @@ celeron55 (Perttu Ahola) modified by Zefram (CC BY-SA 3.0):
|
|||||||
sdzen (Elise Staudter) (CC BY-SA 3.0):
|
sdzen (Elise Staudter) (CC BY-SA 3.0):
|
||||||
* most of the older 16x16 textures
|
* most of the older 16x16 textures
|
||||||
|
|
||||||
|
leftshift (CC BY-SA 3.0):
|
||||||
|
* technic_river_water_can.png
|
||||||
|
|
||||||
RealBadAngel: (WTFPL)
|
RealBadAngel: (WTFPL)
|
||||||
* Everything else.
|
* Everything else.
|
||||||
|
|
||||||
@ -32,4 +35,4 @@ veikk0 (Veikko Mäkelä) (CC BY-SA 4.0):
|
|||||||
* technic_hv_nuclear_reactor_siren_danger_loop.ogg
|
* technic_hv_nuclear_reactor_siren_danger_loop.ogg
|
||||||
* Derived from "Nuclear alarm.wav" by Freesound.org user rene___ from <https://freesound.org/people/rene___/sounds/56778/>. Originally licensed under CC0 1.0 <https://creativecommons.org/publicdomain/zero/1.0/>
|
* Derived from "Nuclear alarm.wav" by Freesound.org user rene___ from <https://freesound.org/people/rene___/sounds/56778/>. Originally licensed under CC0 1.0 <https://creativecommons.org/publicdomain/zero/1.0/>
|
||||||
|
|
||||||
CC BY-SA 4.0: <https://creativecommons.org/licenses/by-sa/4.0/>
|
CC BY-SA 4.0: <https://creativecommons.org/licenses/by-sa/4.0/>
|
||||||
|
@ -64,6 +64,10 @@ Registration functions
|
|||||||
### Specific machines
|
### Specific machines
|
||||||
* `technic.register_solar_array(data)`
|
* `technic.register_solar_array(data)`
|
||||||
* data is a table
|
* data is a table
|
||||||
|
* `technic.can_insert_unique_stack(pos, node, stack, direction)`
|
||||||
|
* `technic.insert_object_unique_stack(pos, node, stack, direction)`
|
||||||
|
* Functions for the parameters `can_insert` and `insert_object` to avoid
|
||||||
|
filling multiple inventory slots with same type of item.
|
||||||
|
|
||||||
Used itemdef fields
|
Used itemdef fields
|
||||||
-------------------
|
-------------------
|
||||||
|
@ -8,30 +8,30 @@
|
|||||||
Silicon Wafer = Tranche de silicium
|
Silicon Wafer = Tranche de silicium
|
||||||
Doped Silicon Wafer = Tranche de silicium doppée
|
Doped Silicon Wafer = Tranche de silicium doppée
|
||||||
Enriched Uranium = Uranium enrichi
|
Enriched Uranium = Uranium enrichi
|
||||||
Uranium Fuel = Carburant d'uranium
|
Uranium Fuel = Uranium 235
|
||||||
Diamond Drill Head = Tête de forage au diamant
|
Diamond Drill Head = Tête de forage en diamant
|
||||||
Blue Energy Crystal = Cristal d'énergie bleu
|
Blue Energy Crystal = Cristal d'énergie bleu
|
||||||
Green Energy Crystal = Cristal d'énergie vert
|
Green Energy Crystal = Cristal d'énergie vert
|
||||||
Red Energy Crystal = Cristal d'énergie rouge
|
Red Energy Crystal = Cristal d'énergie rouge
|
||||||
Fine Copper Wire = Fil fin en cuivre
|
Fine Copper Wire = Fil en cuivre fin
|
||||||
Fine Gold Wire = Fil fin en or
|
Fine Gold Wire = Fil en or fin
|
||||||
Fine Silver Wire = Fil fin en argent
|
Fine Silver Wire = Fil en argent fin
|
||||||
Copper Coil = Bobine de cuivre
|
Copper Coil = Bobine de cuivre
|
||||||
Electric Motor = Moteur électrique
|
Electric Motor = Moteur électrique
|
||||||
Low Voltage Transformer = Transformateur basse tension
|
Low Voltage Transformer = Transformateur basse tension
|
||||||
Medium Voltage Transformer = Transformateur moyenne tension
|
Medium Voltage Transformer = Transformateur moyenne tension
|
||||||
High Voltage Transformer = Transformateur haute tension
|
High Voltage Transformer = Transformateur haute tension
|
||||||
Control Logic Unit = Unité de contrôle logique
|
Control Logic Unit = Unité de contrôle logique
|
||||||
Mixed Metal Ingot = Lingot de métal mélangé
|
Mixed Metal Ingot = Lingot de métal allié
|
||||||
Composite Plate = Plaque composite
|
Composite Plate = Plaque composite
|
||||||
Copper Plate = Plaque de cuivre
|
Copper Plate = Plaque de cuivre
|
||||||
Carbon Plate = Plaque de carbone
|
Carbon Plate = Plaque de carbone
|
||||||
Graphite = Graphite
|
Graphite = Graphite
|
||||||
Carbon Cloth = Fibre de carbone
|
Carbon Cloth = Fibre de carbone
|
||||||
Raw Latex = Latex brut
|
Raw Latex = Latex brut
|
||||||
Rubber Fiber = Fibre de latex
|
Rubber Fiber = Fibre de caoutchouc
|
||||||
%.1f%%-Fissile Uranium Ingot = Lingot d'uranium fissile (%.1f%%)
|
%.1f%%-Fissile Uranium Ingot = Lingot d'uranium fissile (%.1f%%)
|
||||||
%.1f%%-Fissile Uranium Block = Block d'uranium fissile (%.1f%%)
|
%.1f%%-Fissile Uranium Block = Bloc d'uranium fissile (%.1f%%)
|
||||||
|
|
||||||
## Machine misc
|
## Machine misc
|
||||||
Machine cannot be removed because it is not empty = La machine ne peut pas être retirée car elle n'est pas vide
|
Machine cannot be removed because it is not empty = La machine ne peut pas être retirée car elle n'est pas vide
|
||||||
@ -49,21 +49,21 @@ Inventory move disallowed due to protection = Le mouvement d'inventa
|
|||||||
%s Out Of Fuel = %s plus de carburant
|
%s Out Of Fuel = %s plus de carburant
|
||||||
%s Has Bad Cabling = %s est mal cablé
|
%s Has Bad Cabling = %s est mal cablé
|
||||||
%s (Slave) = %s (esclave)
|
%s (Slave) = %s (esclave)
|
||||||
%s Has No Network = %s n'est pas en réseau
|
%s Has No Network = %s n'a pas de réseau
|
||||||
%s Finished = %s finit
|
%s Finished = %s a fini
|
||||||
Enable/Disable = Activer/Désactiver
|
Enable/Disable = Activer/Désactiver
|
||||||
Range = Plage
|
Range = Plage
|
||||||
Upgrade Slots = Emplacement d'amélioration
|
Upgrade Slots = Emplacement d'amélioration
|
||||||
In: = Entrée :
|
In: = Entrée :
|
||||||
Out: = Sortie :
|
Out: = Sortie :
|
||||||
Slot %d = Emplacement %d
|
Slot %d = Emplacement %d
|
||||||
Itemwise =
|
Itemwise = Item par Item
|
||||||
Stackwise =
|
Stackwise = Stack par Stack
|
||||||
Ignoring Mesecon Signal = Ignorer le signal Mesecon
|
Ignoring Mesecon Signal = Ignorer le signal Mesecon
|
||||||
Controlled by Mesecon Signal = Contrôlé par signal Mesecon
|
Controlled by Mesecon Signal = Contrôlé par signal Mesecon
|
||||||
Owner: = Propriétaire :
|
Owner: = Propriétaire :
|
||||||
Unlocked = Dévérouillé
|
Unlocked = Déverrouillé
|
||||||
Locked = Vérouillé
|
Locked = Verrouillé
|
||||||
Radius: = Rayon :
|
Radius: = Rayon :
|
||||||
Enabled = Activé
|
Enabled = Activé
|
||||||
Disabled = Désactivé
|
Disabled = Désactivé
|
||||||
@ -80,13 +80,13 @@ Disabled = Désactivé
|
|||||||
%s Forcefield Emitter = Emetteur de champ de force %s
|
%s Forcefield Emitter = Emetteur de champ de force %s
|
||||||
%s Furnace = Four %s
|
%s Furnace = Four %s
|
||||||
%s Grinder = Broyeur %s
|
%s Grinder = Broyeur %s
|
||||||
%s Music Player = Poste de musique %s
|
%s Music Player = Grammophone %s
|
||||||
%s Quarry = Mineur %s
|
%s Quarry = Carrière %s
|
||||||
%s Tool Workshop = Atelier d'outillage %s
|
%s Tool Workshop = Atelier d'outillage %s
|
||||||
Arrayed Solar %s Generator = Générateur solaire %s
|
Arrayed Solar %s Generator = Générateur solaire %s
|
||||||
Fuel-Fired %s Generator = Générateur à carburant
|
Fuel-Fired %s Generator = Générateur thermique %s
|
||||||
Geothermal %s Generator = Géénarteur géothermique %s
|
Geothermal %s Generator = Géénarteur géothermique %s
|
||||||
Hydro %s Generator = Générateur hydro %s
|
Hydro %s Generator = Générateur hydroélectrique %s
|
||||||
Nuclear %s Generator Core = Générateur nucléaire %
|
Nuclear %s Generator Core = Générateur nucléaire %
|
||||||
Small Solar %s Generator = Petit générateur solaire %s
|
Small Solar %s Generator = Petit générateur solaire %s
|
||||||
Wind %s Generator = Générateur éolien %s
|
Wind %s Generator = Générateur éolien %s
|
||||||
@ -99,7 +99,7 @@ Template (replacing) =
|
|||||||
Template Motor =
|
Template Motor =
|
||||||
Template Tool =
|
Template Tool =
|
||||||
Battery Box = Compartiment à batterie
|
Battery Box = Compartiment à batterie
|
||||||
Supply Converter = Convertisseur d'alimentation
|
Supply Converter = Convertisseur de tension
|
||||||
Switching Station = Station de commutation
|
Switching Station = Station de commutation
|
||||||
Fuel-Fired Alloy Furnace = Four à alliage à carburant
|
Fuel-Fired Alloy Furnace = Four à alliage à carburant
|
||||||
Fuel-Fired Furnace = Four à carburant
|
Fuel-Fired Furnace = Four à carburant
|
||||||
@ -168,7 +168,7 @@ Wooden = Bois
|
|||||||
|
|
||||||
## Grinder Recipes
|
## Grinder Recipes
|
||||||
# $1: Name
|
# $1: Name
|
||||||
%s Dust = Poudre - %s
|
%s Dust = Poudre de %s
|
||||||
Akalin =
|
Akalin =
|
||||||
Alatro =
|
Alatro =
|
||||||
Arol =
|
Arol =
|
||||||
@ -185,7 +185,7 @@ Silver = Argent
|
|||||||
Stainless Steel = Acier inoxydable
|
Stainless Steel = Acier inoxydable
|
||||||
Talinite = Talanite
|
Talinite = Talanite
|
||||||
Tin = Etain
|
Tin = Etain
|
||||||
Wrought Iron = Fer forgé
|
Wrought Iron = Fer
|
||||||
Zinc = Zinc
|
Zinc = Zinc
|
||||||
%.1f%%-Fissile Uranium = Uranium fissile (%.1f%%)
|
%.1f%%-Fissile Uranium = Uranium fissile (%.1f%%)
|
||||||
|
|
||||||
@ -193,8 +193,8 @@ Zinc = Zinc
|
|||||||
RE Battery = Batterie RE
|
RE Battery = Batterie RE
|
||||||
Water Can = Jerrycan d'eau
|
Water Can = Jerrycan d'eau
|
||||||
Lava Can = Jerrycan de lave
|
Lava Can = Jerrycan de lave
|
||||||
Chainsaw = Trançonneuse
|
Chainsaw = Tronçonneuse
|
||||||
Flashlight = Lampe torche
|
Flashlight = Lampe-torche
|
||||||
3 nodes deep. =
|
3 nodes deep. =
|
||||||
3 nodes tall. =
|
3 nodes tall. =
|
||||||
3 nodes wide. =
|
3 nodes wide. =
|
||||||
@ -204,12 +204,12 @@ Mining Drill Mk%d Mode %d = Foreuse Mk%d Mode %d
|
|||||||
Mining Drill Mk%d = Foreuse Mk%d
|
Mining Drill Mk%d = Foreuse Mk%d
|
||||||
Mining Laser Mk%d = Foreuse laser Mk%d
|
Mining Laser Mk%d = Foreuse laser Mk%d
|
||||||
Single node. = Mode simple.
|
Single node. = Mode simple.
|
||||||
Sonic Screwdriver = Tournevis sonique
|
Sonic Screwdriver = Tournevis supersonique
|
||||||
Tree Tap = Taraud à latex
|
Tree Tap = Robinet à sève
|
||||||
|
|
||||||
## Craft descriptions
|
## Craft descriptions
|
||||||
Alloy cooking = Fonderie d'alliage
|
Alloy cooking = Fonderie d'alliage
|
||||||
Grinding = Broyage
|
Grinding = Broyage
|
||||||
Compressing = Compression
|
Compressing = Compression
|
||||||
Extracting = Extraction
|
Extracting = Extraction
|
||||||
Separating = Séparat
|
Separating = Séparation
|
||||||
|
@ -95,7 +95,7 @@ minetest.register_node("technic:injector", {
|
|||||||
if meta:get_int("splitstacks") == 1 then
|
if meta:get_int("splitstacks") == 1 then
|
||||||
stack = stack:peek_item(1)
|
stack = stack:peek_item(1)
|
||||||
end
|
end
|
||||||
return meta:get_inventory():room_for_item("main", stack)
|
return inv:room_for_item("main", stack)
|
||||||
end,
|
end,
|
||||||
insert_object = function(pos, node, stack, direction)
|
insert_object = function(pos, node, stack, direction)
|
||||||
return minetest.get_meta(pos):get_inventory():add_item("main", stack)
|
return minetest.get_meta(pos):get_inventory():add_item("main", stack)
|
||||||
|
@ -1,10 +1,50 @@
|
|||||||
|
|
||||||
local S = technic.getter
|
local S = technic.getter
|
||||||
|
|
||||||
|
function technic.insert_object_unique_stack(pos, node, incoming_stack, direction)
|
||||||
|
local meta = minetest.get_meta(pos)
|
||||||
|
local inv = meta:get_inventory()
|
||||||
|
local incoming_name = incoming_stack:get_name()
|
||||||
|
local stack_index = nil
|
||||||
|
for inv_index, inv_stack in pairs(inv:get_list("src")) do
|
||||||
|
if inv_stack:get_name() == incoming_name then
|
||||||
|
stack_index = inv_index
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if stack_index == nil then
|
||||||
|
return inv:add_item("src", incoming_stack)
|
||||||
|
end
|
||||||
|
local present_stack = inv:get_stack("src", stack_index)
|
||||||
|
local leftover = present_stack:add_item(incoming_stack)
|
||||||
|
inv:set_stack("src", stack_index, present_stack)
|
||||||
|
return leftover
|
||||||
|
end
|
||||||
|
|
||||||
|
function technic.can_insert_unique_stack(pos, node, incoming_stack, direction)
|
||||||
|
local meta = minetest.get_meta(pos)
|
||||||
|
local inv = meta:get_inventory()
|
||||||
|
local incoming_name = incoming_stack:get_name()
|
||||||
|
if meta:get_int("splitstacks") == 0 then
|
||||||
|
-- avoid looping second time with inv:contains_item("src", incoming_stack)
|
||||||
|
for _, inv_stack in pairs(inv:get_list("src")) do
|
||||||
|
if inv_stack:get_name() == incoming_name then
|
||||||
|
return inv_stack:item_fits(incoming_stack)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return technic.default_can_insert(pos, node, incoming_stack, direction)
|
||||||
|
end
|
||||||
|
|
||||||
function technic.register_alloy_furnace(data)
|
function technic.register_alloy_furnace(data)
|
||||||
data.typename = "alloy"
|
data.typename = "alloy"
|
||||||
data.machine_name = "alloy_furnace"
|
data.machine_name = "alloy_furnace"
|
||||||
data.machine_desc = S("%s Alloy Furnace")
|
data.machine_desc = S("%s Alloy Furnace")
|
||||||
|
|
||||||
|
data.insert_object = technic.insert_object_unique_stack
|
||||||
|
data.can_insert = technic.can_insert_unique_stack
|
||||||
|
|
||||||
technic.register_base_machine(data)
|
technic.register_base_machine(data)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -452,7 +452,7 @@ function technic.discharge_tools(meta, batt_charge, charge_step, max_charge)
|
|||||||
if inv:is_empty("dst") then
|
if inv:is_empty("dst") then
|
||||||
return batt_charge, false
|
return batt_charge, false
|
||||||
end
|
end
|
||||||
srcstack = inv:get_stack("dst", 1)
|
local srcstack = inv:get_stack("dst", 1)
|
||||||
local toolname = srcstack:get_name()
|
local toolname = srcstack:get_name()
|
||||||
if technic.power_tools[toolname] == nil then
|
if technic.power_tools[toolname] == nil then
|
||||||
return batt_charge, false
|
return batt_charge, false
|
||||||
|
@ -215,7 +215,7 @@ function technic.register_cable(tier, size)
|
|||||||
if i == 1 then
|
if i == 1 then
|
||||||
def.on_place = function(itemstack, placer, pointed_thing)
|
def.on_place = function(itemstack, placer, pointed_thing)
|
||||||
local pointed_thing_diff = vector.subtract(pointed_thing.above, pointed_thing.under)
|
local pointed_thing_diff = vector.subtract(pointed_thing.above, pointed_thing.under)
|
||||||
local num
|
local num = 1
|
||||||
local changed
|
local changed
|
||||||
for k, v in pairs(pointed_thing_diff) do
|
for k, v in pairs(pointed_thing_diff) do
|
||||||
if v ~= 0 then
|
if v ~= 0 then
|
||||||
@ -225,7 +225,7 @@ function technic.register_cable(tier, size)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
local crtl = placer:get_player_control()
|
local crtl = placer:get_player_control()
|
||||||
if (crtl.aux1 or crtl.sneak) and not (crtl.aux1 and crtl.sneak) then
|
if (crtl.aux1 or crtl.sneak) and not (crtl.aux1 and crtl.sneak) and changed then
|
||||||
local fine_pointed = minetest.pointed_thing_to_face_pos(placer, pointed_thing)
|
local fine_pointed = minetest.pointed_thing_to_face_pos(placer, pointed_thing)
|
||||||
fine_pointed = vector.subtract(fine_pointed, pointed_thing.above)
|
fine_pointed = vector.subtract(fine_pointed, pointed_thing.above)
|
||||||
fine_pointed[changed] = nil
|
fine_pointed[changed] = nil
|
||||||
|
@ -15,6 +15,7 @@ if minetest.get_modpath("dye") then
|
|||||||
-- register recipes with the same crafting ratios as `dye` provides
|
-- register recipes with the same crafting ratios as `dye` provides
|
||||||
local dye_recipes = {
|
local dye_recipes = {
|
||||||
{"technic:coal_dust", "dye:black 2"},
|
{"technic:coal_dust", "dye:black 2"},
|
||||||
|
{"default:blueberries", "dye:violet 2"},
|
||||||
{"default:grass_1", "dye:green 1"},
|
{"default:grass_1", "dye:green 1"},
|
||||||
{"default:dry_shrub", "dye:brown 1"},
|
{"default:dry_shrub", "dye:brown 1"},
|
||||||
{"default:junglegrass", "dye:green 2"},
|
{"default:junglegrass", "dye:green 2"},
|
||||||
|
@ -4,22 +4,26 @@ local S = technic.getter
|
|||||||
local fs_helpers = pipeworks.fs_helpers
|
local fs_helpers = pipeworks.fs_helpers
|
||||||
local tube_entry = "^pipeworks_tube_connection_metallic.png"
|
local tube_entry = "^pipeworks_tube_connection_metallic.png"
|
||||||
|
|
||||||
local tube = {
|
function technic.default_can_insert(pos, node, stack, direction)
|
||||||
insert_object = function(pos, node, stack, direction)
|
local meta = minetest.get_meta(pos)
|
||||||
local meta = minetest.get_meta(pos)
|
local inv = meta:get_inventory()
|
||||||
local inv = meta:get_inventory()
|
if meta:get_int("splitstacks") == 1 then
|
||||||
return inv:add_item("src", stack)
|
stack = stack:peek_item(1)
|
||||||
end,
|
end
|
||||||
can_insert = function(pos, node, stack, direction)
|
return inv:room_for_item("src", stack)
|
||||||
local meta = minetest.get_meta(pos)
|
end
|
||||||
local inv = meta:get_inventory()
|
|
||||||
if meta:get_int("splitstacks") == 1 then
|
function technic.new_default_tube()
|
||||||
stack = stack:peek_item(1)
|
return {
|
||||||
end
|
insert_object = function(pos, node, stack, direction)
|
||||||
return inv:room_for_item("src", stack)
|
local meta = minetest.get_meta(pos)
|
||||||
end,
|
local inv = meta:get_inventory()
|
||||||
connect_sides = {left = 1, right = 1, back = 1, top = 1, bottom = 1},
|
return inv:add_item("src", stack)
|
||||||
}
|
end,
|
||||||
|
can_insert = technic.default_can_insert,
|
||||||
|
connect_sides = {left = 1, right = 1, back = 1, top = 1, bottom = 1},
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
local connect_default = {"bottom", "back", "left", "right"}
|
local connect_default = {"bottom", "back", "left", "right"}
|
||||||
|
|
||||||
@ -64,6 +68,14 @@ function technic.register_base_machine(data)
|
|||||||
"listring[current_player;main]"
|
"listring[current_player;main]"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local tube = technic.new_default_tube()
|
||||||
|
if data.can_insert then
|
||||||
|
tube.can_insert = data.can_insert
|
||||||
|
end
|
||||||
|
if data.insert_object then
|
||||||
|
tube.insert_object = data.insert_object
|
||||||
|
end
|
||||||
|
|
||||||
local run = function(pos, node)
|
local run = function(pos, node)
|
||||||
local meta = minetest.get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
local inv = meta:get_inventory()
|
local inv = meta:get_inventory()
|
||||||
@ -144,6 +156,7 @@ function technic.register_base_machine(data)
|
|||||||
if ltier == "lv" then
|
if ltier == "lv" then
|
||||||
tentry = ""
|
tentry = ""
|
||||||
end
|
end
|
||||||
|
|
||||||
minetest.register_node("technic:"..ltier.."_"..machine_name, {
|
minetest.register_node("technic:"..ltier.."_"..machine_name, {
|
||||||
description = machine_desc:format(tier),
|
description = machine_desc:format(tier),
|
||||||
tiles = {
|
tiles = {
|
||||||
|
@ -294,6 +294,8 @@ local function calculate_damage_multiplier(object)
|
|||||||
end
|
end
|
||||||
if ag.radiation then
|
if ag.radiation then
|
||||||
return 0.01 * ag.radiation
|
return 0.01 * ag.radiation
|
||||||
|
elseif armor_enabled then
|
||||||
|
return 0
|
||||||
end
|
end
|
||||||
if ag.fleshy then
|
if ag.fleshy then
|
||||||
return math.sqrt(0.01 * ag.fleshy)
|
return math.sqrt(0.01 * ag.fleshy)
|
||||||
|
BIN
technic/textures/technic_river_water_can.png
Normal file
BIN
technic/textures/technic_river_water_can.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 346 B |
@ -48,14 +48,17 @@ function technic.register_can(d)
|
|||||||
on_place = function(itemstack, user, pointed_thing)
|
on_place = function(itemstack, user, pointed_thing)
|
||||||
if pointed_thing.type ~= "node" then return end
|
if pointed_thing.type ~= "node" then return end
|
||||||
local pos = pointed_thing.under
|
local pos = pointed_thing.under
|
||||||
local def = minetest.registered_nodes[minetest.get_node(pos).name] or {}
|
local node_name = minetest.get_node(pos).name
|
||||||
|
local def = minetest.registered_nodes[node_name] or {}
|
||||||
if def.on_rightclick and user and not user:get_player_control().sneak then
|
if def.on_rightclick and user and not user:get_player_control().sneak then
|
||||||
return def.on_rightclick(pos, minetest.get_node(pos), user, itemstack, pointed_thing)
|
return def.on_rightclick(pos, minetest.get_node(pos), user, itemstack, pointed_thing)
|
||||||
end
|
end
|
||||||
if not def.buildable_to then
|
if not def.buildable_to or node_name == data.liquid_source_name then
|
||||||
pos = pointed_thing.above
|
pos = pointed_thing.above
|
||||||
def = minetest.registered_nodes[minetest.get_node(pos).name] or {}
|
node_name = minetest.get_node(pos).name
|
||||||
if not def.buildable_to then return end
|
def = minetest.registered_nodes[node_name] or {}
|
||||||
|
-- Try to place node above the pointed source, or abort.
|
||||||
|
if not def.buildable_to or node_name == data.liquid_source_name then return end
|
||||||
end
|
end
|
||||||
local charge = get_can_level(itemstack)
|
local charge = get_can_level(itemstack)
|
||||||
if charge == 0 then return end
|
if charge == 0 then return end
|
||||||
@ -112,3 +115,21 @@ minetest.register_craft({
|
|||||||
{'technic:zinc_ingot', 'technic:stainless_steel_ingot', 'technic:zinc_ingot'},
|
{'technic:zinc_ingot', 'technic:stainless_steel_ingot', 'technic:zinc_ingot'},
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
technic.register_can({
|
||||||
|
can_name = 'technic:river_water_can',
|
||||||
|
can_description = S("River Water Can"),
|
||||||
|
can_inventory_image = "technic_river_water_can.png",
|
||||||
|
can_capacity = 16,
|
||||||
|
liquid_source_name = "default:river_water_source",
|
||||||
|
liquid_flowing_name = "default:river_water_flowing",
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = 'technic:river_water_can 1',
|
||||||
|
recipe = {
|
||||||
|
{'technic:zinc_ingot', 'technic:rubber', 'technic:zinc_ingot'},
|
||||||
|
{'default:steel_ingot', '', 'default:steel_ingot'},
|
||||||
|
{'technic:zinc_ingot', 'default:steel_ingot', 'technic:zinc_ingot'},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
@ -18,9 +18,10 @@ minetest.register_craft({
|
|||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = 'technic:copper_locked_chest 1',
|
output = 'technic:copper_locked_chest 1',
|
||||||
|
type = "shapeless",
|
||||||
recipe = {
|
recipe = {
|
||||||
{'basic_materials:padlock'},
|
'basic_materials:padlock',
|
||||||
{'technic:copper_chest'},
|
'technic:copper_chest',
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -29,9 +29,10 @@ end
|
|||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = 'technic:gold_locked_chest',
|
output = 'technic:gold_locked_chest',
|
||||||
|
type = "shapeless",
|
||||||
recipe = {
|
recipe = {
|
||||||
{'basic_materials:padlock'},
|
'basic_materials:padlock',
|
||||||
{'technic:gold_chest'},
|
'technic:gold_chest',
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -25,9 +25,10 @@ minetest.register_craft({
|
|||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = 'technic:iron_locked_chest 1',
|
output = 'technic:iron_locked_chest 1',
|
||||||
|
type = "shapeless",
|
||||||
recipe = {
|
recipe = {
|
||||||
{'basic_materials:padlock'},
|
'basic_materials:padlock',
|
||||||
{'technic:iron_chest'},
|
'technic:iron_chest',
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
# technic_chests translation template
|
# technic_chests translation template
|
||||||
|
|
||||||
%s Chest = Coffre en %s
|
%s Chest = Coffre en %s
|
||||||
%s Locked Chest = Coffre vérouillé en %s
|
%s Locked Chest = Coffre verrouillé en %s
|
||||||
%s Locked Chest (owned by %s) = Coffre vérouillé en %s (appartenant à %s)
|
%s Locked Chest (owned by %s) = Coffre verrouillé en %s (appartient à %s)
|
||||||
Color Filter: %s = Filtre couleur : %s
|
Color Filter: %s = Filtre couleur : %s
|
||||||
Edit chest description: = Editer la descrition du coffre
|
Edit chest description: = Editer la description du coffre
|
||||||
|
|
||||||
# Colors
|
# Colors
|
||||||
Black = Noir
|
Black = Noir
|
||||||
Blue = Bleu
|
Blue = Bleu
|
||||||
Brown = Marron
|
Brown = Marron
|
||||||
Cyan = Cyan
|
Cyan = Cyan
|
||||||
Dark Green = Vert sombre
|
Dark Green = Vert foncé
|
||||||
Dark Grey = Gris sombre
|
Dark Grey = Gris foncé
|
||||||
Green = Vert
|
Green = Vert
|
||||||
Grey = Gris
|
Grey = Gris
|
||||||
Magenta = Magenta
|
Magenta = Magenta
|
||||||
@ -25,15 +25,15 @@ Yellow = Jaune
|
|||||||
None = Rien
|
None = Rien
|
||||||
|
|
||||||
# Materials
|
# Materials
|
||||||
Copper = Cuivre
|
Copper = cuivre
|
||||||
Gold = Or
|
Gold = or
|
||||||
Iron = Fer
|
Iron = fer
|
||||||
Mithril = Mithril
|
Mithril = mithril
|
||||||
Silver = Argent
|
Silver = argent
|
||||||
Wooden = Bois
|
Wooden = bois
|
||||||
|
|
||||||
# Sorting
|
# Sorting
|
||||||
Sort = Tri
|
Sort = Tri
|
||||||
Auto-sort is %s = Tri automatique %s
|
Auto-sort is %s = Tri automatique %s
|
||||||
Off = inactivé
|
Off = désactivé
|
||||||
On = activé
|
On = activé
|
||||||
|
@ -20,9 +20,10 @@ end
|
|||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = 'technic:mithril_locked_chest 1',
|
output = 'technic:mithril_locked_chest 1',
|
||||||
|
type = "shapeless",
|
||||||
recipe = {
|
recipe = {
|
||||||
{'basic_materials:padlock'},
|
'basic_materials:padlock',
|
||||||
{'technic:mithril_chest'},
|
'technic:mithril_chest',
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -159,6 +159,16 @@ local function get_receive_fields(name, data)
|
|||||||
return function(pos, formname, fields, sender)
|
return function(pos, formname, fields, sender)
|
||||||
local meta = minetest.get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
local page = "main"
|
local page = "main"
|
||||||
|
|
||||||
|
local owner = meta:get_string("owner")
|
||||||
|
if owner ~= "" then
|
||||||
|
-- prevent modification of locked chests
|
||||||
|
if owner ~= sender:get_player_name() then return end
|
||||||
|
elseif not fields.quit then
|
||||||
|
-- prevent modification of protected chests
|
||||||
|
if minetest.is_protected(pos, sender:get_player_name()) then return end
|
||||||
|
end
|
||||||
|
|
||||||
if fields.sort or (data.autosort and fields.quit and meta:get_int("autosort") == 1) then
|
if fields.sort or (data.autosort and fields.quit and meta:get_int("autosort") == 1) then
|
||||||
sort_inventory(meta:get_inventory())
|
sort_inventory(meta:get_inventory())
|
||||||
end
|
end
|
||||||
|
@ -20,9 +20,10 @@ end
|
|||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = 'technic:silver_locked_chest',
|
output = 'technic:silver_locked_chest',
|
||||||
|
type = "shapeless",
|
||||||
recipe = {
|
recipe = {
|
||||||
{'basic_materials:padlock'},
|
'basic_materials:padlock',
|
||||||
{'technic:silver_chest'},
|
'technic:silver_chest',
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -59,7 +59,7 @@ else
|
|||||||
if minetest.is_protected(pos, player:get_player_name()) then
|
if minetest.is_protected(pos, player:get_player_name()) then
|
||||||
return 0
|
return 0
|
||||||
end
|
end
|
||||||
return stack:get_count()
|
return count
|
||||||
end
|
end
|
||||||
|
|
||||||
can_dig = function(pos, player)
|
can_dig = function(pos, player)
|
||||||
|
Reference in New Issue
Block a user