Skip to content

Commit c2001b3

Browse files
Ezhhparamat
authored andcommittedFeb 27, 2018
Fireflies: Add dedicated mgv6 register_decoration
1 parent 63ebdfd commit c2001b3

File tree

1 file changed

+71
-42
lines changed

1 file changed

+71
-42
lines changed
 

‎mods/fireflies/init.lua

+71-42
Original file line numberDiff line numberDiff line change
@@ -127,46 +127,75 @@ minetest.register_craft( {
127127

128128

129129
-- register fireflies as decorations
130-
minetest.register_decoration({
131-
deco_type = "simple",
132-
place_on = {
133-
"default:dirt_with_grass",
134-
"default:dirt_with_coniferous_litter",
135-
"default:dirt_with_rainforest_litter",
136-
"default:dirt"
137-
},
138-
place_offset_y = 2,
139-
sidelen = 80,
140-
fill_ratio = 0.002,
141-
biomes = {
142-
"deciduous_forest",
143-
"coniferous_forest",
144-
"rainforest",
145-
"rainforest_swamp"
146-
},
147-
y_max = 31000,
148-
y_min = -1,
149-
decoration = "fireflies:firefly",
150-
})
151130

152-
minetest.register_decoration({
153-
deco_type = "simple",
154-
place_on = {
155-
"default:dirt_with_grass",
156-
"default:dirt_with_coniferous_litter",
157-
"default:dirt_with_rainforest_litter",
158-
"default:dirt"
159-
},
160-
place_offset_y = 3,
161-
sidelen = 80,
162-
fill_ratio = 0.002,
163-
biomes = {
164-
"deciduous_forest",
165-
"coniferous_forest",
166-
"rainforest",
167-
"rainforest_swamp"
168-
},
169-
y_max = 31000,
170-
y_min = -1,
171-
decoration = "fireflies:firefly",
172-
})
131+
if minetest.get_mapgen_setting("mg_name") == "v6" then
132+
133+
minetest.register_decoration({
134+
deco_type = "simple",
135+
place_on = "default:dirt_with_grass",
136+
place_offset_y = 2,
137+
sidelen = 80,
138+
fill_ratio = 0.0002,
139+
y_max = 31000,
140+
y_min = 1,
141+
decoration = "fireflies:firefly",
142+
})
143+
144+
minetest.register_decoration({
145+
deco_type = "simple",
146+
place_on = "default:dirt_with_grass",
147+
place_offset_y = 3,
148+
sidelen = 80,
149+
fill_ratio = 0.0002,
150+
y_max = 31000,
151+
y_min = 1,
152+
decoration = "fireflies:firefly",
153+
})
154+
155+
else
156+
157+
minetest.register_decoration({
158+
deco_type = "simple",
159+
place_on = {
160+
"default:dirt_with_grass",
161+
"default:dirt_with_coniferous_litter",
162+
"default:dirt_with_rainforest_litter",
163+
"default:dirt"
164+
},
165+
place_offset_y = 2,
166+
sidelen = 80,
167+
fill_ratio = 0.002,
168+
biomes = {
169+
"deciduous_forest",
170+
"coniferous_forest",
171+
"rainforest",
172+
"rainforest_swamp"
173+
},
174+
y_max = 31000,
175+
y_min = -1,
176+
decoration = "fireflies:firefly",
177+
})
178+
179+
minetest.register_decoration({
180+
deco_type = "simple",
181+
place_on = {
182+
"default:dirt_with_grass",
183+
"default:dirt_with_coniferous_litter",
184+
"default:dirt_with_rainforest_litter",
185+
"default:dirt"
186+
},
187+
place_offset_y = 3,
188+
sidelen = 80,
189+
fill_ratio = 0.002,
190+
biomes = {
191+
"deciduous_forest",
192+
"coniferous_forest",
193+
"rainforest",
194+
"rainforest_swamp"
195+
},
196+
y_max = 31000,
197+
y_min = -1,
198+
decoration = "fireflies:firefly",
199+
})
200+
201+
end

0 commit comments

Comments
 (0)
Please sign in to comment.