Skip to content

Commit

Permalink
Make modpack mostly independent from MTG (#607)
Browse files Browse the repository at this point in the history
  • Loading branch information
TurkeyMcMac committed May 5, 2022
1 parent f4070d3 commit dfa43d6
Show file tree
Hide file tree
Showing 67 changed files with 285 additions and 187 deletions.
6 changes: 6 additions & 0 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
The LGPLv3 applies to all code in this project.
The CC-BY-SA-3.0 license applies to textures and any other content in this project which is not source code.

The file mesecons_detector/textures/mesecons_detector_side.png is an unmodified copy of
"default_steel_block.png" by Jean-Patrick Guerrero <https://github.com/kilbith>, which can be found at
<https://github.com/minetest/minetest_game/blob/9528c0f8b93d6934930e99c3c116df275fb0e4bc/mods/default/textures/default_steel_block.png>.
"default_steel_block.png" is licensed under a CC BY-SA 3.0 license. This license can be found later in this document, and can also be found at
<https://creativecommons.org/licenses/by-sa/3.0/>. The artwork is reportedly copyright (C) 2010-2018 kilbith.

=================================================================

GNU LESSER GENERAL PUBLIC LICENSE
Expand Down
2 changes: 1 addition & 1 deletion mesecons_blinkyplant/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ mesecon.register_node("mesecons_blinkyplant:blinky_plant", {
paramtype = "light",
is_ground_content = false,
walkable = false,
sounds = default.node_sound_leaves_defaults(),
sounds = mesecon.node_sound.leaves,
selection_box = {
type = "fixed",
fixed = {-0.3, -0.5, -0.3, 0.3, -0.5+0.7, 0.3},
Expand Down
2 changes: 1 addition & 1 deletion mesecons_blinkyplant/mod.conf
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
name = mesecons_blinkyplant
depends = default, mesecons
depends = mesecons, mesecons_gamecompat
6 changes: 3 additions & 3 deletions mesecons_button/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ minetest.register_node("mesecons_button:button_off", {
minetest.sound_play("mesecons_button_push", { pos = pos }, true)
minetest.get_node_timer(pos):start(1)
end,
sounds = default.node_sound_stone_defaults(),
sounds = mesecon.node_sound.stone,
mesecons = {receptor = {
state = mesecon.state.off,
rules = mesecon.rules.buttonlike_get
Expand Down Expand Up @@ -93,7 +93,7 @@ minetest.register_node("mesecons_button:button_on", {
groups = {dig_immediate=2, not_in_creative_inventory=1, mesecon_needs_receiver = 1},
drop = 'mesecons_button:button_off',
description = "Button",
sounds = default.node_sound_stone_defaults(),
sounds = mesecon.node_sound.stone,
mesecons = {receptor = {
state = mesecon.state.on,
rules = mesecon.rules.buttonlike_get
Expand All @@ -105,6 +105,6 @@ minetest.register_node("mesecons_button:button_on", {
minetest.register_craft({
output = "mesecons_button:button_off 2",
recipe = {
{"group:mesecon_conductor_craftable","default:stone"},
{"group:mesecon_conductor_craftable","mesecons_gamecompat:stone"},
}
})
2 changes: 1 addition & 1 deletion mesecons_button/mod.conf
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
name = mesecons_button
depends = default, mesecons, mesecons_receiver
depends = mesecons, mesecons_gamecompat, mesecons_receiver
4 changes: 2 additions & 2 deletions mesecons_commandblock/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ minetest.register_node("mesecons_commandblock:commandblock_off", {
after_place_node = after_place,
on_receive_fields = receive_fields,
can_dig = can_dig,
sounds = default.node_sound_stone_defaults(),
sounds = mesecon.node_sound.stone,
mesecons = {effector = {
action_on = commandblock_action_on
}},
Expand All @@ -206,7 +206,7 @@ minetest.register_node("mesecons_commandblock:commandblock_on", {
after_place_node = after_place,
on_receive_fields = receive_fields,
can_dig = can_dig,
sounds = default.node_sound_stone_defaults(),
sounds = mesecon.node_sound.stone,
mesecons = {effector = {
action_off = commandblock_action_off
}},
Expand Down
2 changes: 1 addition & 1 deletion mesecons_commandblock/mod.conf
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
name = mesecons_commandblock
depends = default, mesecons
depends = mesecons, mesecons_gamecompat
4 changes: 2 additions & 2 deletions mesecons_delayer/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ local def = {
sunlight_propagates = true,
is_ground_content = false,
delayer_time = delaytime[i],
sounds = default.node_sound_stone_defaults(),
sounds = mesecon.node_sound.stone,
on_blast = mesecon.on_blastnode,
drop = "mesecons_delayer:delayer_off_1",
}
Expand Down Expand Up @@ -169,6 +169,6 @@ minetest.register_craft({
output = "mesecons_delayer:delayer_off_1",
recipe = {
{"mesecons_torch:mesecon_torch_on", "group:mesecon_conductor_craftable", "mesecons_torch:mesecon_torch_on"},
{"default:cobble","default:cobble", "default:cobble"},
{"mesecons_gamecompat:cobble","mesecons_gamecompat:cobble", "mesecons_gamecompat:cobble"},
}
})
2 changes: 1 addition & 1 deletion mesecons_delayer/mod.conf
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
name = mesecons_delayer
depends = default, mesecons
depends = mesecons, mesecons_gamecompat
42 changes: 22 additions & 20 deletions mesecons_detector/init.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
local side_texture = mesecon.texture.steel_block or "mesecons_detector_side.png"

local GET_COMMAND = "GET"

-- Object detector
Expand Down Expand Up @@ -64,7 +66,7 @@ local object_detector_digiline = {
}

minetest.register_node("mesecons_detector:object_detector_off", {
tiles = {"default_steel_block.png", "default_steel_block.png", "jeija_object_detector_off.png", "jeija_object_detector_off.png", "jeija_object_detector_off.png", "jeija_object_detector_off.png"},
tiles = {side_texture, side_texture, "jeija_object_detector_off.png", "jeija_object_detector_off.png", "jeija_object_detector_off.png", "jeija_object_detector_off.png"},
paramtype = "light",
is_ground_content = false,
walkable = true,
Expand All @@ -76,13 +78,13 @@ minetest.register_node("mesecons_detector:object_detector_off", {
}},
on_construct = object_detector_make_formspec,
on_receive_fields = object_detector_on_receive_fields,
sounds = default.node_sound_stone_defaults(),
sounds = mesecon.node_sound.stone,
digiline = object_detector_digiline,
on_blast = mesecon.on_blastnode,
})

minetest.register_node("mesecons_detector:object_detector_on", {
tiles = {"default_steel_block.png", "default_steel_block.png", "jeija_object_detector_on.png", "jeija_object_detector_on.png", "jeija_object_detector_on.png", "jeija_object_detector_on.png"},
tiles = {side_texture, side_texture, "jeija_object_detector_on.png", "jeija_object_detector_on.png", "jeija_object_detector_on.png", "jeija_object_detector_on.png"},
paramtype = "light",
is_ground_content = false,
walkable = true,
Expand All @@ -94,26 +96,26 @@ minetest.register_node("mesecons_detector:object_detector_on", {
}},
on_construct = object_detector_make_formspec,
on_receive_fields = object_detector_on_receive_fields,
sounds = default.node_sound_stone_defaults(),
sounds = mesecon.node_sound.stone,
digiline = object_detector_digiline,
on_blast = mesecon.on_blastnode,
})

minetest.register_craft({
output = 'mesecons_detector:object_detector_off',
recipe = {
{"default:steel_ingot", "default:steel_ingot", "default:steel_ingot"},
{"default:steel_ingot", "mesecons_luacontroller:luacontroller0000", "default:steel_ingot"},
{"default:steel_ingot", "group:mesecon_conductor_craftable", "default:steel_ingot"},
{"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"},
}
})

minetest.register_craft({
output = 'mesecons_detector:object_detector_off',
recipe = {
{"default:steel_ingot", "default:steel_ingot", "default:steel_ingot"},
{"default:steel_ingot", "mesecons_microcontroller:microcontroller0000", "default:steel_ingot"},
{"default:steel_ingot", "group:mesecon_conductor_craftable", "default:steel_ingot"},
{"mesecons_gamecompat:steel_ingot", "mesecons_gamecompat:steel_ingot", "mesecons_gamecompat:steel_ingot"},
{"mesecons_gamecompat:steel_ingot", "mesecons_microcontroller:microcontroller0000", "mesecons_gamecompat:steel_ingot"},
{"mesecons_gamecompat:steel_ingot", "group:mesecon_conductor_craftable", "mesecons_gamecompat:steel_ingot"},
}
})

Expand Down Expand Up @@ -239,7 +241,7 @@ local node_detector_digiline = {
}

minetest.register_node("mesecons_detector:node_detector_off", {
tiles = {"default_steel_block.png", "default_steel_block.png", "default_steel_block.png", "default_steel_block.png", "default_steel_block.png", "jeija_node_detector_off.png"},
tiles = {side_texture, side_texture, side_texture, side_texture, side_texture, "jeija_node_detector_off.png"},
paramtype = "light",
paramtype2 = "facedir",
is_ground_content = false,
Expand All @@ -251,13 +253,13 @@ minetest.register_node("mesecons_detector:node_detector_off", {
}},
on_construct = node_detector_make_formspec,
on_receive_fields = node_detector_on_receive_fields,
sounds = default.node_sound_stone_defaults(),
sounds = mesecon.node_sound.stone,
digiline = node_detector_digiline,
on_blast = mesecon.on_blastnode,
})

minetest.register_node("mesecons_detector:node_detector_on", {
tiles = {"default_steel_block.png", "default_steel_block.png", "default_steel_block.png", "default_steel_block.png", "default_steel_block.png", "jeija_node_detector_on.png"},
tiles = {side_texture, side_texture, side_texture, side_texture, side_texture, "jeija_node_detector_on.png"},
paramtype = "light",
paramtype2 = "facedir",
is_ground_content = false,
Expand All @@ -269,26 +271,26 @@ minetest.register_node("mesecons_detector:node_detector_on", {
}},
on_construct = node_detector_make_formspec,
on_receive_fields = node_detector_on_receive_fields,
sounds = default.node_sound_stone_defaults(),
sounds = mesecon.node_sound.stone,
digiline = node_detector_digiline,
on_blast = mesecon.on_blastnode,
})

minetest.register_craft({
output = 'mesecons_detector:node_detector_off',
recipe = {
{"default:steel_ingot", "group:mesecon_conductor_craftable", "default:steel_ingot"},
{"default:steel_ingot", "mesecons_luacontroller:luacontroller0000", "default:steel_ingot"},
{"default:steel_ingot", "default:steel_ingot", "default:steel_ingot"},
{"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"},
}
})

minetest.register_craft({
output = 'mesecons_detector:node_detector_off',
recipe = {
{"default:steel_ingot", "group:mesecon_conductor_craftable", "default:steel_ingot"},
{"default:steel_ingot", "mesecons_microcontroller:microcontroller0000", "default:steel_ingot"},
{"default:steel_ingot", "default:steel_ingot", "default:steel_ingot"},
{"mesecons_gamecompat:steel_ingot", "group:mesecon_conductor_craftable", "mesecons_gamecompat:steel_ingot"},
{"mesecons_gamecompat:steel_ingot", "mesecons_microcontroller:microcontroller0000", "mesecons_gamecompat:steel_ingot"},
{"mesecons_gamecompat:steel_ingot", "mesecons_gamecompat:steel_ingot", "mesecons_gamecompat:steel_ingot"},
}
})

Expand Down
2 changes: 1 addition & 1 deletion mesecons_detector/mod.conf
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
name = mesecons_detector
depends = default, mesecons, mesecons_materials
depends = mesecons, mesecons_gamecompat, mesecons_materials
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions mesecons_extrawires/corner.lua
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ minetest.register_node("mesecons_extrawires:corner_on", {
selection_box = corner_selectionbox,
groups = {dig_immediate = 3, not_in_creative_inventory = 1},
drop = "mesecons_extrawires:corner_off",
sounds = default.node_sound_defaults(),
sounds = mesecon.node_sound.default,
mesecons = {conductor =
{
state = mesecon.state.on,
Expand All @@ -58,7 +58,7 @@ minetest.register_node("mesecons_extrawires:corner_off", {
sunlight_propagates = true,
selection_box = corner_selectionbox,
groups = {dig_immediate = 3},
sounds = default.node_sound_defaults(),
sounds = mesecon.node_sound.default,
mesecons = {conductor =
{
state = mesecon.state.off,
Expand Down
8 changes: 4 additions & 4 deletions mesecons_extrawires/crossover.lua
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ minetest.register_node("mesecons_extrawires:crossover_off", {
stack_max = 99,
selection_box = {type="fixed", fixed={-16/32, -16/32, -16/32, 16/32, -5/32, 16/32}},
groups = {dig_immediate=3, mesecon=3},
sounds = default.node_sound_defaults(),
sounds = mesecon.node_sound.default,
mesecons = {
conductor = {
states = crossover_states,
Expand All @@ -59,7 +59,7 @@ minetest.register_node("mesecons_extrawires:crossover_01", {
stack_max = 99,
selection_box = {type="fixed", fixed={-16/32, -16/32, -16/32, 16/32, -5/32, 16/32}},
groups = {dig_immediate=3, mesecon=3, not_in_creative_inventory=1},
sounds = default.node_sound_defaults(),
sounds = mesecon.node_sound.default,
mesecons = {
conductor = {
states = crossover_states,
Expand All @@ -86,7 +86,7 @@ minetest.register_node("mesecons_extrawires:crossover_10", {
stack_max = 99,
selection_box = {type="fixed", fixed={-16/32, -16/32, -16/32, 16/32, -5/32, 16/32}},
groups = {dig_immediate=3, mesecon=3, not_in_creative_inventory=1},
sounds = default.node_sound_defaults(),
sounds = mesecon.node_sound.default,
mesecons = {
conductor = {
states = crossover_states,
Expand All @@ -113,7 +113,7 @@ minetest.register_node("mesecons_extrawires:crossover_on", {
stack_max = 99,
selection_box = {type="fixed", fixed={-16/32, -16/32, -16/32, 16/32, -5/32, 16/32}},
groups = {dig_immediate=3, mesecon=3, not_in_creative_inventory=1},
sounds = default.node_sound_defaults(),
sounds = mesecon.node_sound.default,
mesecons = {
conductor = {
states = crossover_states,
Expand Down
2 changes: 1 addition & 1 deletion mesecons_extrawires/doublecorner.lua
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ for k, state in ipairs(doublecorner_states) do
selection_box = doublecorner_selectionbox,
groups = groups,
drop = doublecorner_states[1],
sounds = default.node_sound_defaults(),
sounds = mesecon.node_sound.default,
mesecons = {
conductor = {
states = doublecorner_states,
Expand Down
31 changes: 25 additions & 6 deletions mesecons_extrawires/mesewire.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
local mese_nodename = minetest.registered_aliases["mesecons_gamecompat:mese"]
if mese_nodename then
-- Convert placeholders.
minetest.register_alias("mesecons_extrawires:mese", mese_nodename)
else
-- Register placeholder.
mese_nodename = "mesecons_extrawires:mese"
minetest.register_node("mesecons_extrawires:mese", {
description = "Mese Wire",
tiles = {"mesecons_wire_off.png"},
paramtype = "light",
light_source = 3,
groups = {cracky = 1},
sounds = mesecon.node_sound.stone,
})
end

local mesewire_rules =
{
{x = 1, y = 0, z = 0},
Expand All @@ -8,7 +25,7 @@ local mesewire_rules =
{x = 0, y = 0, z =-1},
}

minetest.override_item("default:mese", {
minetest.override_item(mese_nodename, {
mesecons = {conductor = {
state = mesecon.state.off,
onstate = "mesecons_extrawires:mese_powered",
Expand All @@ -18,15 +35,17 @@ minetest.override_item("default:mese", {

-- Copy node definition of powered mese from normal mese
-- and brighten texture tiles to indicate mese is powered
local powered_def = mesecon.merge_tables(minetest.registered_nodes["default:mese"], {
drop = "default:mese",
light_source = 5,
local unpowered_def = minetest.registered_nodes[mese_nodename]
local powered_def = mesecon.merge_tables(unpowered_def, {
drop = mese_nodename,
paramtype = "light",
light_source = math.min(unpowered_def.light_source + 2, minetest.LIGHT_MAX),
mesecons = {conductor = {
state = mesecon.state.on,
offstate = "default:mese",
offstate = mese_nodename,
rules = mesewire_rules
}},
groups = {cracky = 1, not_in_creative_inventory = 1},
groups = mesecon.merge_tables(unpowered_def.groups or {}, {not_in_creative_inventory = 1}),
on_blast = mesecon.on_blastnode,
})

Expand Down
2 changes: 1 addition & 1 deletion mesecons_extrawires/mod.conf
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
name = mesecons_extrawires
depends = default, mesecons
depends = mesecons, mesecons_gamecompat
optional_depends = screwdriver
4 changes: 2 additions & 2 deletions mesecons_extrawires/tjunction.lua
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ minetest.register_node("mesecons_extrawires:tjunction_on", {
node_box = tjunction_nodebox,
groups = {dig_immediate = 3, not_in_creative_inventory = 1},
drop = "mesecons_extrawires:tjunction_off",
sounds = default.node_sound_defaults(),
sounds = mesecon.node_sound.default,
mesecons = {conductor =
{
state = mesecon.state.on,
Expand Down Expand Up @@ -74,7 +74,7 @@ minetest.register_node("mesecons_extrawires:tjunction_off", {
selection_box = tjunction_selectionbox,
node_box = tjunction_nodebox,
groups = {dig_immediate = 3},
sounds = default.node_sound_defaults(),
sounds = mesecon.node_sound.default,
mesecons = {conductor =
{
state = mesecon.state.off,
Expand Down
6 changes: 3 additions & 3 deletions mesecons_extrawires/vertical.lua
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ mesecon.register_node("mesecons_extrawires:vertical", {
drop = "mesecons_extrawires:vertical_off",
after_place_node = vertical_update,
after_dig_node = vertical_update,
sounds = default.node_sound_defaults(),
sounds = mesecon.node_sound.default,
},{
tiles = {"mesecons_wire_off.png"},
groups = {dig_immediate=3},
Expand Down Expand Up @@ -123,7 +123,7 @@ mesecon.register_node("mesecons_extrawires:vertical_top", {
drop = "mesecons_extrawires:vertical_off",
after_place_node = vertical_update,
after_dig_node = vertical_update,
sounds = default.node_sound_defaults(),
sounds = mesecon.node_sound.default,
},{
tiles = {"mesecons_wire_off.png"},
mesecons = {conductor = {
Expand Down Expand Up @@ -155,7 +155,7 @@ mesecon.register_node("mesecons_extrawires:vertical_bottom", {
drop = "mesecons_extrawires:vertical_off",
after_place_node = vertical_update,
after_dig_node = vertical_update,
sounds = default.node_sound_defaults(),
sounds = mesecon.node_sound.default,
},{
tiles = {"mesecons_wire_off.png"},
mesecons = {conductor = {
Expand Down
Loading

0 comments on commit dfa43d6

Please sign in to comment.