16 Commits

Author SHA1 Message Date
a9feea1b32 Merge remote-tracking branch 'upstream/master' 2025-03-20 11:47:30 +01:00
2d973fb77b Merge remote-tracking branch 'upstream/master' 2024-09-15 09:20:32 +02:00
1fcfd2a98d Merge remote-tracking branch 'upstream/master' 2023-11-22 23:44:54 +01:00
ec3218d6d9 Merge remote-tracking branch 'upstream/master' 2023-06-07 21:46:50 +02:00
4ecc694518 Merge remote-tracking branch 'upstream/master' 2022-08-26 15:11:33 +02:00
3dd0eb7e4f Merge remote-tracking branch 'upstream/master' 2022-06-25 16:50:22 +02:00
e4d7c07962 Merge remote-tracking branch 'upstream/master' 2022-05-27 18:37:05 +02:00
69a4b6b332 Merge remote-tracking branch 'upstream/master' 2022-03-05 11:22:46 +01:00
e38e4fe0c5 Merge remote-tracking branch 'upstream/master' 2021-12-10 21:37:44 +01:00
5ad1e6bc4d Merge remote-tracking branch 'upstream/master' 2021-08-31 19:47:43 +02:00
b91fe92d13 Merge remote-tracking branch 'upstream/master' 2021-08-04 21:42:16 +02:00
6a87290ead Merge remote-tracking branch 'upstream/master' 2021-07-26 22:19:21 +02:00
1963bfcc0d Merge remote-tracking branch 'upstream/master' 2021-04-17 13:50:01 +02:00
6936c8c2e4 Merge remote-tracking branch 'upstream/master' 2021-04-04 21:01:12 +02:00
2fc1682c04 Merge remote-tracking branch 'upstream/master' 2021-03-12 12:22:52 +01:00
9b835053c2 Remove undeclared global variable corner_nodebox
To avoid warning message at load time.
2021-02-27 03:22:08 +01:00
16 changed files with 47 additions and 134 deletions

View File

@ -9,9 +9,9 @@ jobs:
- uses: actions/checkout@main - uses: actions/checkout@main
- name: apt - name: apt
run: sudo apt-get install -y luarocks run: sudo apt-get install -y luarocks
- name: install luacheck - name: luacheck install
run: luarocks install --local luacheck run: luarocks install --local luacheck
- name: run luacheck - name: luacheck run
run: $HOME/.luarocks/bin/luacheck ./ run: $HOME/.luarocks/bin/luacheck ./
mineunit: mineunit:
@ -19,27 +19,23 @@ jobs:
name: "Mineunit tests" name: "Mineunit tests"
steps: steps:
- uses: actions/checkout@main - 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 - name: run mesecons tests
uses: mt-mods/mineunit-actions@master working-directory: ./mesecons/
with: run: $HOME/.luarocks/bin/mineunit -q
coverage: false
mineunit-args: -q
working-directory: ./mesecons
- name: run mesecons_mvps tests - name: run mesecons_mvps tests
uses: mt-mods/mineunit-actions@master working-directory: ./mesecons_mvps/
with: run: $HOME/.luarocks/bin/mineunit -q
coverage: false
mineunit-args: -q
working-directory: ./mesecons_mvps
- name: run mesecons_fpga tests - name: run mesecons_fpga tests
uses: mt-mods/mineunit-actions@master working-directory: ./mesecons_fpga/
with: run: $HOME/.luarocks/bin/mineunit -q
coverage: false
mineunit-args: -q
working-directory: ./mesecons_fpga
- name: run mesecons_luacontroller tests - name: run mesecons_luacontroller tests
uses: mt-mods/mineunit-actions@master working-directory: ./mesecons_luacontroller/
with: run: $HOME/.luarocks/bin/mineunit -q
coverage: false
mineunit-args: -q
working-directory: ./mesecons_luacontroller

View File

@ -10,13 +10,11 @@ jobs:
matrix: matrix:
cfg: cfg:
- { image: 'registry.gitlab.com/minetest/minetest/server:5.0.1', mtg: false } - { 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/minetest/minetest:5.10.0', mtg: true }
- { image: 'ghcr.io/luanti-org/luanti:5.11.0', mtg: true }
steps: steps:
- uses: actions/checkout@main - uses: actions/checkout@main
- name: Download Minetest Game - uses: actions/checkout@main
uses: actions/checkout@main
with: with:
repository: 'minetest/minetest_game' repository: 'minetest/minetest_game'
path: ./.test/minetest_game path: ./.test/minetest_game

View File

@ -30,7 +30,6 @@ read_globals = {
"VoxelArea", "VoxelArea",
"mcl_dyes", "mcl_dyes",
"mcl_sounds", "mcl_sounds",
"hades_sounds",
} }
globals = {"mesecon"} globals = {"mesecon"}

View File

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

View File

