1
0
镜像自地址 https://github.com/minetest-mods/mesecons.git 已同步 2025-12-16 06:45:27 +01:00

38 次代码提交

作者 SHA1 备注 提交日期
SmallJoker
57a134b555 mesecons: Unify duplicated code
The new comments should help understanding what is going on
to ease maintenance in the long-run.

Co-authored-by: Jude Melton-Houghton <jwmhjwmh@gmail.com>
2025-11-21 20:11:09 +01:00
SmallJoker
4301f02e71 Luacontroller: Add overheat factor for deferred tasks (#715) 2025-11-16 09:47:47 +01:00
sfence
e2fc73da98 Support for Hades Revisited (#710) 2025-06-25 21:22:06 +02:00
SX
f24429b9f7 Switch to mineunit-actions (#708) 2025-06-12 09:28:11 +02:00
The4codeblocks
27072542cf Replace on_rotate_horiz with on_rotate and paramtype2 = "4dir"
This raises the minimal Luanti/Minetest version to 5.7.0.
2025-05-17 22:51:06 +02:00
sfan5
b79962402b Try to fix mineunit in CI 2025-05-03 22:36:14 +02:00
sfan5
49879ab13c Update README for Luanti 2025-05-03 22:29:18 +02:00
sfan5
4c142ea871 Add more versions to CI smoke test 2025-05-03 22:29:18 +02:00
Niklp
1513a490dc Replace deprecated image fields in crafitem definitions
This has been a legacy field for at least 13 years now
2025-04-28 21:37:02 +02:00
TarasArt
4bd59137a2 Add Ukrainian localization (#703) 2025-03-15 13:46:27 +01:00
blut
a0580f9f20 mesecons_gamecompat: Fix Mineclonia support
Fix node aliases
Synchronize unmovable_by_piston (node group)
Synchronize _mcl_pistons_unmovable (entity definition)
Use mcl_redstone_torch:redstoneblock (doesn't seem to interfere with the redstone functionality)
Automatic bed and door mvps stopper registration
2025-02-11 19:16:53 +01:00
blut
93751a9014 mesecons_gamecompat: Add redstone <--> mesecon wire crafting recipes 2025-02-11 19:15:38 +01:00
blut
786094ec06 mesecons_pistons: Fix impercise placement orientation
Piston placement used to be finicky and not map correctly to the viewing angle
2025-02-11 19:10:53 +01:00
blut
55359c7a0b mesecons_extrawires: Fix Mineclonia compatibility 2025-02-11 19:10:53 +01:00
blut
28467fc3cb Move mesecons_doors to mesecons_gamecompat 2025-02-11 19:10:53 +01:00
blut
4eeab8f6f5 mesecons_gamecompat: Automatically register mvps stoppers
- registered doors
- registered beds
- metal trapdoors
2025-02-11 19:05:01 +01:00
Maksym H.
1f9e86c3da Make the detector recipe from luacontroller optional (#696) 2025-01-02 10:19:16 +01:00
Maksym H.
dd073d2e83 Add missing use_texture_alpha (#697) 2024-12-28 15:23:18 +01:00
luk3yx
320ec93544 Limit chatcommand parameter length in command blocks (#695) 2024-12-22 19:08:44 +01:00
randomei
8051129f82 Russian translation, gates localization (#692) 2024-12-19 22:03:34 +01:00
sfan5
5883a0ce65 Change test workflow to Luanti 5.10 2024-12-10 15:17:58 +01:00
Darin
d547f5fe43 Added sha256 function to lua controller (#690) 2024-12-07 15:53:20 +01:00
SmallJoker
5c82089146 Detector: Ignore unexpected digiline data types 2024-12-06 18:50:44 +01:00
tour
31b56063a0 commandblock: replace deprecated formspec element "invsize" 2024-11-15 11:04:14 +01:00
mruncreative
b46c589a38 Support doors and trapdoors from mods (#683)
* Support doors and trapdoors from mods

Removed hardcoded door names and instead now use the API of the door mod to meseconify all doors and trapdoors that have been registered after the mods are finished loading.

* indentation as described by sfan5
2024-10-16 00:27:20 +02:00
sfan5
ac83dead50 mesecons_doors: Don't modify doors that are already mesecon-enabled 2024-10-08 20:30:26 +02:00
sfan5
ff87cf3162 Add smoke test with engine using Docker 2024-08-26 22:03:10 +02:00
sfan5
096df65cc6 Update modpack.conf 2024-08-26 22:03:10 +02:00
sfan5
f718816cea Modernize readme 2024-08-16 16:45:33 +02:00
Github is a non-free platform owned by Microsoft. Reasonable alternatives exist, such as Gitea, Sourcehut. We need a federated, mastodon-like forge based on ForgeFed. See: https://forgefed.org
9ff3ab1007 MineClonia compat (#677) 2024-08-16 16:15:10 +02:00
Zemtzov7
368b294c70 Fix mesecons displayed as unknown(??) mod in the profiler (#679) 2024-08-16 11:37:44 +02:00
sfan5
fe57adec26 Permit number type for 'distance' in digiline message again
fixes #680
2024-08-15 15:10:32 +02:00
DS
d52eac5a4a Add documentation for Microcontroller (#603) 2024-08-01 18:03:30 +02:00
Olivier Dragon
e2c8a81e7b Move textures to correct dependency issue between delayer and gates (#676) 2024-08-01 18:02:20 +02:00
Bebibio
e71cdb6f08 Add French translation (#675) 2024-08-01 17:19:49 +02:00
1F616EMO~nya
0c7bb316c7 Check for digiline message field type (#670) 2024-07-02 12:32:19 +02:00
mruncreative
0a4651c33c Changes to torch and delayer appearance (#669)
* plantlike, x-shaped torch
* removed separate LEDs for luacontroller since already contained in base mod it depends on
* changed delayer textures to be more consistent with other gates
* Reduced the amount of textures needed for pistons with texture modifiers. Will continue to work fine with all existing texturepacks. No change in graphics.
* use luacontroller_LED instead of microcontroller_LED to prevent breaking the digistuff mod which inherits it. I hope no mods inherit microcontroller LED.
2024-06-08 13:43:47 +02:00
Mikita Wiśniewski
a82bac7b5b [mesecons_doors] Improve code quality and fix Voxelgarden support (#671)
now trapdoors are also overridden using their own function, and both
`meseconify_door` and `meseconify_trapdoor` are now ran inside loops
In the future, this could help refactor this mod entirely to not list doors
manually but parse through the `doors.registered_*` variables,
ensuring that every door works.

As a nice bonus, Voxelgarden support is fixed, and potentially so is
support for other games with exotic implementations of the doors mod. No
longer are we assuming that the existence of doors.get means that all
the trapdoors exist too; now, if the meseconify function doesn't find
their definition, it just returns without crashing.
2024-05-20 20:21:52 +02:00
修改 171 个文件,包含 1223 行新增374 行删除

查看文件

@@ -1,41 +0,0 @@
on: [push, pull_request]
name: Check & Release
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- name: apt
run: sudo apt-get install -y luarocks
- name: luacheck install
run: luarocks install --local luacheck
- name: luacheck run
run: $HOME/.luarocks/bin/luacheck ./
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- name: apt
run: sudo apt-get install -y luarocks
- name: busted install
run: luarocks install --local busted
- name: luacov install
run: luarocks install --local luacov
- name: mineunit install
run: luarocks install --server=https://luarocks.org/dev --local mineunit
- name: run mesecons tests
working-directory: ./mesecons/
run: $HOME/.luarocks/bin/mineunit -q
- name: run mesecons_mvps tests
working-directory: ./mesecons_mvps/
run: $HOME/.luarocks/bin/mineunit -q
- name: run mesecons_fpga tests
working-directory: ./mesecons_fpga/
run: $HOME/.luarocks/bin/mineunit -q
- name: run mesecons_luacontroller tests
working-directory: ./mesecons_luacontroller/
run: $HOME/.luarocks/bin/mineunit -q

45
.github/workflows/check.yml vendored 普通文件
查看文件

@@ -0,0 +1,45 @@
on: [push, pull_request]
name: "Check"
jobs:
lint:
runs-on: ubuntu-latest
name: "Luacheck"
steps:
- uses: actions/checkout@main
- name: apt
run: sudo apt-get install -y luarocks
- name: install luacheck
run: luarocks install --local luacheck
- name: run luacheck
run: $HOME/.luarocks/bin/luacheck ./
mineunit:
runs-on: ubuntu-latest
name: "Mineunit tests"
steps:
- uses: actions/checkout@main
- name: run mesecons tests
uses: mt-mods/mineunit-actions@master
with:
coverage: false
mineunit-args: -q
working-directory: ./mesecons
- name: run mesecons_mvps tests
uses: mt-mods/mineunit-actions@master
with:
coverage: false
mineunit-args: -q
working-directory: ./mesecons_mvps
- name: run mesecons_fpga tests
uses: mt-mods/mineunit-actions@master
with:
coverage: false
mineunit-args: -q
working-directory: ./mesecons_fpga
- name: run mesecons_luacontroller tests
uses: mt-mods/mineunit-actions@master
with:
coverage: false
mineunit-args: -q
working-directory: ./mesecons_luacontroller

28
.github/workflows/test.yml vendored 普通文件
查看文件

@@ -0,0 +1,28 @@
on: [push, pull_request]
name: "Test"
jobs:
test:
name: "Smoke Test ${{ matrix.cfg.image }}"
runs-on: ubuntu-latest
timeout-minutes: 5
strategy:
matrix:
cfg:
- { image: 'registry.gitlab.com/minetest/minetest/server:5.0.1', mtg: false }
- { image: 'ghcr.io/minetest/minetest:5.9.0', mtg: true }
- { image: 'ghcr.io/luanti-org/luanti:5.11.0', mtg: true }
steps:
- uses: actions/checkout@main
- name: Download Minetest Game
uses: actions/checkout@main
with:
repository: 'minetest/minetest_game'
path: ./.test/minetest_game
if: ${{ matrix.cfg.mtg }}
- name: Run tests
run: ./.test/run.sh
env:
DOCKER_IMAGE: "${{ matrix.cfg.image }}"

查看文件

@@ -15,6 +15,7 @@ ignore = {
max_line_length = 200
read_globals = {
"core",
"default",
"digiline",
"doors",
@@ -27,6 +28,9 @@ read_globals = {
"table.insert_all",
"vector",
"VoxelArea",
"mcl_dyes",
"mcl_sounds",
"hades_sounds",
}
globals = {"mesecon"}

3
.test/minetest.conf 普通文件
查看文件

@@ -0,0 +1,3 @@
mg_name = singlenode
mesecon.internal_test = true
random_mod_load_order = true

31
.test/run.sh 可执行文件
查看文件

@@ -0,0 +1,31 @@
#!/bin/bash
tempdir=$(mktemp -d)
confpath=$tempdir/minetest.conf
worldpath=$tempdir/world
trap 'rm -rf "$tempdir" || :' EXIT
[ -f mesecons/mod.conf ] || { echo "Must be run in modpack root folder." >&2; exit 1; }
command -v docker >/dev/null || { echo "Docker is not installed." >&2; exit 1; }
mtg=.test/minetest_game
[ -d $mtg ] || echo "A source checkout of minetest_game was not found. This can fail if your docker image does not ship a game." >&2
mkdir "$worldpath"
cp -v .test/minetest.conf "$confpath"
chmod -R 777 "$tempdir"
args=(
-v "$confpath":/etc/minetest/minetest.conf
-v "$tempdir":/var/lib/minetest/.minetest
-v "$PWD":/var/lib/minetest/.minetest/world/worldmods/mesecons
)
[ -d $mtg ] && args+=(
-v "$(realpath $mtg)":/var/lib/minetest/.minetest/games/minetest_game
)
args+=("$DOCKER_IMAGE")
[ -d $mtg ] && args+=(--gameid minetest)
docker run --rm -i "${args[@]}"
ls -la "$worldpath"
test -f "$worldpath/mesecon_actionqueue" || exit 1
exit 0

查看文件

@@ -99,8 +99,9 @@ do
offstate = "mesecons:test_conductor_rot_off",
}}
mesecon.register_node("mesecons:test_conductor_rot", {
paramtype2 = "4dir",
description = "Rotatable Test Conductor",
on_rotate = mesecon.on_rotate_horiz,
on_rotate = mesecon.on_rotate,
}, {mesecons = off_spec}, {mesecons = on_spec})
end

查看文件

@@ -12,23 +12,28 @@ MESECONS by Jeija and contributors
Mezzee-what?
------------
[Mesecons](https://mesecons.net/)! They're yellow, they're conductive, and they'll add a whole new dimension to Minetest's gameplay.
Mesecons is a mod for [Minetest](https://www.minetest.net/) that implements a ton of items related to digital circuitry, such as wires, buttons, lights, and even programmable controllers. Among other things, there are also pistons, solar panels, pressure plates, and note blocks.
[Mesecons](https://mesecons.net/)! They're yellow, they're conductive, and they'll add a whole new dimension to Luanti's gameplay.
Mesecons is a mod for [Luanti](https://www.luanti.org/) that implements a ton of items related to digital circuitry, such as wires, buttons, lights, and even programmable controllers.
Among other things, there are also pistons, solar panels, pressure plates, and note blocks.
Mesecons has a similar goal to Redstone in Minecraft, but works in its own way, with different rules and mechanics.
OK, I want in.
--------------
Go get it!
[DOWNLOAD IT NOW](https://github.com/minetest-mods/mesecons/archive/master.zip)
[![ContentDB](https://content.luanti.org/packages/Jeija/mesecons/shields/downloads/)](https://content.luanti.org/packages/Jeija/mesecons/)
Now go ahead and install it like any other Minetest mod. Don't know how? Check out [the wonderful page about it](https://wiki.minetest.net/Mods) over at the official Minetest Wiki. For your convenience, here's a quick summary:
Install it directly from your client by searching it in the Online Content tab.
**Or** if you've downloaded a ZIP file check out [this page](https://docs.luanti.org/for-players/mods/) over at the official Luanti Wiki. For your convenience, here's a quick summary:
1. If Mesecons is still in a ZIP file, extract the folder inside to somewhere on the computer.
2. Make sure that when you open the folder, you can directly find `README.md` in the listing. If you just see another folder, move that folder up one level and delete the old one.
3. Open up the Minetest mods folder - usually `/mods/`. If you see the `minetest` or folder inside of that, that is your mod folder instead.
3. Open up the Luanti mods folder - called `mods`.
4. Copy the Mesecons folder into the mods folder.
Don't like some parts of Mesecons? Open up the Mesecons folder and delete the subfolder containing the mod you don't want. If you didn't want movestones, for example, all you have to do is delete the `mesecons_movestones` folder and they will no longer be available.
@@ -37,21 +42,21 @@ There are no dependencies - it will work right after installing!
How do I use this thing?
------------------------
How about a [quick overview video](https://www.youtube.com/watch?v=6kmeQj6iW5k)?
Or maybe a [comprehensive reference](http://mesecons.net/items.html) is your style?
Or maybe a [comprehensive reference](https://mesecons.net/items.html) is your style?
An overview for the very newest of new beginners? How does [this one](http://uberi.mesecons.net/projects/MeseconsBasics/index.html) look?
An overview for the very newest of new beginners? How does [this one](https://uberi.mesecons.net/projects/MeseconsBasics/index.html) look?
There is also a [wiki page](https://wiki.minetest.net/Mods/Mesecons) dedicated to this mod.
Want to get more into building? Why not check out the [Mesecons Laboratory](http://uberi.mesecons.net/), a website dedicated to advanced Mesecons builders?
Want to get more into building? Why not check out the [Mesecons Laboratory](https://uberi.mesecons.net/), a website dedicated to advanced Mesecons builders?
Want to contribute to Mesecons itself? Check out the [source code](https://github.com/minetest-mods/mesecons)!
Who wrote it anyways?
---------------------
These awesome people made Mesecons possible!
These awesome people made Mesecons possible! (as of 2016)
| Contributor | Contribution |
| --------------- | -------------------------------- |
@@ -72,8 +77,11 @@ These awesome people made Mesecons possible!
There are also a whole bunch of other people helping with everything from code to testing and feedback. Mesecons would also not be possible without their help!
Check out the [entire contributor list](https://github.com/minetest-mods/mesecons/graphs/contributors) on GitHub.
Alright, how can I use it?
--------------------------
All textures in this project are licensed under the CC-BY-SA 3.0 (Creative Commons Attribution-ShareAlike 3.0 Generic).
That means you can distribute and remix them as much as you want to, under the condition that you give credit to the authors and the project, and that if you remix and release them, they must be under the same or similar license to this one.

查看文件

@@ -42,6 +42,7 @@
},
"Logic" : {
"Luacontroller" : "mesecons_luacontroller/doc/luacontroller",
"Microcontroller" : "mesecons_microcontroller/doc/microcontroler",
"FPGA" : "mesecons_fpga/doc/fpga",
"FPGA Programmer" : "mesecons_fpga/doc/programmer",
"Torch" : "mesecons_torch/doc/torch",

查看文件

@@ -70,7 +70,17 @@ end
-- However, even that does not work in some cases, that's why we delay the time the globalsteps
-- start to be execute by 4 seconds
local m_time = 0
local resumetime = mesecon.setting("resumetime", 4)
local function globalstep_func(dtime)
-- don't even try if server has not been running for XY seconds; resumetime = time to wait
-- after starting the server before processing the ActionQueue, don't set this too low
if m_time < resumetime then
m_time = m_time + dtime
return
end
local actions = queue.actions
-- split into two categories:
-- actions_now: actions to execute now
@@ -112,23 +122,7 @@ local function globalstep_func(dtime)
end
end
-- delay the time the globalsteps start to be execute by 4 seconds
do
local m_time = 0
local resumetime = mesecon.setting("resumetime", 4)
local globalstep_func_index = #minetest.registered_globalsteps + 1
minetest.register_globalstep(function(dtime)
m_time = m_time + dtime
-- don't even try if server has not been running for XY seconds; resumetime = time to wait
-- after starting the server before processing the ActionQueue, don't set this too low
if m_time < resumetime then
return
end
-- replace this globalstep function
minetest.registered_globalsteps[globalstep_func_index] = globalstep_func
end)
end
minetest.register_globalstep(globalstep_func)
function queue:execute(action)
-- ignore if action queue function name doesn't exist,

查看文件

@@ -123,3 +123,11 @@ dofile(minetest.get_modpath("mesecons").."/legacy.lua");
--Services like turnoff receptor on dignode and so on
dofile(minetest.get_modpath("mesecons").."/services.lua");
-- Automated test run
if mesecon.setting("internal_test", false) then
-- currently does nothing, we only fail if some error happens right on startup
minetest.after(5, function()
minetest.request_shutdown()
end)
end

查看文件

@@ -90,6 +90,16 @@ function mesecon.get_any_rules(node)
mesecon.get_any_outputrules(node))
end
local function get_rules_from_ndef(ndef, node)
local rules = ndef and ndef.rules
if type(rules) == 'function' then
return rules(node)
elseif rules then
return rules
end
return mesecon.rules.default
end
-- Receptors
-- Nodes that can power mesecons
function mesecon.is_receptor_on(nodename)
@@ -117,17 +127,7 @@ function mesecon.is_receptor(nodename)
end
function mesecon.receptor_get_rules(node)
local receptor = mesecon.get_receptor(node.name)
if receptor then
local rules = receptor.rules
if type(rules) == 'function' then
return rules(node)
elseif rules then
return rules
end
end
return mesecon.rules.default
return get_rules_from_ndef(mesecon.get_receptor(node.name), node)
end
-- Effectors
@@ -157,16 +157,7 @@ function mesecon.is_effector(nodename)
end
function mesecon.effector_get_rules(node)
local effector = mesecon.get_effector(node.name)
if effector then
local rules = effector.rules
if type(rules) == 'function' then
return rules(node)
elseif rules then
return rules
end
end
return mesecon.rules.default
return get_rules_from_ndef(mesecon.get_effector(node.name), node)
end
-- #######################
@@ -330,16 +321,7 @@ function mesecon.get_conductor_off(node_on, rulename)
end
function mesecon.conductor_get_rules(node)
local conductor = mesecon.get_conductor(node.name)
if conductor then
local rules = conductor.rules
if type(rules) == 'function' then
return rules(node)
elseif rules then
return rules
end
end
return mesecon.rules.default
return get_rules_from_ndef(mesecon.get_conductor(node.name), node)
end
-- some more general high-level stuff
@@ -545,46 +527,42 @@ function mesecon.turnoff(pos, link)
return true
end
-- @param getter_function Function that returns nested rules (vectors)
-- @return The matching rule or `nil`
local function find_rule_in_rules(pos, rule, getter_function)
local r_pos = vector.add(pos, rule)
local r_node = mesecon.get_node_force(r_pos)
local r_rules = getter_function(r_node)
if not r_rules then
return
end
local dir = vector.subtract(pos, r_pos)
for _, r_rule in ipairs(mesecon.flattenrules(r_rules)) do
if vector.equals(dir, r_rule) then
-- Other matches are duplicates
return r_rule
end
end
end
-- Get all linking inputrules of inputnode (effector or conductor) that is connected to
-- outputnode (receptor or conductor) at position `output` and has an output in direction `rule`
function mesecon.rules_link_rule_all(output, rule)
local input = vector.add(output, rule)
local inputnode = mesecon.get_node_force(input)
local inputrules = mesecon.get_any_inputrules(inputnode)
if not inputrules then
return {}
end
local rules = {}
for _, inputrule in ipairs(mesecon.flattenrules(inputrules)) do
-- Check if input accepts from output
if vector.equals(vector.add(input, inputrule), output) then
table.insert(rules, inputrule)
end
end
return rules
local match = find_rule_in_rules(output, rule, mesecon.get_any_inputrules)
return { match }
end
-- Get all linking outputnodes of outputnode (receptor or conductor) that is connected to
-- inputnode (effector or conductor) at position `input` and has an input in direction `rule`
function mesecon.rules_link_rule_all_inverted(input, rule)
local output = vector.add(input, rule)
local outputnode = mesecon.get_node_force(output)
local outputrules = mesecon.get_any_outputrules(outputnode)
if not outputrules then
return {}
end
local rules = {}
for _, outputrule in ipairs(mesecon.flattenrules(outputrules)) do
if vector.equals(vector.add(output, outputrule), input) then
table.insert(rules, mesecon.invertRule(outputrule))
end
end
return rules
local match = find_rule_in_rules(input, rule, mesecon.get_any_outputrules)
return { match and mesecon.invertRule(match) }
end
-- @param pos Node position (a vector) to check
-- @param rule Optional. Specific rule (i.e. node side) to check.
-- @return Returns a list of vectors that power `pos`, or `false` if unpowered.
function mesecon.is_powered(pos, rule)
local node = mesecon.get_node_force(pos)
local rules = mesecon.get_any_inputrules(node)
@@ -593,26 +571,15 @@ function mesecon.is_powered(pos, rule)
-- List of nodes that send out power to pos
local sourcepos = {}
if not rule then
for _, rule in ipairs(mesecon.flattenrules(rules)) do
local rulenames = mesecon.rules_link_rule_all_inverted(pos, rule)
for _, rname in ipairs(rulenames) do
local np = vector.add(pos, rname)
local nn = mesecon.get_node_force(np)
if (mesecon.is_conductor_on(nn, mesecon.invertRule(rname))
or mesecon.is_receptor_on(nn.name)) then
table.insert(sourcepos, np)
end
end
end
else
local rules_flat = rule and { rule } or mesecon.flattenrules(rules)
for _, rule in ipairs(rules_flat) do
local rulenames = mesecon.rules_link_rule_all_inverted(pos, rule)
for _, rname in ipairs(rulenames) do
local np = vector.add(pos, rname)
local nn = mesecon.get_node_force(np)
if (mesecon.is_conductor_on (nn, mesecon.invertRule(rname))
or mesecon.is_receptor_on (nn.name)) then
if (mesecon.is_conductor_on(nn, mesecon.invertRule(rname))
or mesecon.is_receptor_on(nn.name)) then
table.insert(sourcepos, np)
end
end

查看文件

@@ -0,0 +1,4 @@
# textdomain: mesecons
### oldwires.lua ###
Mesecons=Mesecons

查看文件

@@ -0,0 +1,4 @@
# textdomain: mesecons
### oldwires.lua ###
Mesecons=Мезеконы

查看文件

@@ -0,0 +1,5 @@
# textdomain: mesecons
### oldwires.lua ###
Mesecons=Месекони
Mod that implements a ton of items related to digital circuitry.=Мод, який реалізує масу елементів, пов’язаних із цифровою схемою.

查看文件

之前

宽度:  |  高度:  |  大小: 844 B

之后

宽度:  |  高度:  |  大小: 844 B

查看文件

之前

宽度:  |  高度:  |  大小: 838 B

之后

宽度:  |  高度:  |  大小: 838 B

查看文件

之前

宽度:  |  高度:  |  大小: 851 B

之后

宽度:  |  高度:  |  大小: 851 B

查看文件

之前

宽度:  |  高度:  |  大小: 846 B

之后

宽度:  |  高度:  |  大小: 846 B

查看文件

@@ -17,6 +17,7 @@ function mesecon.on_rotate(pos, node, _, _, new_param2)
end
-- An on_rotate callback for components which stay horizontal.
-- Deprecated. Use paramtype2 = "4dir" instead.
function mesecon.on_rotate_horiz(pos, node, user, mode, new_param2)
if not minetest.global_exists("screwdriver") or mode ~= screwdriver.ROTATE_FACE then
return false

查看文件

@@ -0,0 +1,4 @@
# textdomain: mesecons_blinkyplant
### init.lua ###
Blinky Plant=Plante clignotante

查看文件

@@ -0,0 +1,4 @@
# textdomain: mesecons_blinkyplant
### init.lua ###
Blinky Plant=Мигающий цветок

查看文件

@@ -0,0 +1,4 @@
# textdomain: mesecons_blinkyplant
### init.lua ###
Blinky Plant=Миготлива квітка

查看文件

@@ -0,0 +1,4 @@
# textdomain: mesecons_button
### init.lua ###
Button=Bouton

查看文件

@@ -0,0 +1,4 @@
# textdomain: mesecons_button
### init.lua ###
Button=Кнопка

查看文件

@@ -0,0 +1,4 @@
# textdomain: mesecons_button
### init.lua ###
Button=Кнопка

查看文件

@@ -1,4 +1,5 @@
local S = minetest.get_translator(minetest.get_current_modname())
local param_maxlen = mesecon.setting("commandblock_param_maxlen", 10000)
minetest.register_chatcommand("say", {
params = "<text>",
@@ -48,7 +49,7 @@ minetest.register_chatcommand("hp", {
local function initialize_data(meta)
local commands = minetest.formspec_escape(meta:get_string("commands"))
meta:set_string("formspec",
"invsize[9,5;]" ..
"size[9,5]" ..
"textarea[0.5,0.5;8.5,4;commands;Commands;"..commands.."]" ..
"label[1,3.8;@nearest, @farthest, and @random are replaced by the respective player names]" ..
"button_exit[3.3,4.5;2,1;submit;Submit]")
@@ -156,6 +157,11 @@ local function commandblock_action_on(pos, node)
minetest.chat_send_player(owner, "The command "..cmd.." does not exist")
return
end
if #param > param_maxlen then
minetest.chat_send_player(owner, "Command parameters are limited to max. " ..
param_maxlen .. " bytes.")
return
end
local has_privs, missing_privs = minetest.check_player_privs(owner, cmddef.privs)
if not has_privs then
minetest.chat_send_player(owner, "You don't have permission "

查看文件

@@ -0,0 +1,7 @@
# textdomain: mesecons_commandblock
### init.lua ###
Say <text> as the server=Dire <text> au serveur
Say <text> to <name> privately=Dire <text> à <name> en privé
Set health of <name> to <value> hitpoints=Définir la vie de <name> sur <value> cœurs
Command Block=Bloc de commandes

查看文件

@@ -0,0 +1,7 @@
# textdomain: mesecons_commandblock
### init.lua ###
Say <text> as the server=Сказать <текст> от имени сервера
Say <text> to <name> privately=Сказать <текст> игроку <имя> в личном сообщении
Set health of <name> to <value> hitpoints=Установить здоровье игрока <имя> на <значение> хитпоинтов
Command Block=Комадный блок

查看文件

@@ -0,0 +1,7 @@
# textdomain: mesecons_commandblock
### init.lua ###
Say <text> as the server=Сказати <текст> від імені сервера
Say <text> to <name> privately=Сказати <текст> гравцю <ім'я> в приватному повідомленні
Set health of <name> to <value> hitpoints=Встановити здоров'я гравця <ім'я> на <значення> ХП
Command Block=Командний блок

查看文件

@@ -27,20 +27,6 @@ local delaytime = { 0.1, 0.3, 0.5, 1.0 }
for i = 1, 4 do
local boxes = {
{ -6/16, -8/16, -6/16, 6/16, -7/16, 6/16 }, -- the main slab
{ -2/16, -7/16, -4/16, 2/16, -26/64, -3/16 }, -- the jeweled "on" indicator
{ -3/16, -7/16, -3/16, 3/16, -26/64, -2/16 },
{ -4/16, -7/16, -2/16, 4/16, -26/64, 2/16 },
{ -3/16, -7/16, 2/16, 3/16, -26/64, 3/16 },
{ -2/16, -7/16, 3/16, 2/16, -26/64, 4/16 },
{ -6/16, -7/16, -6/16, -4/16, -27/64, -4/16 }, -- the timer indicator
{ -8/16, -8/16, -1/16, -6/16, -7/16, 1/16 }, -- the two wire stubs
{ 6/16, -8/16, -1/16, 8/16, -7/16, 1/16 }
}
-- Delayer definition defaults
local def = {
drawtype = "nodebox",
@@ -48,11 +34,14 @@ local def = {
walkable = true,
selection_box = {
type = "fixed",
fixed = { -8/16, -8/16, -8/16, 8/16, -6/16, 8/16 },
fixed = { -8/16, -8/16, -8/16, 8/16, -7/16, 8/16 },
},
node_box = {
type = "fixed",
fixed = boxes
fixed = {
{ -8/16, -8/16, -8/16, 8/16, -7/16, 8/16 }, -- bottom slab
{ -6/16, -7/16, -6/16, 6/16, -6/16, 6/16 }
},
},
paramtype = "light",
paramtype2 = "facedir",
@@ -74,16 +63,17 @@ end
local off_state = {
description = S("Delayer"),
inventory_image = "jeija_gate_off.png^jeija_delayer.png",
wield_image = "jeija_gate_off.png^jeija_delayer.png",
tiles = {
"mesecons_delayer_off_"..tostring(i)..".png",
"mesecons_delayer_bottom.png",
"mesecons_delayer_ends_off.png",
"mesecons_delayer_ends_off.png",
"mesecons_delayer_sides_off.png",
"mesecons_delayer_sides_off.png"
"jeija_microcontroller_bottom.png^jeija_gate_output_off.png^jeija_gate_off.png^"..
"jeija_delayer.png^mesecons_delayer_"..tostring(i)..".png",
"jeija_microcontroller_bottom.png^jeija_gate_output_off.png",
"jeija_gate_side.png^jeija_gate_side_output_off.png",
"jeija_gate_side.png",
"jeija_gate_side.png",
"jeija_gate_side.png",
},
inventory_image = "mesecons_delayer_off_1.png",
wield_image = "mesecons_delayer_off_1.png",
groups = off_groups,
on_punch = function(pos, node, puncher)
if minetest.is_protected(pos, puncher and puncher:get_player_name() or "") then
@@ -117,13 +107,16 @@ minetest.register_node("mesecons_delayer:delayer_off_"..tostring(i), off_state)
-- Activated delayer definition defaults
local on_state = {
description = S("You hacker you"),
inventory_image = "jeija_gate_on.png^jeija_delayer.png",
wield_image = "jeija_gate_on.png^jeija_delayer.png",
tiles = {
"mesecons_delayer_on_"..tostring(i)..".png",
"mesecons_delayer_bottom.png",
"mesecons_delayer_ends_on.png",
"mesecons_delayer_ends_on.png",
"mesecons_delayer_sides_on.png",
"mesecons_delayer_sides_on.png"
"jeija_microcontroller_bottom.png^jeija_gate_output_on.png^jeija_gate_on.png^"..
"jeija_delayer.png^mesecons_delayer_"..tostring(i)..".png",
"jeija_microcontroller_bottom.png^jeija_gate_output_on.png",
"jeija_gate_side.png^jeija_gate_side_output_on.png",
"jeija_gate_side.png",
"jeija_gate_side.png",
"jeija_gate_side.png",
},
groups = {bendy = 2, snappy = 1, dig_immediate = 2, not_in_creative_inventory = 1},
on_punch = function(pos, node, puncher)

查看文件

@@ -0,0 +1,5 @@
# textdomain: mesecons_delayer
### init.lua ###
Delayer=Retardateur
You hacker you=Vous êtes un pirate informatique

查看文件

@@ -0,0 +1,5 @@
# textdomain: mesecons_delayer
### init.lua ###
Delayer=Элемент задержки
You hacker you=Ти хакер, ти

查看文件

@@ -0,0 +1,5 @@
# textdomain: mesecons_delayer
### init.lua ###
Delayer=Затримувач
You hacker you=Ти хакер, ти

二进制文件未显示。

之后

宽度:  |  高度:  |  大小: 149 B

查看文件

之前

宽度:  |  高度:  |  大小: 84 B

之后

宽度:  |  高度:  |  大小: 84 B

查看文件

之前

宽度:  |  高度:  |  大小: 84 B

之后

宽度:  |  高度:  |  大小: 84 B

查看文件

之前

宽度:  |  高度:  |  大小: 98 B

之后

宽度:  |  高度:  |  大小: 98 B

查看文件

之前

宽度:  |  高度:  |  大小: 99 B

之后

宽度:  |  高度:  |  大小: 99 B

查看文件

之前

宽度:  |  高度:  |  大小: 136 B

之后

宽度:  |  高度:  |  大小: 136 B

查看文件

之前

宽度:  |  高度:  |  大小: 109 B

之后

宽度:  |  高度:  |  大小: 109 B

查看文件

之前

宽度:  |  高度:  |  大小: 110 B

之后

宽度:  |  高度:  |  大小: 110 B

二进制文件未显示。

之后

宽度:  |  高度:  |  大小: 338 B

二进制文件未显示。

之后

宽度:  |  高度:  |  大小: 337 B

二进制文件未显示。

之后

宽度:  |  高度:  |  大小: 339 B

二进制文件未显示。

之后

宽度:  |  高度:  |  大小: 334 B

二进制文件未显示。

之前

宽度:  |  高度:  |  大小: 221 B

二进制文件未显示。

之前

宽度:  |  高度:  |  大小: 176 B

二进制文件未显示。

之前

宽度:  |  高度:  |  大小: 187 B

二进制文件未显示。

之前

宽度:  |  高度:  |  大小: 448 B

二进制文件未显示。

之前

宽度:  |  高度:  |  大小: 449 B

二进制文件未显示。

之前

宽度:  |  高度:  |  大小: 448 B

二进制文件未显示。

之前

宽度:  |  高度:  |  大小: 446 B

二进制文件未显示。

之前

宽度:  |  高度:  |  大小: 541 B

二进制文件未显示。

之前

宽度:  |  高度:  |  大小: 541 B

二进制文件未显示。

之前

宽度:  |  高度:  |  大小: 541 B

二进制文件未显示。

之前

宽度:  |  高度:  |  大小: 538 B

二进制文件未显示。

之前

宽度:  |  高度:  |  大小: 173 B

二进制文件未显示。

之前

宽度:  |  高度:  |  大小: 181 B

查看文件

@@ -66,7 +66,8 @@ local object_detector_digiline = {
effector = {
action = function(pos, _, channel, msg)
local meta = minetest.get_meta(pos)
if channel == meta:get_string("digiline_channel") then
if channel == meta:get_string("digiline_channel") and
(type(msg) == "string" or type(msg) == "number") then
meta:set_string("scanname", msg)
object_detector_make_formspec(pos)
end
@@ -110,14 +111,16 @@ minetest.register_node("mesecons_detector:object_detector_on", {
on_blast = mesecon.on_blastnode,
})
minetest.register_craft({
output = 'mesecons_detector:object_detector_off',
recipe = {
{"mesecons_gamecompat:steel_ingot", "mesecons_gamecompat:steel_ingot", "mesecons_gamecompat:steel_ingot"},
{"mesecons_gamecompat:steel_ingot", "mesecons_luacontroller:luacontroller0000", "mesecons_gamecompat:steel_ingot"},
{"mesecons_gamecompat:steel_ingot", "group:mesecon_conductor_craftable", "mesecons_gamecompat:steel_ingot"},
}
})
if minetest.get_modpath("mesecons_luacontroller") then
minetest.register_craft({
output = 'mesecons_detector:object_detector_off',
recipe = {
{"mesecons_gamecompat:steel_ingot", "mesecons_gamecompat:steel_ingot", "mesecons_gamecompat:steel_ingot"},
{"mesecons_gamecompat:steel_ingot", "mesecons_luacontroller:luacontroller0000", "mesecons_gamecompat:steel_ingot"},
{"mesecons_gamecompat:steel_ingot", "group:mesecon_conductor_craftable", "mesecons_gamecompat:steel_ingot"},
}
})
end
minetest.register_craft({
output = 'mesecons_detector:object_detector_off',
@@ -157,23 +160,6 @@ minetest.register_abm({
-- Node detector
-- Detects the node in front of it
local blacklist = {
air = true,
ignore = true,
}
function mesecon.node_detector_blacklist_add(node)
blacklist[node] = true
end
function mesecon.node_detector_blacklist_remove(node)
blacklist[node] = nil
end
function mesecon.node_detector_on_blacklist(node)
return blacklist[node] == true
end
local function node_detector_make_formspec(pos)
local meta = minetest.get_meta(pos)
if meta:get_string("distance") == "" then meta:set_string("distance", "0") end
@@ -215,7 +201,7 @@ local function node_detector_scan(pos)
local scan_for = comma_list_to_table(scanname)
return (scan_for[frontname]) or
(blacklist[frontname] ~= true and scanname == "")
(frontname ~= "air" and frontname ~= "ignore" and scanname == "")
end
local function node_detector_send_node_name(pos, node, channel, meta)
@@ -240,10 +226,10 @@ local node_detector_digiline = {
if type(msg) == "table" then
if msg.distance or msg.scanname then
if msg.distance then
if type(msg.distance) == "number" or type(msg.distance) == "string" then
meta:set_string("distance", msg.distance)
end
if msg.scanname then
if type(msg.scanname) == "string" then
meta:set_string("scanname", msg.scanname)
end
node_detector_make_formspec(pos)
@@ -257,7 +243,7 @@ local node_detector_digiline = {
else
if msg == GET_COMMAND then
node_detector_send_node_name(pos, node, channel, meta)
else
elseif type(msg) == "string" then
meta:set_string("scanname", msg)
node_detector_make_formspec(pos)
end
@@ -303,14 +289,16 @@ minetest.register_node("mesecons_detector:node_detector_on", {
on_blast = mesecon.on_blastnode,
})
minetest.register_craft({
output = 'mesecons_detector:node_detector_off',
recipe = {
{"mesecons_gamecompat:steel_ingot", "group:mesecon_conductor_craftable", "mesecons_gamecompat:steel_ingot"},
{"mesecons_gamecompat:steel_ingot", "mesecons_luacontroller:luacontroller0000", "mesecons_gamecompat:steel_ingot"},
{"mesecons_gamecompat:steel_ingot", "mesecons_gamecompat:steel_ingot", "mesecons_gamecompat:steel_ingot"},
}
})
if minetest.get_modpath("mesecons_luacontroller") then
minetest.register_craft({
output = 'mesecons_detector:node_detector_off',
recipe = {
{"mesecons_gamecompat:steel_ingot", "group:mesecon_conductor_craftable", "mesecons_gamecompat:steel_ingot"},
{"mesecons_gamecompat:steel_ingot", "mesecons_luacontroller:luacontroller0000", "mesecons_gamecompat:steel_ingot"},
{"mesecons_gamecompat:steel_ingot", "mesecons_gamecompat:steel_ingot", "mesecons_gamecompat:steel_ingot"},
}
})
end
minetest.register_craft({
output = 'mesecons_detector:node_detector_off',

查看文件

@@ -0,0 +1,5 @@
# textdomain: mesecons_detector
### init.lua ###
Player Detector=Détecteur de joueur
Node Detector=Détecteur de bloc

查看文件

@@ -0,0 +1,5 @@
# textdomain: mesecons_detector
### init.lua ###
Player Detector=Детектор игрока
Node Detector=Детектор блока

查看文件

@@ -0,0 +1,5 @@
# textdomain: mesecons_detector
### init.lua ###
Player Detector=Детектор гравця
Node Detector=Детектор блоку

查看文件

@@ -1,2 +1,3 @@
name = mesecons_detector
depends = mesecons, mesecons_gamecompat, mesecons_materials
optional_depends = mesecons_luacontroller

查看文件

@@ -1,3 +0,0 @@
name = mesecons_doors
depends = mesecons, doors
optional_depends = xpanes

查看文件

@@ -18,7 +18,7 @@ minetest.register_node("mesecons_extrawires:corner_on", {
{ name = "jeija_insulated_wire_ends_on.png", backface_culling = true },
},
paramtype = "light",
paramtype2 = "facedir",
paramtype2 = "4dir",
is_ground_content = false,
walkable = false,
sunlight_propagates = true,
@@ -33,7 +33,7 @@ minetest.register_node("mesecons_extrawires:corner_on", {
offstate = "mesecons_extrawires:corner_off"
}},
on_blast = mesecon.on_blastnode,
on_rotate = mesecon.on_rotate_horiz,
on_rotate = mesecon.on_rotate,
})
minetest.register_node("mesecons_extrawires:corner_off", {
@@ -45,7 +45,7 @@ minetest.register_node("mesecons_extrawires:corner_off", {
{ name = "jeija_insulated_wire_ends_off.png", backface_culling = true },
},
paramtype = "light",
paramtype2 = "facedir",
paramtype2 = "4dir",
is_ground_content = false,
walkable = false,
sunlight_propagates = true,
@@ -59,7 +59,7 @@ minetest.register_node("mesecons_extrawires:corner_off", {
onstate = "mesecons_extrawires:corner_on"
}},
on_blast = mesecon.on_blastnode,
on_rotate = mesecon.on_rotate_horiz,
on_rotate = mesecon.on_rotate,
})
minetest.register_craft({

查看文件

@@ -41,7 +41,7 @@ for k, state in ipairs(doublecorner_states) do
{ name = "jeija_insulated_wire_ends_" .. w2 .. ".png", backface_culling = true },
},
paramtype = "light",
paramtype2 = "facedir",
paramtype2 = "4dir",
is_ground_content = false,
walkable = false,
sunlight_propagates = true,
@@ -56,7 +56,7 @@ for k, state in ipairs(doublecorner_states) do
},
},
on_blast = mesecon.on_blastnode,
on_rotate = mesecon.on_rotate_horiz,
on_rotate = mesecon.on_rotate,
})
end

查看文件

@@ -3,4 +3,6 @@ dofile(minetest.get_modpath("mesecons_extrawires").."/tjunction.lua");
dofile(minetest.get_modpath("mesecons_extrawires").."/corner.lua");
dofile(minetest.get_modpath("mesecons_extrawires").."/doublecorner.lua");
dofile(minetest.get_modpath("mesecons_extrawires").."/vertical.lua");
dofile(minetest.get_modpath("mesecons_extrawires").."/mesewire.lua");
if core.registered_nodes["mesecons_gamecompat:mese"] then
dofile(minetest.get_modpath("mesecons_extrawires").."/mesewire.lua");
end

查看文件

@@ -0,0 +1,20 @@
# textdomain: mesecons_extrawires
### corner.lua ###
Insulated Mesecon Corner=Coin de Mesecon isolé
### crossover.lua ###
Insulated Mesecon Crossover=Croisement de Mesecon isolé
You hacker you!=Vous êtes un pirate informatique !
### doublecorner.lua ###
Insulated Mesecon Double Corner=Double coin de Mesecon isolé
### mesewire.lua ###
Mese Wire=Câble de Mesecon
### tjunction.lua ###
Insulated Mesecon T-junction=Croisement en T de Mesecon isolé
### vertical.lua ###
Vertical Mesecon=Mesecon vertical

查看文件

@@ -0,0 +1,20 @@
# textdomain: mesecons_extrawires
### corner.lua ###
Insulated Mesecon Corner=Изолированный мезекон (угол)
### crossover.lua ###
Insulated Mesecon Crossover=Изолированный мезекон (перекрестие)
You hacker you!=Ти хакер ти!
### doublecorner.lua ###
Insulated Mesecon Double Corner=Изолированный мезекон (двойной угол)
### mesewire.lua ###
Mese Wire=Мезе-провод
### tjunction.lua ###
Insulated Mesecon T-junction=Изолированный мезекон (Т-соединение)
### vertical.lua ###
Vertical Mesecon=Вертикальный мезекон

查看文件

@@ -0,0 +1,20 @@
# textdomain: mesecons_extrawires
### corner.lua ###
Insulated Mesecon Corner=Ізольований месекон (кут)
### crossover.lua ###
Insulated Mesecon Crossover=Ізольований месекон (перехрестя)
You hacker you!=Ти хакер ти!
### doublecorner.lua ###
Insulated Mesecon Double Corner=Ізольований месекон (подвійний кут)
### mesewire.lua ###
Mese Wire=Месе-дріт
### tjunction.lua ###
Insulated Mesecon T-junction=Ізольований месекон (T-з'єднання)
### vertical.lua ###
Vertical Mesecon=Вертикальний месекон

查看文件

@@ -29,7 +29,7 @@ minetest.register_node("mesecons_extrawires:tjunction_on", {
"jeija_insulated_wire_ends_on.png"
},
paramtype = "light",
paramtype2 = "facedir",
paramtype2 = "4dir",
is_ground_content = false,
walkable = false,
sunlight_propagates = true,
@@ -45,7 +45,7 @@ minetest.register_node("mesecons_extrawires:tjunction_on", {
offstate = "mesecons_extrawires:tjunction_off"
}},
on_blast = mesecon.on_blastnode,
on_rotate = mesecon.on_rotate_horiz,
on_rotate = mesecon.on_rotate,
})
minetest.register_node("mesecons_extrawires:tjunction_off", {
@@ -60,7 +60,7 @@ minetest.register_node("mesecons_extrawires:tjunction_off", {
"jeija_insulated_wire_ends_off.png"
},
paramtype = "light",
paramtype2 = "facedir",
paramtype2 = "4dir",
is_ground_content = false,
walkable = false,
sunlight_propagates = true,
@@ -75,7 +75,7 @@ minetest.register_node("mesecons_extrawires:tjunction_off", {
onstate = "mesecons_extrawires:tjunction_on"
}},
on_blast = mesecon.on_blastnode,
on_rotate = mesecon.on_rotate_horiz,
on_rotate = mesecon.on_rotate,
})
minetest.register_craft({

查看文件

@@ -40,6 +40,8 @@ local bottom_rules = {
{x=0, y=2, z=0} -- receive power from pressure plate / detector / ... 2 nodes above
}
local use_texture_alpha = minetest.features.use_texture_alpha_string_modes and "clip" or nil
local function is_vertical_conductor(nodename)
local def = minetest.registered_nodes[nodename]
return def and def.is_vertical_conductor
@@ -96,6 +98,7 @@ mesecon.register_node("mesecons_extrawires:vertical", {
after_place_node = vertical_update,
after_dig_node = vertical_update,
sounds = mesecon.node_sound.default,
use_texture_alpha = use_texture_alpha,
},{
tiles = {"mesecons_wire_off.png"},
groups = {dig_immediate=3},
@@ -130,6 +133,7 @@ mesecon.register_node("mesecons_extrawires:vertical_top", {
after_place_node = vertical_update,
after_dig_node = vertical_update,
sounds = mesecon.node_sound.default,
use_texture_alpha = use_texture_alpha,
},{
tiles = {"mesecons_wire_off.png"},
mesecons = {conductor = {
@@ -162,6 +166,7 @@ mesecon.register_node("mesecons_extrawires:vertical_bottom", {
after_place_node = vertical_update,
after_dig_node = vertical_update,
sounds = mesecon.node_sound.default,
use_texture_alpha = use_texture_alpha,
},{
tiles = {"mesecons_wire_off.png"},
mesecons = {conductor = {

查看文件

@@ -20,10 +20,10 @@ plg.register_nodes = function(template)
-- build top texture string
local texture = "jeija_fpga_top.png"
if a == 1 then texture = texture .. "^jeija_microcontroller_LED_A.png" end
if b == 1 then texture = texture .. "^jeija_microcontroller_LED_B.png" end
if c == 1 then texture = texture .. "^jeija_microcontroller_LED_C.png" end
if d == 1 then texture = texture .. "^jeija_microcontroller_LED_D.png" end
if a == 1 then texture = texture .. "^jeija_luacontroller_LED_A.png" end
if b == 1 then texture = texture .. "^jeija_luacontroller_LED_B.png" end
if c == 1 then texture = texture .. "^jeija_luacontroller_LED_C.png" end
if d == 1 then texture = texture .. "^jeija_luacontroller_LED_D.png" end
ndef.tiles[1] = texture
ndef.inventory_image = texture

查看文件

@@ -0,0 +1,7 @@
# textdomain: mesecons_fpga
### init.lua ###
FPGA=Circuit logique programmable (FPGA)
### tool.lua ###
FPGA Programmer=Programmateur de circuit logique

查看文件

@@ -0,0 +1,7 @@
# textdomain: mesecons_fpga
### init.lua ###
FPGA=ПЛИС
### tool.lua ###
FPGA Programmer=ПЛИС-программер

查看文件

@@ -0,0 +1,7 @@
# textdomain: mesecons_fpga
### init.lua ###
FPGA=ПКВМ
### tool.lua ###
FPGA Programmer=ПКВМ-программер

查看文件

@@ -0,0 +1,72 @@
--Aliases
core.register_alias("mesecons_gamecompat:chest", "hades_chests:chest")
core.register_alias("mesecons_gamecompat:chest_locked", "hades_chests:chest_locked")
core.register_alias("mesecons_gamecompat:coalblock", "hades_core:coalblock")
core.register_alias("mesecons_gamecompat:cobble", "hades_core:cobble")
core.register_alias("mesecons_gamecompat:glass", "hades_core:glass")
core.register_alias("mesecons_gamecompat:lava_source", "hades_core:lava_source")
core.register_alias("mesecons_gamecompat:mese", "hades_core:mese")
core.register_alias("mesecons_gamecompat:mese_crystal", "hades_core:mese_crystal")
core.register_alias("mesecons_gamecompat:mese_crystal_fragment", "hades_core:mese_crystal_fragment")
core.register_alias("mesecons_gamecompat:obsidian_glass", "hades_core:obsidian_glass")
core.register_alias("mesecons_gamecompat:stone", "hades_core:stone")
core.register_alias("mesecons_gamecompat:steel_ingot", "hades_core:steel_ingot")
core.register_alias("mesecons_gamecompat:steelblock", "hades_core:steelblock")
core.register_alias("mesecons_gamecompat:torch", "hades_torches:torch")
if core.get_modpath("hades_dye") then
for _, color in ipairs(mesecon.dye_colors) do
core.register_alias("mesecons_gamecompat:dye_" .. color, "hades_dye:" .. color)
end
end
-- Sounds
mesecon.node_sound.default = hades_sounds.node_sound_defaults()
mesecon.node_sound.glass = hades_sounds.node_sound_glass_defaults()
mesecon.node_sound.leaves = hades_sounds.node_sound_leaves_defaults()
mesecon.node_sound.stone = hades_sounds.node_sound_stone_defaults()
mesecon.node_sound.wood = hades_sounds.node_sound_wood_defaults()
if core.get_modpath("hades_fire") then
mesecon.sound_name.fire = "fire_fire"
end
if core.get_modpath("hades_tnt") then
mesecon.sound_name.explode = "tnt_explode"
end
-- Textures
mesecon.texture.steel_block = "default_steel_block.png"
-- MVPS stoppers
if core.get_modpath("mesecons_mvps") then
-- All of the locked and internal nodes in Hades Revisited
for _, name in ipairs({
"hades_chests:chest_locked",
"hades_chests:chest_locked_open",
"hades_doors:hidden",
"hades_doors:hidden_center",
}) do
mesecon.register_mvps_stopper(name)
end
core.register_on_mods_loaded(function()
if core.get_modpath("hades_doors") then
for _,v in pairs(core.registered_nodes) do
if v.groups and (v.groups.door or v.groups.trapdoor) then
mesecon.register_mvps_stopper(v.name)
end
end
end
if core.get_modpath("hades_beds") then
for _,v in pairs(core.registered_nodes) do
if v.groups and v.groups.bed then
mesecon.register_mvps_stopper(v.name)
end
end
end
end)
end

查看文件

@@ -0,0 +1,88 @@
--Aliases
minetest.register_alias("mesecons_gamecompat:chest", "mcl_chests:chest")
minetest.register_alias("mesecons_gamecompat:chest_locked", "mcl_chests:chest")
minetest.register_alias("mesecons_gamecompat:coalblock", "mcl_core:coalblock")
minetest.register_alias("mesecons_gamecompat:cobble", "mcl_core:cobble")
minetest.register_alias("mesecons_gamecompat:glass", "mcl_core:glass")
minetest.register_alias("mesecons_gamecompat:lava_source", "mcl_core:lava_source")
minetest.register_alias("mesecons_gamecompat:mese", "mcl_redstone_torch:redstoneblock")
minetest.register_alias("mesecons_gamecompat:mese_crystal", "mcl_redstone:redstone")
minetest.register_alias("mesecons_gamecompat:mese_crystal_fragment", "mcl_redstone:redstone")
minetest.register_alias("mesecons_gamecompat:obsidian_glass", "mcl_core:glass")
minetest.register_alias("mesecons_gamecompat:stone", "mcl_core:stone")
minetest.register_alias("mesecons_gamecompat:steel_ingot", "mcl_core:iron_ingot")
minetest.register_alias("mesecons_gamecompat:steelblock", "mcl_core:ironblock")
minetest.register_alias("mesecons_gamecompat:torch", "mcl_torches:torch")
if minetest.get_modpath("mcl_dyes") then
for color, def in ipairs(mcl_dyes.colors) do
minetest.register_alias("mesecons_gamecompat:dye_" .. def.mcl2, "mcl_dyes:" .. color)
end
end
-- Sounds
mesecon.node_sound.default = mcl_sounds.node_sound_defaults()
mesecon.node_sound.glass = mcl_sounds.node_sound_glass_defaults()
mesecon.node_sound.leaves = mcl_sounds.node_sound_leaves_defaults()
mesecon.node_sound.stone = mcl_sounds.node_sound_stone_defaults()
mesecon.node_sound.wood = mcl_sounds.node_sound_wood_defaults()
if minetest.get_modpath("mcl_fire") then
mesecon.sound_name.fire = "fire_fire"
end
if minetest.get_modpath("mcl_tnt") then
mesecon.sound_name.explode = "tnt_explode"
end
-- Textures
mesecon.texture.steel_block = "default_steel_block.png"
if minetest.get_modpath("mesecons_mvps") then
for k,v in pairs(core.registered_nodes) do
local is_stopper = mesecon.mvps_stoppers[k]
if v.groups and v.groups.unmovable_by_piston then
mesecon.register_mvps_stopper(k)
end
if is_stopper then
local groups = table.copy(v.groups or {})
groups.unmovable_by_piston = 1
v.groups = groups
core.register_node(":"..k, v)
end
end
for k,v in pairs(core.registered_entities) do
local is_unmov = mesecon.mvps_unmov[k]
if v._mcl_pistons_unmovable then
mesecon.register_mvps_unmov(k)
end
if is_unmov then
v._mcl_pistons_unmovable = true
core.register_entity(":"..k, v)
end
end
core.register_on_mods_loaded(function()
for _,v in pairs(core.registered_nodes) do
if v.groups and v.groups.bed then
mesecon.register_mvps_stopper(v.name)
end
if v.groups and v.groups.door then
mesecon.register_mvps_stopper(v.name)
end
end
end)
end
core.register_craft({
output = "mesecons:wire_00000000_off",
recipe = {{"mcl_redstone:redstone"}}
})
core.register_craft({
output = "mcl_redstone:redstone",
recipe = {{"mesecons:wire_00000000_off"}}
})

查看文件

@@ -48,28 +48,26 @@ if minetest.get_modpath("mesecons_mvps") then
for _, name in ipairs({
"default:chest_locked",
"default:chest_locked_open",
"doors:door_steel_b_1", -- old style doors
"doors:door_steel_b_2", --
"doors:door_steel_t_1", --
"doors:door_steel_t_2", --
"doors:door_steel_a", -- new style doors
"doors:door_steel_b", --
"doors:door_steel_c", --
"doors:door_steel_d", --
"doors:hidden",
"doors:trapdoor_steel",
"doors:trapdoor_steel_open",
"beds:bed_bottom",
"beds:bed_top",
"beds:fancy_bed_bottom",
"beds:fancy_bed_top",
"xpanes:door_steel_bar_a",
"xpanes:door_steel_bar_b",
"xpanes:door_steel_bar_c",
"xpanes:door_steel_bar_d",
"xpanes:trapdoor_steel_bar",
"xpanes:trapdoor_steel_bar_open",
}) do
mesecon.register_mvps_stopper(name)
end
core.register_on_mods_loaded(function()
if minetest.get_modpath("doors") then
for k,_ in pairs(doors.registered_doors) do
mesecon.register_mvps_stopper(k)
end
end
if minetest.get_modpath("beds") then
for _,v in pairs(core.registered_nodes) do
if v.groups and v.groups.bed then
mesecon.register_mvps_stopper(v.name)
end
end
end
end)
end

查看文件

@@ -22,6 +22,11 @@ end
local function meseconify_door(name)
if minetest.registered_items[name .. "_b_1"] then
-- old style double-node doors
if minetest.registered_items[name .. "_b_1"].mesecons then
minetest.log("info", "[mesecons_doors] Not touching door " .. name)
return
end
local function toggle_state1 (pos)
on_rightclick(pos, 1, name.."_t_1", name.."_b_2", name.."_t_2", {1,2,3,0})
end
@@ -47,6 +52,10 @@ local function meseconify_door(name)
})
elseif minetest.registered_items[name .. "_a"] then
-- new style mesh node based doors
if minetest.registered_items[name .. "_a"].mesecons then
minetest.log("info", "[mesecons_doors] Not touching door " .. name)
return
end
local override = {
mesecons = {effector = {
action_on = function(pos)
@@ -73,68 +82,64 @@ local function meseconify_door(name)
end
end
meseconify_door("doors:door_wood")
meseconify_door("doors:door_steel")
meseconify_door("doors:door_glass")
meseconify_door("doors:door_obsidian_glass")
meseconify_door("xpanes:door_steel_bar")
-- Trapdoor
local function trapdoor_switch(pos, node)
local state = minetest.get_meta(pos):get_int("state")
local function trapdoor_switch(name)
return function(pos, node)
local state = minetest.get_meta(pos):get_int("state")
if state == 1 then
minetest.sound_play("doors_door_close", { pos = pos, gain = 0.3, max_hear_distance = 10 }, true)
minetest.set_node(pos, {name=name, param2 = node.param2})
else
minetest.sound_play("doors_door_open", { pos = pos, gain = 0.3, max_hear_distance = 10 }, true)
minetest.set_node(pos, {name=name.."_open", param2 = node.param2})
end
minetest.get_meta(pos):set_int("state", state == 1 and 0 or 1)
end
end
if state == 1 then
minetest.sound_play("doors_door_close", { pos = pos, gain = 0.3, max_hear_distance = 10 }, true)
minetest.set_node(pos, {name="doors:trapdoor", param2 = node.param2})
local function meseconify_trapdoor(name)
local override
if doors and doors.get then
override = {
mesecons = {effector = {
action_on = function(pos)
local door = doors.get(pos)
if door then
door:open()
end
end,
action_off = function(pos)
local door = doors.get(pos)
if door then
door:close()
end
end,
}},
}
else
minetest.sound_play("doors_door_open", { pos = pos, gain = 0.3, max_hear_distance = 10 }, true)
minetest.set_node(pos, {name="doors:trapdoor_open", param2 = node.param2})
override = {
mesecons = {effector = {
action_on = trapdoor_switch(name),
action_off = trapdoor_switch(name)
}},
}
end
minetest.get_meta(pos):set_int("state", state == 1 and 0 or 1)
if minetest.registered_items[name] then
minetest.override_item(name, override)
minetest.override_item(name.."_open", override)
end
end
if doors and doors.get then
local override = {
mesecons = {effector = {
action_on = function(pos)
local door = doors.get(pos)
if door then
door:open()
end
end,
action_off = function(pos)
local door = doors.get(pos)
if door then
door:close()
end
end,
}},
}
minetest.override_item("doors:trapdoor", override)
minetest.override_item("doors:trapdoor_open", override)
minetest.override_item("doors:trapdoor_steel", override)
minetest.override_item("doors:trapdoor_steel_open", override)
if minetest.registered_items["xpanes:trapdoor_steel_bar"] then
minetest.override_item("xpanes:trapdoor_steel_bar", override)
minetest.override_item("xpanes:trapdoor_steel_bar_open", override)
minetest.register_on_mods_loaded(function()
for k,_ in pairs(doors.registered_doors) do
if k:find("_a$") then
meseconify_door(k:sub(1,-3))
end
end
else
if minetest.registered_nodes["doors:trapdoor"] then
minetest.override_item("doors:trapdoor", {
mesecons = {effector = {
action_on = trapdoor_switch,
action_off = trapdoor_switch
}},
})
minetest.override_item("doors:trapdoor_open", {
mesecons = {effector = {
action_on = trapdoor_switch,
action_off = trapdoor_switch
}},
})
for k,_ in pairs(doors.registered_trapdoors) do
if not k:find("_open$") then
meseconify_trapdoor(k)
end
end
end
end)

查看文件

@@ -13,3 +13,17 @@ if minetest.get_modpath("default") then
minetest.log("info", "Mesecons: detected Minetest Game for game compatibility")
dofile(minetest.get_modpath("mesecons_gamecompat").."/compat_mtg.lua")
end
if minetest.get_modpath("mcl_redstone") then
minetest.log("info", "Mesecons: detected MineClonia Game for game compatibility")
dofile(minetest.get_modpath("mesecons_gamecompat").."/compat_mcla.lua")
end
if minetest.get_modpath("hades_core") then
minetest.log("info", "Mesecons: detected Hades Revisited Game for game compatibility")
dofile(minetest.get_modpath("mesecons_gamecompat").."/compat_hades.lua")
end
if minetest.get_modpath("doors") then
dofile(minetest.get_modpath("mesecons_gamecompat").."/doors.lua")
end

查看文件

@@ -1,3 +1,3 @@
name = mesecons_gamecompat
depends = mesecons
optional_depends = fire, default, dye, mesecons_mvps, tnt
optional_depends = fire, default, dye, mesecons_mvps, tnt, doors, beds, mcl_fire, mcl_core, mcl_dye, mcl_tnt, hades_sounds

查看文件

@@ -1,3 +1,5 @@
local S = minetest.get_translator(minetest.get_current_modname())
local selection_box = {
type = "fixed",
fixed = { -8/16, -8/16, -8/16, 8/16, -6/16, 8/16 }
@@ -87,7 +89,7 @@ local function register_gate(name, inputnumber, assess, recipe, description)
description = description,
inventory_image = "jeija_gate_off.png^jeija_gate_"..name..".png",
paramtype = "light",
paramtype2 = "facedir",
paramtype2 = "4dir",
is_ground_content = false,
drawtype = "nodebox",
drop = basename.."_off",
@@ -100,7 +102,7 @@ local function register_gate(name, inputnumber, assess, recipe, description)
offstate = basename.."_off",
inputnumber = inputnumber,
after_dig_node = mesecon.do_cooldown,
on_rotate = mesecon.on_rotate_horiz,
on_rotate = mesecon.on_rotate,
},{
tiles = {
"jeija_microcontroller_bottom.png^".."jeija_gate_off.png^"..
@@ -146,38 +148,38 @@ end
register_gate("diode", 1, function (input) return input end,
{{"mesecons:mesecon", "mesecons_torch:mesecon_torch_on", "mesecons_torch:mesecon_torch_on"}},
"Diode")
S("Diode"))
register_gate("not", 1, function (input) return not input end,
{{"mesecons:mesecon", "mesecons_torch:mesecon_torch_on", "mesecons:mesecon"}},
"NOT Gate")
S("NOT Gate"))
register_gate("and", 2, function (val1, val2) return val1 and val2 end,
{{"mesecons:mesecon", "", ""},
{"", "mesecons_materials:silicon", "mesecons:mesecon"},
{"mesecons:mesecon", "", ""}},
"AND Gate")
S("AND Gate"))
register_gate("nand", 2, function (val1, val2) return not (val1 and val2) end,
{{"mesecons:mesecon", "", ""},
{"", "mesecons_materials:silicon", "mesecons_torch:mesecon_torch_on"},
{"mesecons:mesecon", "", ""}},
"NAND Gate")
S("NAND Gate"))
register_gate("xor", 2, function (val1, val2) return (val1 or val2) and not (val1 and val2) end,
{{"mesecons:mesecon", "", ""},
{"", "mesecons_materials:silicon", "mesecons_materials:silicon"},
{"mesecons:mesecon", "", ""}},
"XOR Gate")
S("XOR Gate"))
register_gate("nor", 2, function (val1, val2) return not (val1 or val2) end,
{{"mesecons:mesecon", "", ""},
{"", "mesecons:mesecon", "mesecons_torch:mesecon_torch_on"},
{"mesecons:mesecon", "", ""}},
"NOR Gate")
S("NOR Gate"))
register_gate("or", 2, function (val1, val2) return (val1 or val2) end,
{{"mesecons:mesecon", "", ""},
{"", "mesecons:mesecon", "mesecons:mesecon"},
{"mesecons:mesecon", "", ""}},
"OR Gate")
S("OR Gate"))

查看文件

@@ -0,0 +1,8 @@
# textdomain: mesecons_gates
Diode=Диод
NOT Gate=НЕ-шлюз
AND Gate=И-шлюз
NAND Gate=NAND-шлюз
XOR Gate=XOR-шлюз
NOR Gate=NOR-шлюз
OR Gate=ИЛИ-шлюз

查看文件

@@ -0,0 +1,8 @@
# textdomain: mesecons_gates
Diode=Діод
NOT Gate=NOT перехідник
AND Gate=AND перехідник
NAND Gate=NAND перехідник
XOR Gate=XOR перехідник
NOR Gate=NOR перехідник
OR Gate=OR перехідник

查看文件

@@ -0,0 +1,8 @@
# textdomain: mesecons_gates
Diode=
NOT Gate=
AND Gate=
NAND Gate=
XOR Gate=
NOR Gate=
OR Gate=

查看文件

@@ -0,0 +1,4 @@
# textdomain: mesecons_hydroturbine
### init.lua ###
Water Turbine=Détecteur de courant

查看文件

@@ -0,0 +1,4 @@
# textdomain: mesecons_hydroturbine
### init.lua ###
Water Turbine=Гидротурбина

查看文件

@@ -0,0 +1,4 @@
# textdomain: mesecons_hydroturbine
### init.lua ###
Water Turbine=Гідротурбіна

查看文件

@@ -17,7 +17,7 @@ minetest.register_node("mesecons_insulated:insulated_on", {
"jeija_insulated_wire_sides_on.png"
},
paramtype = "light",
paramtype2 = "facedir",
paramtype2 = "4dir",
is_ground_content = false,
walkable = false,
sunlight_propagates = true,
@@ -39,7 +39,7 @@ minetest.register_node("mesecons_insulated:insulated_on", {
rules = insulated_wire_get_rules
}},
on_blast = mesecon.on_blastnode,
on_rotate = mesecon.on_rotate_horiz,
on_rotate = mesecon.on_rotate,
})
minetest.register_node("mesecons_insulated:insulated_off", {
@@ -54,7 +54,7 @@ minetest.register_node("mesecons_insulated:insulated_off", {
"jeija_insulated_wire_sides_off.png"
},
paramtype = "light",
paramtype2 = "facedir",
paramtype2 = "4dir",
is_ground_content = false,
walkable = false,
sunlight_propagates = true,
@@ -75,7 +75,7 @@ minetest.register_node("mesecons_insulated:insulated_off", {
rules = insulated_wire_get_rules
}},
on_blast = mesecon.on_blastnode,
on_rotate = mesecon.on_rotate_horiz,
on_rotate = mesecon.on_rotate,
})
minetest.register_craft({

查看文件

@@ -0,0 +1,4 @@
# textdomain: mesecons_insulated
### init.lua ###
Straight Insulated Mesecon=Mesecon isolé droit

查看文件

@@ -0,0 +1,4 @@
# textdomain: mesecons_insulated
### init.lua ###
Straight Insulated Mesecon=Прямой изолированный мезекон

查看文件

@@ -0,0 +1,4 @@
# textdomain: mesecons_insulated
### init.lua ###
Straight Insulated Mesecon=Прямий ізольований месекон

查看文件

@@ -0,0 +1,4 @@
# textdomain: mesecons_lamp
### init.lua ###
Mesecon Lamp=Lampe de Mesecon

查看文件

@@ -0,0 +1,4 @@
# textdomain: mesecons_lamp
### init.lua ###
Mesecon Lamp=Мезеконовая лампа

查看文件

@@ -0,0 +1,4 @@
# textdomain: mesecons_lamp
### init.lua ###
Mesecon Lamp=Месеконова лампа

查看文件

@@ -0,0 +1,15 @@
# textdomain: mesecons_lightstone
### init.lua ###
Red Lightstone=Pierre lumineuse rouge
Green Lightstone=Pierre lumineuse verte
Blue Lightstone=Pierre lumineuse bleue
Grey Lightstone=Pierre lumineuse grise
Dark Grey Lightstone=Pierre lumineuse gris foncée
Yellow Lightstone=Pierre lumineuse jaune
Orange Lightstone=Pierre lumineuse orange
White Lightstone=Pierre lumineuse blanche
Pink Lightstone=Pierre lumineuse rose
Magenta Lightstone=Pierre lumineuse magenta
Cyan Lightstone=Pierre lumineuse bleu clair
Violet Lightstone=Pierre lumineuse violette

查看文件

@@ -0,0 +1,15 @@
# textdomain: mesecons_lightstone
### init.lua ###
Red Lightstone=Красный светящийся камень
Green Lightstone=Зеленый светящийся камень
Blue Lightstone=Синий светящийся камень
Grey Lightstone=Серый светящийся камень
Dark Grey Lightstone=Темно-серый светящийся камень
Yellow Lightstone=Желтый светящийся камень
Orange Lightstone=Оранжевый светящийся камень
White Lightstone=Белый светящийся камень
Pink Lightstone=Розовый светящийся камень
Magenta Lightstone=Пурпурный светящийся камень
Cyan Lightstone=Голубой светящийся камень
Violet Lightstone=Фиолетовый светящийся камень

查看文件

@@ -0,0 +1,15 @@
# textdomain: mesecons_lightstone
### init.lua ###
Red Lightstone=Червоний світловий камінь
Green Lightstone=Зелений світловий камінь
Blue Lightstone=Синій світловий камінь
Grey Lightstone=Сірий світловий камінь
Dark Grey Lightstone=Темно-сірий світловий камінь
Yellow Lightstone=Жовтий світловий камінь
Orange Lightstone=Оранжевий світловий камінь
White Lightstone=Білий світловий камінь
Pink Lightstone=Рожевий світловий камінь
Magenta Lightstone=Пурпуровий світловий камінь
Cyan Lightstone=Блакитний світловий камінь
Violet Lightstone=Фіолетовий світловий камінь

某些文件未显示,因为此 diff 中更改的文件太多 显示更多