mirror of
https://github.com/minetest/minetest_game.git
synced 2024-11-16 06:50:18 +01:00
Update init.lua
This commit is contained in:
parent
4d69915d8b
commit
03f1e467ac
|
@ -3,6 +3,8 @@
|
||||||
-- Load support for MT game translation.
|
-- Load support for MT game translation.
|
||||||
local S = minetest.get_translator("fireflies")
|
local S = minetest.get_translator("fireflies")
|
||||||
|
|
||||||
|
local modpath = minetest.get_modpath("fireflies")
|
||||||
|
dofile(modpath .. "/api.lua")
|
||||||
|
|
||||||
minetest.register_node("fireflies:firefly", {
|
minetest.register_node("fireflies:firefly", {
|
||||||
description = S("Firefly"),
|
description = S("Firefly"),
|
||||||
|
@ -184,83 +186,23 @@ minetest.register_craft( {
|
||||||
|
|
||||||
|
|
||||||
-- register fireflies as decorations
|
-- register fireflies as decorations
|
||||||
|
local place_on = {
|
||||||
|
"default:dirt_with_grass",
|
||||||
|
"default:dirt_with_coniferous_litter",
|
||||||
|
"default:dirt_with_rainforest_litter",
|
||||||
|
"default:dirt"
|
||||||
|
}
|
||||||
|
local biomes = {
|
||||||
|
"deciduous_forest",
|
||||||
|
"coniferous_forest",
|
||||||
|
"rainforest",
|
||||||
|
"rainforest_swamp"
|
||||||
|
}
|
||||||
|
|
||||||
if minetest.get_mapgen_setting("mg_name") == "v6" then
|
local place_on_mgv6 = "default:dirt_with_grass"
|
||||||
|
|
||||||
minetest.register_decoration({
|
|
||||||
name = "fireflies:firefly_low",
|
|
||||||
deco_type = "simple",
|
|
||||||
place_on = "default:dirt_with_grass",
|
|
||||||
place_offset_y = 2,
|
|
||||||
sidelen = 80,
|
|
||||||
fill_ratio = 0.0002,
|
|
||||||
y_max = 31000,
|
|
||||||
y_min = 1,
|
|
||||||
decoration = "fireflies:hidden_firefly",
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_decoration({
|
|
||||||
name = "fireflies:firefly_high",
|
|
||||||
deco_type = "simple",
|
|
||||||
place_on = "default:dirt_with_grass",
|
|
||||||
place_offset_y = 3,
|
|
||||||
sidelen = 80,
|
|
||||||
fill_ratio = 0.0002,
|
|
||||||
y_max = 31000,
|
|
||||||
y_min = 1,
|
|
||||||
decoration = "fireflies:hidden_firefly",
|
|
||||||
})
|
|
||||||
|
|
||||||
else
|
|
||||||
|
|
||||||
minetest.register_decoration({
|
|
||||||
name = "fireflies:firefly_low",
|
|
||||||
deco_type = "simple",
|
|
||||||
place_on = {
|
|
||||||
"default:dirt_with_grass",
|
|
||||||
"default:dirt_with_coniferous_litter",
|
|
||||||
"default:dirt_with_rainforest_litter",
|
|
||||||
"default:dirt"
|
|
||||||
},
|
|
||||||
place_offset_y = 2,
|
|
||||||
sidelen = 80,
|
|
||||||
fill_ratio = 0.0005,
|
|
||||||
biomes = {
|
|
||||||
"deciduous_forest",
|
|
||||||
"coniferous_forest",
|
|
||||||
"rainforest",
|
|
||||||
"rainforest_swamp"
|
|
||||||
},
|
|
||||||
y_max = 31000,
|
|
||||||
y_min = -1,
|
|
||||||
decoration = "fireflies:hidden_firefly",
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_decoration({
|
|
||||||
name = "fireflies:firefly_high",
|
|
||||||
deco_type = "simple",
|
|
||||||
place_on = {
|
|
||||||
"default:dirt_with_grass",
|
|
||||||
"default:dirt_with_coniferous_litter",
|
|
||||||
"default:dirt_with_rainforest_litter",
|
|
||||||
"default:dirt"
|
|
||||||
},
|
|
||||||
place_offset_y = 3,
|
|
||||||
sidelen = 80,
|
|
||||||
fill_ratio = 0.0005,
|
|
||||||
biomes = {
|
|
||||||
"deciduous_forest",
|
|
||||||
"coniferous_forest",
|
|
||||||
"rainforest",
|
|
||||||
"rainforest_swamp"
|
|
||||||
},
|
|
||||||
y_max = 31000,
|
|
||||||
y_min = -1,
|
|
||||||
decoration = "fireflies:hidden_firefly",
|
|
||||||
})
|
|
||||||
|
|
||||||
end
|
|
||||||
|
|
||||||
|
fireflies.register_decoration(biomes, place_on)
|
||||||
|
fireflies.register_decoration(nil, place_on_mgv6)
|
||||||
|
|
||||||
-- get decoration IDs
|
-- get decoration IDs
|
||||||
local firefly_low = minetest.get_decoration_id("fireflies:firefly_low")
|
local firefly_low = minetest.get_decoration_id("fireflies:firefly_low")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user