@ -13,10 +13,9 @@ MESECONS by Jeija and contributors
Mezzee-what? Mezzee-what?
------------ ------------
[Mesecons](https://mesecons.net/)! They're yellow, they're conductive, and they'll add a whole new dimension to Luanti's gameplay. [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 [Luanti](https://www.luanti.org/) that implements a ton of items related to digital circuitry, such as wires, buttons, lights, and even programmable controllers. 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.
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. Mesecons has a similar goal to Redstone in Minecraft, but works in its own way, with different rules and mechanics.
@ -25,15 +24,15 @@ OK, I want in.
Go get it! Go get it!
[![ContentDB](https://content.luanti.org/packages/Jeija/mesecons/shields/downloads/)](https://content.luanti.org/packages/Jeija/mesecons/) [![ContentDB](https://content.minetest.net/packages/Jeija/mesecons/shields/downloads/)](https://content.minetest.net/packages/Jeija/mesecons/)
Install it directly from your client by searching it in the Online Content tab. 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: **Or** if you've downloaded a ZIP file check out [this page](https://wiki.minetest.net/Mods) over at the official Minetest 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. 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. 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 Luanti mods folder - called `mods`. 3. Open up the Minetest mods folder - called `mods`.
4. Copy the Mesecons folder into the mods folder. 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. 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.

View File

@ -17,7 +17,6 @@ function mesecon.on_rotate(pos, node, _, _, new_param2)
end end
-- An on_rotate callback for components which stay horizontal. -- 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) function mesecon.on_rotate_horiz(pos, node, user, mode, new_param2)
if not minetest.global_exists("screwdriver") or mode ~= screwdriver.ROTATE_FACE then if not minetest.global_exists("screwdriver") or mode ~= screwdriver.ROTATE_FACE then
return false return false

View File

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

View File

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

View File

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

View File

@ -1,72 +0,0 @@
--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

View File

@ -19,11 +19,6 @@ if minetest.get_modpath("mcl_redstone") then
dofile(minetest.get_modpath("mesecons_gamecompat").."/compat_mcla.lua") dofile(minetest.get_modpath("mesecons_gamecompat").."/compat_mcla.lua")
end 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 if minetest.get_modpath("doors") then
dofile(minetest.get_modpath("mesecons_gamecompat").."/doors.lua") dofile(minetest.get_modpath("mesecons_gamecompat").."/doors.lua")
end end

View File

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

View File

@ -89,7 +89,7 @@ local function register_gate(name, inputnumber, assess, recipe, description)
description = description, description = description,
inventory_image = "jeija_gate_off.png^jeija_gate_"..name..".png", inventory_image = "jeija_gate_off.png^jeija_gate_"..name..".png",
paramtype = "light", paramtype = "light",
paramtype2 = "4dir", paramtype2 = "facedir",
is_ground_content = false, is_ground_content = false,
drawtype = "nodebox", drawtype = "nodebox",
drop = basename.."_off", drop = basename.."_off",
@ -102,7 +102,7 @@ local function register_gate(name, inputnumber, assess, recipe, description)
offstate = basename.."_off", offstate = basename.."_off",
inputnumber = inputnumber, inputnumber = inputnumber,
after_dig_node = mesecon.do_cooldown, after_dig_node = mesecon.do_cooldown,
on_rotate = mesecon.on_rotate, on_rotate = mesecon.on_rotate_horiz,
},{ },{
tiles = { tiles = {
"jeija_microcontroller_bottom.png^".."jeija_gate_off.png^".. "jeija_microcontroller_bottom.png^".."jeija_gate_off.png^"..

View File

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

View File

@ -2,13 +2,13 @@ local S = minetest.get_translator(minetest.get_current_modname())
-- Glue and fiber -- Glue and fiber
minetest.register_craftitem("mesecons_materials:glue", { minetest.register_craftitem("mesecons_materials:glue", {
inventory_image = "mesecons_glue.png", image = "mesecons_glue.png",
on_place_on_ground = minetest.craftitem_place_item, on_place_on_ground = minetest.craftitem_place_item,
description = S("Glue"), description = S("Glue"),
}) })
minetest.register_craftitem("mesecons_materials:fiber", { minetest.register_craftitem("mesecons_materials:fiber", {
inventory_image = "mesecons_fiber.png", image = "mesecons_fiber.png",
on_place_on_ground = minetest.craftitem_place_item, on_place_on_ground = minetest.craftitem_place_item,
description = S("Fiber"), description = S("Fiber"),
}) })
@ -29,7 +29,7 @@ minetest.register_craft({
-- Silicon -- Silicon
minetest.register_craftitem("mesecons_materials:silicon", { minetest.register_craftitem("mesecons_materials:silicon", {
inventory_image = "mesecons_silicon.png", image = "mesecons_silicon.png",
on_place_on_ground = minetest.craftitem_place_item, on_place_on_ground = minetest.craftitem_place_item,
description = S("Silicon"), description = S("Silicon"),
}) })

View File

@ -1,5 +1,5 @@
name = mesecons name = mesecons
description = Mod that implements a ton of items related to digital circuitry. description = Mod that implements a ton of items related to digital circuitry.
min_minetest_version = 5.7.0 min_minetest_version = 5.0
author = Jeija author = Jeija
title = Mesecons title = Mesecons