Use xcompat
This commit is contained in:
parent
f736a7d877
commit
6d615bbbb3
46
.luacheckrc
Normal file
46
.luacheckrc
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
read_globals = {
|
||||||
|
"DIR_DELIM", "INIT",
|
||||||
|
|
||||||
|
"minetest", "core",
|
||||||
|
"dump", "dump2",
|
||||||
|
|
||||||
|
"Raycast",
|
||||||
|
"Settings",
|
||||||
|
"PseudoRandom",
|
||||||
|
"PerlinNoise",
|
||||||
|
"VoxelManip",
|
||||||
|
"SecureRandom",
|
||||||
|
"VoxelArea",
|
||||||
|
"PerlinNoiseMap",
|
||||||
|
"PcgRandom",
|
||||||
|
"ItemStack",
|
||||||
|
"AreaStore",
|
||||||
|
|
||||||
|
"vector",
|
||||||
|
"xcompat",
|
||||||
|
|
||||||
|
table = {
|
||||||
|
fields = {
|
||||||
|
"copy",
|
||||||
|
"indexof",
|
||||||
|
"insert_all",
|
||||||
|
"key_value_swap",
|
||||||
|
"shuffle",
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
string = {
|
||||||
|
fields = {
|
||||||
|
"split",
|
||||||
|
"trim",
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
math = {
|
||||||
|
fields = {
|
||||||
|
"hypot",
|
||||||
|
"sign",
|
||||||
|
"factorial"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
108
craft.lua
108
craft.lua
@ -18,21 +18,23 @@
|
|||||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
]]
|
]]
|
||||||
|
|
||||||
|
local materials = xcompat.materials
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = 'trainblocks:subwayblock',
|
output = 'trainblocks:subwayblock',
|
||||||
recipe = {
|
recipe = {
|
||||||
{ '', 'dye:blue', '' },
|
{ '', materials.dye_blue, '' },
|
||||||
{ 'dye:white', 'default:glass', 'dye:white' },
|
{ materials.dye_white, materials.glass, materials.dye_white },
|
||||||
{ '', 'dye:blue', '' },
|
{ '', materials.dye_blue, '' },
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = 'trainblocks:sbahnblock',
|
output = 'trainblocks:sbahnblock',
|
||||||
recipe = {
|
recipe = {
|
||||||
{ '', 'dye:green', '' },
|
{ '', materials.dye_green, '' },
|
||||||
{ 'dye:white', 'default:glass', 'dye:white' },
|
{ materials.dye_white, materials.glass, materials.dye_white },
|
||||||
{ '', 'dye:green', '' },
|
{ '', materials.dye_green, '' },
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -43,11 +45,13 @@ local dyes1 = { "blue", "blue", "red", "violet", "green", "orange", "yellow", "g
|
|||||||
local dyes2 = { "blue", "white", "white", "white", "white", "white", "black", "white", "white", "white", "white" }
|
local dyes2 = { "blue", "white", "white", "white", "white", "white", "black", "white", "white", "white", "white" }
|
||||||
|
|
||||||
for count = 0, 10, 1 do
|
for count = 0, 10, 1 do
|
||||||
|
local dye1 = materials["dye_" .. dyes1[count + 1]]
|
||||||
|
local dye2 = materials["dye_" .. dyes2[count + 1]]
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "trainblocks:line" .. count .. " 4",
|
output = "trainblocks:line" .. count .. " 4",
|
||||||
recipe = {
|
recipe = {
|
||||||
{ '', "dye:" .. dyes1[count + 1], '' },
|
{ '', dye1, '' },
|
||||||
{ "dye:" .. dyes2[count + 1], 'default:glass', '' },
|
{ dye2, materials.glass, '' },
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
@ -59,14 +63,14 @@ end
|
|||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = 'trainblocks:subwaysignL 2',
|
output = 'trainblocks:subwaysignL 2',
|
||||||
recipe = {
|
recipe = {
|
||||||
{ 'dye:white', 'default:glass', 'dye:blue' }
|
{ materials.dye_white, materials.glass, materials.dye_blue }
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = 'trainblocks:subwaysignR 2',
|
output = 'trainblocks:subwaysignR 2',
|
||||||
recipe = {
|
recipe = {
|
||||||
{ 'dye:blue', 'default:glass', 'dye:white' },
|
{ materials.dye_blue, materials.glass, materials.dye_white },
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -75,14 +79,14 @@ minetest.register_craft({
|
|||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = 'trainblocks:sbahnsignL 2',
|
output = 'trainblocks:sbahnsignL 2',
|
||||||
recipe = {
|
recipe = {
|
||||||
{ 'dye:white', 'default:glass', 'dye:green' },
|
{ materials.dye_white, materials.glass, materials.dye_green },
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = 'trainblocks:sbahnsignR 2',
|
output = 'trainblocks:sbahnsignR 2',
|
||||||
recipe = {
|
recipe = {
|
||||||
{ 'dye:blue', 'default:glass', 'dye:green' },
|
{ materials.dye_blue, materials.glass, materials.dye_green },
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -92,21 +96,21 @@ minetest.register_craft({
|
|||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
type = "shapeless",
|
type = "shapeless",
|
||||||
output = 'trainblocks:stationsignR_modern',
|
output = 'trainblocks:stationsignR_modern',
|
||||||
recipe = {'trainblocks:stationsignR'}
|
recipe = { 'trainblocks:stationsignR' }
|
||||||
})
|
})
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
type = "shapeless",
|
type = "shapeless",
|
||||||
output = 'trainblocks:stationsignL_modern',
|
output = 'trainblocks:stationsignL_modern',
|
||||||
recipe = {'trainblocks:stationsignL'}
|
recipe = { 'trainblocks:stationsignL' }
|
||||||
})
|
})
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
type = "shapeless",
|
type = "shapeless",
|
||||||
recipe = {'trainblocks:stationsignR_modern'},
|
recipe = { 'trainblocks:stationsignR_modern' },
|
||||||
output = 'trainblocks:stationsignR'
|
output = 'trainblocks:stationsignR'
|
||||||
})
|
})
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
type = "shapeless",
|
type = "shapeless",
|
||||||
recipe = {'trainblocks:stationsignL_modern'},
|
recipe = { 'trainblocks:stationsignL_modern' },
|
||||||
output = 'trainblocks:stationsignL'
|
output = 'trainblocks:stationsignL'
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -116,96 +120,96 @@ minetest.register_craft({
|
|||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "trainblocks:platformsign0",
|
output = "trainblocks:platformsign0",
|
||||||
recipe = {
|
recipe = {
|
||||||
{'dye:blue', 'default:glass', ''},
|
{ materials.dye_blue, materials.glass, '' },
|
||||||
{'', 'dye:white', ''},
|
{ '', materials.dye_white, '' },
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "trainblocks:platformsign1",
|
output = "trainblocks:platformsign1",
|
||||||
recipe = {
|
recipe = {
|
||||||
{'dye:blue', 'default:glass', 'dye:white'},
|
{ materials.dye_blue, materials.glass, materials.dye_white },
|
||||||
{'', '', 'dye:white'},
|
{ '', '', materials.dye_white },
|
||||||
{'', '' ,'dye:white'}
|
{ '', '', materials.dye_white }
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "trainblocks:platformsign2",
|
output = "trainblocks:platformsign2",
|
||||||
recipe = {
|
recipe = {
|
||||||
{'dye:blue', 'default:glass', ''},
|
{ materials.dye_blue, materials.glass, '' },
|
||||||
{'dye:white', 'dye:white', ''},
|
{ materials.dye_white, materials.dye_white, '' },
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "trainblocks:platformsign3",
|
output = "trainblocks:platformsign3",
|
||||||
recipe = {
|
recipe = {
|
||||||
{'dye:blue', 'default:glass', ''},
|
{ materials.dye_blue, materials.glass, '' },
|
||||||
{'dye:white', 'dye:white', 'dye:white'},
|
{ materials.dye_white, materials.dye_white, materials.dye_white },
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "trainblocks:platformsign4",
|
output = "trainblocks:platformsign4",
|
||||||
recipe = {
|
recipe = {
|
||||||
{'dye:blue', 'default:glass', ''},
|
{ materials.dye_blue, materials.glass, '' },
|
||||||
{'dye:white', 'dye:white', ''},
|
{ materials.dye_white, materials.dye_white, '' },
|
||||||
{'dye:white', 'dye:white' ,''}
|
{ materials.dye_white, materials.dye_white, '' }
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "trainblocks:platformsign5",
|
output = "trainblocks:platformsign5",
|
||||||
recipe = {
|
recipe = {
|
||||||
{'dye:blue', 'default:glass', ''},
|
{ materials.dye_blue, materials.glass, '' },
|
||||||
{'dye:white', 'dye:white', 'dye:white'},
|
{ materials.dye_white, materials.dye_white, materials.dye_white },
|
||||||
{'dye:white', 'dye:white' ,''}
|
{ materials.dye_white, materials.dye_white, '' }
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "trainblocks:platformsign6",
|
output = "trainblocks:platformsign6",
|
||||||
recipe = {
|
recipe = {
|
||||||
{'dye:blue', 'default:glass', ''},
|
{ materials.dye_blue, materials.glass, '' },
|
||||||
{'dye:white', 'dye:white', 'dye:white'},
|
{ materials.dye_white, materials.dye_white, materials.dye_white },
|
||||||
{'dye:white', 'dye:white' ,'dye:white'}
|
{ materials.dye_white, materials.dye_white, materials.dye_white }
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "trainblocks:platformsign7",
|
output = "trainblocks:platformsign7",
|
||||||
recipe = {
|
recipe = {
|
||||||
{'dye:blue', 'default:glass', 'dye:white'},
|
{ materials.dye_blue, materials.glass, materials.dye_white },
|
||||||
{'', '', 'dye:white'},
|
{ '', '', materials.dye_white },
|
||||||
{'', 'dye:white' ,''}
|
{ '', materials.dye_white, '' }
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "trainblocks:platformsign8",
|
output = "trainblocks:platformsign8",
|
||||||
recipe = {
|
recipe = {
|
||||||
{'dye:blue', 'default:glass', 'dye:white'},
|
{ materials.dye_blue, materials.glass, materials.dye_white },
|
||||||
{'dye:white', '', 'dye:white'},
|
{ materials.dye_white, '', materials.dye_white },
|
||||||
{'dye:white', 'dye:white' ,'dye:white'}
|
{ materials.dye_white, materials.dye_white, materials.dye_white }
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "trainblocks:platformsign9",
|
output = "trainblocks:platformsign9",
|
||||||
recipe = {
|
recipe = {
|
||||||
{'dye:blue', 'default:glass', 'dye:white'},
|
{ materials.dye_blue, materials.glass, materials.dye_white },
|
||||||
{'', 'dye:white', 'dye:white'},
|
{ '', materials.dye_white, materials.dye_white },
|
||||||
{'', '' ,'dye:white'}
|
{ '', '', materials.dye_white }
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "trainblocks:platformsign10",
|
output = "trainblocks:platformsign10",
|
||||||
recipe = {
|
recipe = {
|
||||||
{'dye:blue', 'default:glass', ''},
|
{ materials.dye_blue, materials.glass, '' },
|
||||||
{'dye:white', '', ''},
|
{ materials.dye_white, '', '' },
|
||||||
{'dye:white', '' ,'dye:white'}
|
{ materials.dye_white, '', materials.dye_white }
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -215,20 +219,20 @@ minetest.register_craft({
|
|||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = 'trainblocks:station_block',
|
output = 'trainblocks:station_block',
|
||||||
recipe = {
|
recipe = {
|
||||||
{'', 'dye:black', ''},
|
{ '', materials.dye_black, '' },
|
||||||
{'dye:white', 'default:glass', 'dye:white'},
|
{ materials.dye_white, materials.glass, materials.dye_white },
|
||||||
{'', 'dye:black', ''},
|
{ '', materials.dye_black, '' },
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
type = 'shapeless',
|
type = 'shapeless',
|
||||||
output = 'trainblocks:station_block_modern',
|
output = 'trainblocks:station_block_modern',
|
||||||
recipe = {'trainblocks:station_block'}
|
recipe = { 'trainblocks:station_block' }
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
type = 'shapeless',
|
type = 'shapeless',
|
||||||
recipe = {'trainblocks:station_block_modern'},
|
recipe = { 'trainblocks:station_block_modern' },
|
||||||
output = 'trainblocks:station_block'
|
output = 'trainblocks:station_block'
|
||||||
})
|
})
|
||||||
|
3
mod.conf
3
mod.conf
@ -1,4 +1,5 @@
|
|||||||
name = trainblocks
|
name = trainblocks
|
||||||
title = Train Decoration Blocks
|
title = Train Decoration Blocks
|
||||||
description = Adds signs fitting the advtrains theme
|
description = Adds signs fitting the advtrains theme
|
||||||
depends = default
|
depends = xcompat
|
||||||
|
supported_games = minetest
|
||||||
|
Loading…
x
Reference in New Issue
Block a user