Maintenance, split compat from dynamics

This commit is contained in:
Evert Prants 2024-05-18 23:31:24 +03:00
parent be4e29b222
commit 7e5140e3c0
Signed by: evert
GPG Key ID: 1688DA83D222D0B5
19 changed files with 187 additions and 46 deletions

141
.luacheckrc Normal file
View File

@ -0,0 +1,141 @@
read_globals = {
"DIR_DELIM", "INIT",
"minetest", "core",
"dump", "dump2",
"Raycast",
"Settings",
"PseudoRandom",
"PerlinNoise",
"VoxelManip",
"SecureRandom",
"VoxelArea",
"PerlinNoiseMap",
"PcgRandom",
"ItemStack",
"AreaStore",
"vector",
table = {
fields = {
"copy",
"indexof",
"insert_all",
"key_value_swap",
"shuffle",
}
},
string = {
fields = {
"split",
"trim",
}
},
math = {
fields = {
"hypot",
"sign",
"factorial"
}
},
-- external mods
"default",
"armor",
"player_ui",
"sfinv",
"player_api",
"tubelib",
fluid_tanks = {
fields = {
"register_tank"
},
},
bucket = {
fields = {
"register_liquid",
"liquids",
"get_liquid_for_bucket",
}
},
fluid_lib = {
fields = {
"unit",
"transfer_timer_tick",
"refresh_node",
"register_transfer_node",
"register_extractor_node",
"register_node",
"get_buffer_data",
"get_node_buffers",
"insert_into_buffer",
"can_take_from_buffer",
"take_from_buffer",
"can_insert_into_buffer",
"buffer_accepts_fluid",
"cleanse_node_description",
"buffer_to_string",
"comma_value",
"cleanse_node_name"
},
},
}
globals = {
ele = {
fields = {
external = {
fields = {
"ref",
"ing",
"tools",
"armor",
"sounds",
"graphic",
"conduit_dirt_with_grass",
"conduit_dirt_with_dry_grass",
"conduit_stone_block",
"conduit_stone_block_desert",
}
},
"graphcache",
"clear_networks",
"modpath",
"unit",
"unit_description",
"formspec",
"helpers",
"default",
"tools",
"gases",
"capacity_text",
"get_gas_for_container",
"register_conduit",
"register_gas",
"register_base_device",
"register_machine",
"register_fluid_generator",
"register_wind_generator",
"register_tool"
}
},
-- elepower components
"elepd",
"elefarm",
"elepower_lighting",
"elepm",
"elemining",
"elenuclear",
"elesolar",
"elethermal",
"eletome",
"eletool",
"elewi"
}

View File

@ -42,7 +42,6 @@ if minetest.get_modpath("basic_materials") == nil then
inventory_image = "elepower_bm_empty_spool.png" inventory_image = "elepower_bm_empty_spool.png"
}) })
minetest.register_craft( { minetest.register_craft( {
output = "basic_materials:plastic_strip 9", output = "basic_materials:plastic_strip 9",
recipe = { recipe = {
@ -225,7 +224,6 @@ if minetest.get_modpath("basic_materials") == nil then
{ epi.steel_ingot, "", "" }, { epi.steel_ingot, "", "" },
}, },
}) })
else else
minetest.clear_craft({output = "basic_materials:brass_ingot"}) minetest.clear_craft({output = "basic_materials:brass_ingot"})
@ -240,5 +238,4 @@ else
local plastic_strip_def = table.copy(minetest.registered_items["basic_materials:plastic_strip"]) local plastic_strip_def = table.copy(minetest.registered_items["basic_materials:plastic_strip"])
plastic_strip_def.inventory_image = "elepower_bm_strip.png^[colorize:#ffffff:200" plastic_strip_def.inventory_image = "elepower_bm_strip.png^[colorize:#ffffff:200"
minetest.register_craftitem(":basic_materials:plastic_strip", plastic_strip_def) minetest.register_craftitem(":basic_materials:plastic_strip", plastic_strip_def)
end end

3
elepower_compat/init.lua Normal file
View File

@ -0,0 +1,3 @@
local modpath = minetest.get_modpath(minetest.get_current_modname())
dofile(modpath.."/basic_materials.lua")

4
elepower_compat/mod.conf Normal file
View File

@ -0,0 +1,4 @@
name = elepower_compat
description = Elepower Built-in Compatibility Service
depends = elepower_papi
optional_depends = default,moreores,basic_materials,dye

View File

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

Before

Width:  |  Height:  |  Size: 6.7 KiB

After

Width:  |  Height:  |  Size: 6.7 KiB

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

Before

Width:  |  Height:  |  Size: 894 B

After

Width:  |  Height:  |  Size: 894 B

View File

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

Before

Width:  |  Height:  |  Size: 7.0 KiB

After

Width:  |  Height:  |  Size: 7.0 KiB

View File

@ -1,3 +0,0 @@
-- Elepower Compatibility registrations
dofile(elepd.modpath.."/compat/basic_materials.lua")

View File

@ -8,7 +8,6 @@ elepd.modpath = modpath
dofile(modpath.."/conduits.lua") dofile(modpath.."/conduits.lua")
dofile(modpath.."/craftitems.lua") dofile(modpath.."/craftitems.lua")
dofile(modpath.."/compat/init.lua")
dofile(modpath.."/tools.lua") dofile(modpath.."/tools.lua")
dofile(modpath.."/nodes.lua") dofile(modpath.."/nodes.lua")
dofile(modpath.."/fluids.lua") dofile(modpath.."/fluids.lua")

View File

@ -1,4 +1,4 @@
name = elepower_dynamics name = elepower_dynamics
description = Elepower Dynamics. Conduits and materials! description = Elepower Dynamics. Conduits and materials!
depends = elepower_papi,default,fluid_tanks depends = elepower_papi,default,fluid_tanks,fluid_transfer
optional_depends = moreores,basic_materials,dye optional_depends = moreores,basic_materials,dye,elepower_compat

View File

@ -178,7 +178,7 @@ for mat, ingot in pairs(ingot_map) do
elepm.register_craft({ elepm.register_craft({
type = "grind", type = "grind",
recipe = { plate.item }, recipe = { plate.item },
output = dust.item.." 2", output = dust.item,
time = 6, time = 6,
}) })
end end