Use pine nodes and dry grass from minetest_game if possible
This commit is contained in:
parent
43bf44ce63
commit
03674033c6
80
init.lua
80
init.lua
@ -7,44 +7,50 @@ local DMAX = 20
|
|||||||
local AREA_SIZE = 80
|
local AREA_SIZE = 80
|
||||||
|
|
||||||
dofile(minetest.get_modpath(minetest.get_current_modname()).."/nodes.lua")
|
dofile(minetest.get_modpath(minetest.get_current_modname()).."/nodes.lua")
|
||||||
c_air = minetest.get_content_id("air")
|
|
||||||
c_ignore = minetest.get_content_id("ignore")
|
local function get_content_id(name)
|
||||||
c_water = minetest.get_content_id("default:water_source")
|
name = minetest.registered_aliases[name] or name
|
||||||
c_grass = minetest.get_content_id("default:dirt_with_grass")
|
return minetest.get_content_id(name)
|
||||||
c_dry_grass = minetest.get_content_id("mg:dirt_with_dry_grass")
|
end
|
||||||
c_dirt_snow = minetest.get_content_id("default:dirt_with_snow")
|
|
||||||
c_snow = minetest.get_content_id("default:snow")
|
c_air = get_content_id("air")
|
||||||
c_sapling = minetest.get_content_id("default:sapling")
|
c_ignore = get_content_id("ignore")
|
||||||
c_tree = minetest.get_content_id("default:tree")
|
c_water = get_content_id("default:water_source")
|
||||||
c_leaves = minetest.get_content_id("default:leaves")
|
c_grass = get_content_id("default:dirt_with_grass")
|
||||||
c_junglesapling = minetest.get_content_id("default:junglesapling")
|
c_dry_grass = get_content_id("mg:dirt_with_dry_grass")
|
||||||
c_jungletree = minetest.get_content_id("default:jungletree")
|
c_dirt_snow = get_content_id("default:dirt_with_snow")
|
||||||
c_jungleleaves = minetest.get_content_id("default:jungleleaves")
|
c_snow = get_content_id("default:snow")
|
||||||
c_savannasapling = minetest.get_content_id("mg:savannasapling")
|
c_sapling = get_content_id("default:sapling")
|
||||||
c_savannatree = minetest.get_content_id("mg:savannatree")
|
c_tree = get_content_id("default:tree")
|
||||||
c_savannaleaves = minetest.get_content_id("mg:savannaleaves")
|
c_leaves = get_content_id("default:leaves")
|
||||||
c_pinesapling = minetest.get_content_id("mg:pinesapling")
|
c_junglesapling = get_content_id("default:junglesapling")
|
||||||
c_pinetree = minetest.get_content_id("mg:pinetree")
|
c_jungletree = get_content_id("default:jungletree")
|
||||||
c_pineleaves = minetest.get_content_id("mg:pineleaves")
|
c_jungleleaves = get_content_id("default:jungleleaves")
|
||||||
c_dirt = minetest.get_content_id("default:dirt")
|
c_savannasapling = get_content_id("mg:savannasapling")
|
||||||
c_stone = minetest.get_content_id("default:stone")
|
c_savannatree = get_content_id("mg:savannatree")
|
||||||
c_water = minetest.get_content_id("default:water_source")
|
c_savannaleaves = get_content_id("mg:savannaleaves")
|
||||||
c_ice = minetest.get_content_id("default:ice")
|
c_pinesapling = get_content_id("mg:pinesapling")
|
||||||
c_sand = minetest.get_content_id("default:sand")
|
c_pinetree = get_content_id("mg:pinetree")
|
||||||
c_sandstone = minetest.get_content_id("default:sandstone")
|
c_pineleaves = get_content_id("mg:pineleaves")
|
||||||
c_desert_sand = minetest.get_content_id("default:desert_sand")
|
c_dirt = get_content_id("default:dirt")
|
||||||
c_desert_stone = minetest.get_content_id("default:desert_stone")
|
c_stone = get_content_id("default:stone")
|
||||||
c_snowblock = minetest.get_content_id("default:snowblock")
|
c_water = get_content_id("default:water_source")
|
||||||
c_cactus = minetest.get_content_id("default:cactus")
|
c_ice = get_content_id("default:ice")
|
||||||
c_grass_1 = minetest.get_content_id("default:grass_1")
|
c_sand = get_content_id("default:sand")
|
||||||
c_grass_2 = minetest.get_content_id("default:grass_2")
|
c_sandstone = get_content_id("default:sandstone")
|
||||||
c_grass_3 = minetest.get_content_id("default:grass_3")
|
c_desert_sand = get_content_id("default:desert_sand")
|
||||||
c_grass_4 = minetest.get_content_id("default:grass_4")
|
c_desert_stone = get_content_id("default:desert_stone")
|
||||||
c_grass_5 = minetest.get_content_id("default:grass_5")
|
c_snowblock = get_content_id("default:snowblock")
|
||||||
|
c_cactus = get_content_id("default:cactus")
|
||||||
|
c_grass_1 = get_content_id("default:grass_1")
|
||||||
|
c_grass_2 = get_content_id("default:grass_2")
|
||||||
|
c_grass_3 = get_content_id("default:grass_3")
|
||||||
|
c_grass_4 = get_content_id("default:grass_4")
|
||||||
|
c_grass_5 = get_content_id("default:grass_5")
|
||||||
c_grasses = {c_grass_1, c_grass_2, c_grass_3, c_grass_4, c_grass_5}
|
c_grasses = {c_grass_1, c_grass_2, c_grass_3, c_grass_4, c_grass_5}
|
||||||
c_jungle_grass = minetest.get_content_id("default:junglegrass")
|
c_jungle_grass = get_content_id("default:junglegrass")
|
||||||
c_dry_shrub = minetest.get_content_id("default:dry_shrub")
|
c_dry_shrub = get_content_id("default:dry_shrub")
|
||||||
c_papyrus = minetest.get_content_id("default:papyrus")
|
c_papyrus = get_content_id("default:papyrus")
|
||||||
|
|
||||||
minetest.register_on_mapgen_init(function(mgparams)
|
minetest.register_on_mapgen_init(function(mgparams)
|
||||||
minetest.set_mapgen_params({mgname = "singlenode", flags = "nolight"})
|
minetest.set_mapgen_params({mgname = "singlenode", flags = "nolight"})
|
||||||
|
15
nodes.lua
15
nodes.lua
@ -84,6 +84,13 @@ minetest.register_abm({
|
|||||||
-- Pine tree
|
-- Pine tree
|
||||||
-------------------------
|
-------------------------
|
||||||
|
|
||||||
|
if minetest.registered_nodes["default:pine_tree"] ~= nil then
|
||||||
|
minetest.register_alias("mg:pinetree", "default:pine_tree")
|
||||||
|
minetest.register_alias("mg:pineleaves", "default:pine_needles")
|
||||||
|
minetest.register_alias("mg:pinewood", "default:pine_wood")
|
||||||
|
minetest.register_alias("mg:pinesapling", "default:pine_sapling")
|
||||||
|
else
|
||||||
|
|
||||||
minetest.register_node("mg:pinetree", {
|
minetest.register_node("mg:pinetree", {
|
||||||
description = "Pine Tree",
|
description = "Pine Tree",
|
||||||
tiles = {"mg_pine_tree_top.png", "mg_pine_tree_top.png", "mg_pine_tree.png"},
|
tiles = {"mg_pine_tree_top.png", "mg_pine_tree_top.png", "mg_pine_tree.png"},
|
||||||
@ -162,10 +169,16 @@ minetest.register_abm({
|
|||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
-------------------------
|
-------------------------
|
||||||
-- Other
|
-- Other
|
||||||
-------------------------
|
-------------------------
|
||||||
|
|
||||||
|
if minetest.registered_nodes["default:dirt_with_dry_grass"] ~= nil then
|
||||||
|
minetest.register_alias("mg:dirt_with_dry_grass", "default:dirt_with_dry_grass")
|
||||||
|
else
|
||||||
|
|
||||||
minetest.register_node("mg:dirt_with_dry_grass", {
|
minetest.register_node("mg:dirt_with_dry_grass", {
|
||||||
description = "Dry Grass",
|
description = "Dry Grass",
|
||||||
tiles = {"mg_dry_grass.png", "default_dirt.png", "default_dirt.png^mg_dry_grass_side.png"},
|
tiles = {"mg_dry_grass.png", "default_dirt.png", "default_dirt.png^mg_dry_grass_side.png"},
|
||||||
@ -177,6 +190,8 @@ minetest.register_node("mg:dirt_with_dry_grass", {
|
|||||||
}),
|
}),
|
||||||
})
|
})
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
minetest.register_node("mg:ignore", {
|
minetest.register_node("mg:ignore", {
|
||||||
description = "MG Ignore",
|
description = "MG Ignore",
|
||||||
drawtype = "airlike",
|
drawtype = "airlike",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user