Versuch Kristalle zu fixen. Versuch Nyancat zu fixen.
Before Width: | Height: | Size: 696 KiB After Width: | Height: | Size: 696 KiB |
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 631 B After Width: | Height: | Size: 631 B |
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 631 B After Width: | Height: | Size: 631 B |
Before Width: | Height: | Size: 368 B After Width: | Height: | Size: 368 B |
Before Width: | Height: | Size: 718 B After Width: | Height: | Size: 718 B |
Before Width: | Height: | Size: 714 B After Width: | Height: | Size: 714 B |
Before Width: | Height: | Size: 672 B After Width: | Height: | Size: 672 B |
Before Width: | Height: | Size: 714 B After Width: | Height: | Size: 714 B |
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 5.1 KiB |
|
@ -25,8 +25,8 @@ setting("number", "ymax", -4096) --top realm limit
|
|||
setting("number", "tcave", 0.75) --cave threshold
|
||||
|
||||
--decoration chances
|
||||
setting("number", "stagcha", 0.01) --chance of stalagmites 0.003
|
||||
setting("number", "stalcha", 0.01) --chance of stalactites 0.003
|
||||
setting("number", "stagcha", 0.003) --chance of stalagmites 0.003
|
||||
setting("number", "stalcha", 0.003) --chance of stalactites 0.003
|
||||
|
||||
setting("number", "h_lag", 15) --max height for stalagmites
|
||||
setting("number", "h_lac", 20) --...stalactites
|
||||
|
|
|
@ -142,6 +142,7 @@ minetest.register_on_generated(function(minp, maxp, seed)
|
|||
local vm, emin, emax = minetest.get_mapgen_object("voxelmanip")
|
||||
local area = VoxelArea:new({ MinEdge = emin, MaxEdge = emax })
|
||||
local data = vm:get_data()
|
||||
local paramzwei = minetest.dir_to_facedir(vector.new(0, 1, 0))
|
||||
|
||||
--grab content IDs
|
||||
local c_air = minetest.get_content_id("air")
|
||||
|
@ -154,8 +155,7 @@ minetest.register_on_generated(function(minp, maxp, seed)
|
|||
local c_water = minetest.get_content_id("default:water_source")
|
||||
local c_lava = minetest.get_content_id("default:lava_source")
|
||||
local c_iced = minetest.get_content_id("default:ice")
|
||||
local c_ice = minetest.get_content_id("default:sand")
|
||||
local c_ice = minetest.get_content_id("default:silver_sand")
|
||||
local c_ssand = minetest.get_content_id("default:silver_sand")
|
||||
local c_thinice = minetest.get_content_id("caverealms:thin_ice")
|
||||
local c_crystal = minetest.get_content_id("caverealms:glow_crystal")
|
||||
local c_gem = minetest.get_content_id("caverealms:glow_gem")
|
||||
|
@ -187,41 +187,51 @@ minetest.register_on_generated(function(minp, maxp, seed)
|
|||
-- ethereal
|
||||
--if minetest.get_modpath("ethereal") then
|
||||
local c_bluegrass = minetest.get_content_id("ethereal:crystalgrass")
|
||||
local c_greemush = minetest.get_content_id("ethereal:illumishroom2")
|
||||
local c_redmush = minetest.get_content_id("ethereal:illumishroom")
|
||||
--else
|
||||
--end
|
||||
|
||||
--too_many_stones
|
||||
--if minetest.get_modpath("too_many_stones") then
|
||||
local c_torangecrys = minetest.get_content_id("too_many_stone:crocoite_crystal")
|
||||
local c_tredcrys = minetest.get_content_id("too_many_stone:eudialite_crystal")
|
||||
local c_tblackcrys = minetest.get_content_id("too_many_stone:eudialite_crystal")
|
||||
local c_fakesalt = minetest.get_content_id("too_many_stone:rose_quartz_crystal")
|
||||
local c_torangecrys = minetest.get_content_id("too_many_stones:crocoite_crystal")
|
||||
local c_tredcrys = minetest.get_content_id("too_many_stones:eudialite_crystal")
|
||||
local c_fakesalt = minetest.get_content_id("too_many_stones:rose_quartz_crystal")--
|
||||
local c_tyellocrys = minetest.get_content_id("too_many_stones:citrine_crystal")
|
||||
local c_tsmokecrys = minetest.get_content_id("too_many_stones:smokey_quartz_crystal")
|
||||
local c_tyellowcrys = minetest.get_content_id("too_many_stones:heliodor_crystal")
|
||||
local c_tgreen1crys = minetest.get_content_id("too_many_stones:tourmaline_green_crystal")
|
||||
local c_tgreen2crys = minetest.get_content_id("too_many_stones:prasiolite_crystal")
|
||||
local c_fakeice1 = minetest.get_content_id("too_many_stones:celestine_crystal")
|
||||
local c_fakeice2 = minetest.get_content_id("too_many_stones:moonstone_crystal")
|
||||
local c_fakeice3 = minetest.get_content_id("too_many_stones:quartz_crystal")
|
||||
|
||||
--else
|
||||
--end
|
||||
|
||||
--everness
|
||||
--if minetest.get_modpath("everness") then
|
||||
local c_bluetwist = minetest.get_content_id("everness:twisted_crytal_grass")
|
||||
local c_bluetwist = minetest.get_content_id("everness:twisted_crystal_grass")
|
||||
local c_icevine = minetest.get_content_id("everness:lumabus_vine_1")
|
||||
local c_purplevine = minetest.get_content_id("everness:whispering_gourd_vine_1")
|
||||
local c_icicles_c = minetest.get_content_id("everness:frosted_icicle")
|
||||
local c_icicles_f = minetest.get_content_id("everness:frosted_icicle_floor")
|
||||
local c_crystcyan = minetest.get_content_id("everness:crystal_cyan")
|
||||
local c_crystorange = minetest.get_content_id("everness:crystal_orange")
|
||||
local c_crystpurple = minetest.get_content_id("everness:crystal_purple")
|
||||
local c_crystcyan = minetest.get_content_id("everness:crystal_cyan") --
|
||||
local c_crystorange = minetest.get_content_id("everness:crystal_orange")--
|
||||
local c_crystpurple = minetest.get_content_id("everness:crystal_purple")--
|
||||
local c_flamepurple = minetest.get_content_id("everness:flame_permanent_purple")
|
||||
local c_flameblue = minetest.get_content_id("everness:flame_permanent_blue")
|
||||
local c_frostedice = minetest.get_content_id("everness:frosted_ice")
|
||||
local c_mosspurple = minetest.get_content_id("everness:ivis_moss")
|
||||
local c_bluelant = minetest.get_content_id("everness:blue_vine_lantern")
|
||||
local c_redlant = minetest.get_content_id("everness:glowing_pillar")
|
||||
|
||||
local c_redplant = minetest.get_content_id("everness:bloodspore_plant")
|
||||
|
||||
--else
|
||||
--end
|
||||
|
||||
--herbs
|
||||
--if minetest.get_modpath("herbs") then
|
||||
local c_amanita = minetest.get_content_id("herbs:mushroom_amanita_green")
|
||||
--else
|
||||
--end
|
||||
|
||||
|
@ -336,18 +346,34 @@ minetest.register_on_generated(function(minp, maxp, seed)
|
|||
|
||||
if n_biome_e < -0.33 then
|
||||
if n_biome_w < -0.33 then -- algae
|
||||
floor = c_algae
|
||||
if is_deep then --deep algae deco
|
||||
worms = { c_worm_green, c_tyellowcrys }
|
||||
decos = { c_mycena, c_greemush, c_tyellowcrys, c_amanita }
|
||||
else -- normal algae
|
||||
worms = { c_worm_green }
|
||||
worm_max_len = 3
|
||||
decos = { c_mycena }
|
||||
end
|
||||
floor = c_algae
|
||||
worm_max_len = 3
|
||||
if mode == 1 and data[ai] == c_air and math.random() < 0.03 then
|
||||
data[ai] = c_firefly
|
||||
end
|
||||
elseif n_biome_w < 0.33 then -- moss
|
||||
floor = c_moss
|
||||
worms = { c_worm_green, c_worm_blue }
|
||||
worm_max_len = 3
|
||||
if is_deep then --deep moss deco
|
||||
worms = { c_worm_green, c_tgreen1crys, c_tgreen2crys, c_worm_blue }
|
||||
decos = {
|
||||
c_mycena,
|
||||
c_greemush,
|
||||
c_tgreen1crys,
|
||||
c_tgreen2crys,
|
||||
}
|
||||
deco_mul = 2
|
||||
else -- normal moss
|
||||
worms = { c_worm_green }
|
||||
decos = { c_mycena }
|
||||
end
|
||||
floor = c_moss
|
||||
worm_max_len = 3
|
||||
deco_mul = 2.0
|
||||
if mode == 1 and data[ai] == c_air and math.random() < 0.001 then
|
||||
caverealms:grow_green_mushroom(x, y - 1, z, area, data)
|
||||
|
@ -355,15 +381,19 @@ minetest.register_on_generated(function(minp, maxp, seed)
|
|||
else -- lichen
|
||||
if is_deep then --magical lichen deco
|
||||
worms = { c_crystpurple, c_crystpurple, c_purplevine }
|
||||
decos = { c_mosspurple, c_flamepurple, c_crystpurple, c_bluetwist }
|
||||
decos = {
|
||||
c_mosspurple,
|
||||
c_flamepurple,
|
||||
c_crystpurple,
|
||||
c_bluetwist,
|
||||
c_tyellocrys
|
||||
}
|
||||
else -- normal lichen
|
||||
worms = { c_worm_blue }
|
||||
decos = { c_mycena, c_fungus, c_fungus }
|
||||
end
|
||||
floor = c_lichen
|
||||
|
||||
worm_max_len = 3
|
||||
|
||||
worm_max_len = 1
|
||||
deco_mul = 3.3
|
||||
if mode == 1 and data[ai] == c_air and math.random() < 0.003 then
|
||||
data[ai] = c_bluefly
|
||||
|
@ -382,45 +412,78 @@ minetest.register_on_generated(function(minp, maxp, seed)
|
|||
floor = c_desand
|
||||
end
|
||||
end
|
||||
if is_deep then
|
||||
decos = {
|
||||
c_redplant,
|
||||
c_redlant,
|
||||
c_flame,
|
||||
c_torangecrys,
|
||||
c_redplant,
|
||||
c_flame,
|
||||
c_torangecrys,
|
||||
c_crystorange,
|
||||
}
|
||||
worms = { c_worm_red, c_torangecrys }
|
||||
else
|
||||
decos = {
|
||||
c_tyellocrys,
|
||||
c_flame,
|
||||
c_spike,
|
||||
c_tsmokecrys,
|
||||
c_crystorange,
|
||||
}
|
||||
worms = { c_tyellocrys, c_tsmokecrys }
|
||||
end
|
||||
deco_mul = 2
|
||||
floor_depth = 2
|
||||
|
||||
worms = { c_worm_red }
|
||||
worm_max_len = 1
|
||||
decos = { c_flame, c_spike }
|
||||
elseif n_biome_w < 0.33 then -- salt
|
||||
floor = c_salt
|
||||
floor_depth = 2
|
||||
worms = { c_fakesalt }
|
||||
worm_max_len = 1
|
||||
no_mites = true
|
||||
|
||||
decos = { c_saltgem }
|
||||
if is_deep then
|
||||
decos = { c_saltgem, c_fakesalt }
|
||||
end
|
||||
else
|
||||
if is_deep then --magic deep glacial
|
||||
floor = c_frostedice
|
||||
floor_depth = 2
|
||||
worms = { c_icevine, c_crystcyan, c_crystcyan }
|
||||
worms = { c_icevine, c_crystcyan, c_crystcyan, c_icicles_c, c_worm_blue }
|
||||
worm_max_len = 1
|
||||
|
||||
decos = { c_crystcyan, c_blueglowshroom }
|
||||
decos = {
|
||||
c_crystcyan,
|
||||
c_blueglowshroom,
|
||||
c_bluetwist,
|
||||
c_bflame,
|
||||
c_icicles_f,
|
||||
c_bluelant,
|
||||
c_iciu,
|
||||
c_iciu,
|
||||
c_icicles_f,
|
||||
c_bluegrass,
|
||||
}
|
||||
deco_mul = 2
|
||||
else --glacial
|
||||
floor = c_thinice
|
||||
floor_depth = 2
|
||||
worms = { c_icid }
|
||||
worms = { c_icid, c_worm_blue }
|
||||
worm_max_len = 1
|
||||
|
||||
decos = { c_gem, c_iciu }
|
||||
deco_mul = 2
|
||||
end
|
||||
end
|
||||
else
|
||||
if n_biome_w < -0.33 then -- hotspring
|
||||
floor = c_hcobble
|
||||
worms = { c_icid }
|
||||
worms = { c_worm_red }
|
||||
worm_max_len = 1
|
||||
if mode == 1 and math.random() < 0.005 then
|
||||
caverealms:spawn_hotspring(x, y, z, area, data, math.random(4) + 2)
|
||||
end
|
||||
decos = { c_fire_vine }
|
||||
decos = { c_fire_vine, c_redmush }
|
||||
deco_mul = 0.7
|
||||
elseif n_biome_w < 0.33 then -- dungeon
|
||||
if math.random() < 0.5 then
|
||||
|
@ -428,16 +491,27 @@ minetest.register_on_generated(function(minp, maxp, seed)
|
|||
else
|
||||
floor = c_gobsidian2
|
||||
end
|
||||
worms = { c_worm_red }
|
||||
worms = { c_worm_red, c_tredcrys }
|
||||
worm_max_len = 4
|
||||
decos = { c_flame, c_flame, c_fire_vine }
|
||||
decos =
|
||||
{ c_flame, c_flame, c_bflame, c_fire_vine, c_tredcrys}
|
||||
else -- deep glacial
|
||||
floor = c_ice
|
||||
floor = c_iced
|
||||
floor_depth = 3
|
||||
worms = { c_icid }
|
||||
worms = { c_icid, c_icicles_c, c_icid, c_icicles_c, c_fakeice1, c_fakeice2, c_fakeice3 }
|
||||
worm_max_len = 1
|
||||
|
||||
decos = { c_bflame, c_iciu }
|
||||
decos = {
|
||||
c_bflame,
|
||||
c_iciu,
|
||||
c_icicles_f,
|
||||
c_bflame,
|
||||
c_iciu,
|
||||
c_icicles_f,
|
||||
c_fakeice1,
|
||||
c_fakeice2,
|
||||
c_fakeice3,
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -469,37 +543,38 @@ minetest.register_on_generated(function(minp, maxp, seed)
|
|||
if not no_mites and math.random() < CRYSTAL then
|
||||
local ore
|
||||
local cry
|
||||
--for randomness - for stalagmites or stalagtites in a different color
|
||||
|
||||
local mode = 1
|
||||
if math.random(15) == 1 then --chance 1/15
|
||||
mode = 2
|
||||
end
|
||||
if biome == 3 then
|
||||
if math.random(25) == 1 then --chance 1/25
|
||||
mode = 2
|
||||
else
|
||||
mode = 1
|
||||
end
|
||||
end
|
||||
if biome == 4 or biome == 5 then
|
||||
if math.random(3) == 1 then --chance 1/3
|
||||
mode = 2
|
||||
end
|
||||
end
|
||||
|
||||
if n_biome_e < -0.33 then -- non-evil
|
||||
if n_biome_w < -0.33 then --algae
|
||||
ore = c_emore
|
||||
cry = c_emerald
|
||||
elseif n_biome_w < 0.33 then --moss
|
||||
ore = c_emore
|
||||
cry = c_emerald
|
||||
else --lichen
|
||||
if is_deep then --magical lichen
|
||||
if math.random(10) == 1 then --chance 1/10 for mese
|
||||
ore = c_emore
|
||||
cry = c_emerald
|
||||
else
|
||||
ore = c_meseore
|
||||
cry = c_mesecry
|
||||
end
|
||||
elseif n_biome_w < 0.33 then --moss
|
||||
if is_deep then --deep moss
|
||||
if math.random(10) == 1 then
|
||||
ore = c_crystore
|
||||
cry = c_crystal
|
||||
else
|
||||
ore = c_emore
|
||||
cry = c_emerald
|
||||
end
|
||||
else --normal moss
|
||||
ore = c_emore
|
||||
cry = c_emerald
|
||||
end
|
||||
else --lichen
|
||||
if is_deep then --magical lichen
|
||||
local tschu = math.random(8)
|
||||
if tschu == 1 then --chance 1/10 for mese
|
||||
ore = c_meseore
|
||||
cry = c_mesecry
|
||||
elseif tschu == 2 then
|
||||
ore = c_crystore
|
||||
cry = c_crystal
|
||||
else
|
||||
ore = c_amethore
|
||||
cry = c_ameth
|
||||
|
@ -510,13 +585,24 @@ minetest.register_on_generated(function(minp, maxp, seed)
|
|||
end
|
||||
end
|
||||
elseif n_biome_e < 0.33 then -- moderately evil
|
||||
if n_biome_w < -0.33 then --desert / sand
|
||||
if n_biome_w < -0.33 then
|
||||
if is_deep then --hot cobble
|
||||
if math.random(3) == 1 then
|
||||
ore = c_citore
|
||||
cry = c_citrine
|
||||
if is_deep then --hot cobble
|
||||
else
|
||||
ore = c_rubore
|
||||
cry = c_ruby
|
||||
end
|
||||
else
|
||||
if math.random(3) == 1 then --desert / sand
|
||||
ore = c_meseore
|
||||
cry = c_mesecry
|
||||
else
|
||||
ore = c_citore
|
||||
cry = c_citrine
|
||||
end
|
||||
end
|
||||
elseif n_biome_w < 0.33 then --salt
|
||||
ore = c_meseore
|
||||
cry = c_mesecry
|
||||
|
@ -530,24 +616,39 @@ minetest.register_on_generated(function(minp, maxp, seed)
|
|||
cry = c_crystal
|
||||
end
|
||||
else --glacial
|
||||
if math.random(5) == 1 then
|
||||
ore = c_crystore
|
||||
cry = c_crystal
|
||||
else
|
||||
ore = c_iced
|
||||
cry = c_thinice
|
||||
end
|
||||
end
|
||||
end
|
||||
else -- very evil
|
||||
if n_biome_w < -0.33 then --hotcobble-hotsprings
|
||||
ore = c_rubore
|
||||
cry = c_ruby
|
||||
elseif n_biome_w < 0.33 then --obsidian-dungeon
|
||||
ore = c_rubore
|
||||
cry = c_ruby
|
||||
else --deep_glacial
|
||||
if math.random(3) == 1 then
|
||||
ore = c_iced
|
||||
cry = c_thinice
|
||||
ore = c_citore
|
||||
cry = c_citrine
|
||||
else
|
||||
ore = c_rubore
|
||||
cry = c_ruby
|
||||
end
|
||||
elseif n_biome_w < 0.33 then --obsidian-dungeon
|
||||
if math.random(10) == 1 then
|
||||
ore = c_crystore
|
||||
cry = c_crystal
|
||||
else
|
||||
ore = c_rubore
|
||||
cry = c_ruby
|
||||
end
|
||||
else --deep_glacial
|
||||
if math.random(3) == 1 then
|
||||
ore = c_crystore
|
||||
cry = c_crystal
|
||||
else
|
||||
ore = c_iced
|
||||
cry = c_thinice
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -596,45 +697,100 @@ minetest.register_on_generated(function(minp, maxp, seed)
|
|||
|
||||
if n_biome_e < -0.33 then -- non-evil
|
||||
if n_biome_w < -0.33 then --algae
|
||||
if math.random(10) == 1 then --chance 1/10 for mese
|
||||
ore = c_emore
|
||||
cry = c_emerald
|
||||
else
|
||||
ore = c_meseore
|
||||
cry = c_mesecry
|
||||
end
|
||||
elseif n_biome_w < 0.33 then --moss
|
||||
ore = c_emore
|
||||
cry = c_emerald
|
||||
else --lichen
|
||||
if is_deep then --magical lichen
|
||||
local tschu = math.random(6)
|
||||
if tschu == 1 then --chance 1/10 for mese
|
||||
ore = c_meseore
|
||||
cry = c_mesecry
|
||||
elseif tschu == 2 then
|
||||
ore = c_crystore
|
||||
cry = c_crystal
|
||||
else
|
||||
ore = c_amethore
|
||||
cry = c_ameth
|
||||
end
|
||||
else --lichen
|
||||
ore = c_amethore
|
||||
cry = c_ameth
|
||||
end
|
||||
end
|
||||
elseif n_biome_e < 0.33 then -- moderately evil
|
||||
if n_biome_w < -0.33 then --desert / sand
|
||||
if n_biome_w < -0.33 then
|
||||
if is_deep then --hot cobble
|
||||
if math.random(3) == 1 then
|
||||
ore = c_citore
|
||||
cry = c_citrine
|
||||
if is_deep then --hot cobble
|
||||
else
|
||||
ore = c_rubore
|
||||
cry = c_ruby
|
||||
end
|
||||
else
|
||||
if math.random(3) == 1 then --desert / sand
|
||||
ore = c_meseore
|
||||
cry = c_mesecry
|
||||
else
|
||||
ore = c_citore
|
||||
cry = c_citrine
|
||||
end
|
||||
end
|
||||
elseif n_biome_w < 0.33 then --salt
|
||||
ore = c_meseore
|
||||
cry = c_mesecry
|
||||
else --glacial
|
||||
else
|
||||
if is_deep then --magic deep glacial
|
||||
if math.random(3) == 1 then
|
||||
ore = c_iced
|
||||
cry = c_thinice
|
||||
else
|
||||
ore = c_crystore
|
||||
cry = c_crystal
|
||||
end
|
||||
else -- very evil
|
||||
if n_biome_w < -0.33 then --hotcobble-hotsprings
|
||||
ore = c_rubore
|
||||
cry = c_ruby
|
||||
elseif n_biome_w < 0.33 then --obsidian-dungeon
|
||||
ore = c_rubore
|
||||
cry = c_ruby
|
||||
else --deep_glacial
|
||||
else --glacial
|
||||
if math.random(5) == 1 then
|
||||
ore = c_crystore
|
||||
cry = c_crystal
|
||||
else
|
||||
ore = c_iced
|
||||
cry = c_thinice
|
||||
end
|
||||
end
|
||||
end
|
||||
else -- very evil
|
||||
if n_biome_w < -0.33 then --hotcobble-hotsprings
|
||||
if math.random(3) == 1 then
|
||||
ore = c_citore
|
||||
cry = c_citrine
|
||||
else
|
||||
ore = c_rubore
|
||||
cry = c_ruby
|
||||
end
|
||||
elseif n_biome_w < 0.33 then --obsidian-dungeon
|
||||
if math.random(20) == 1 then
|
||||
ore = c_crystore
|
||||
cry = c_crystal
|
||||
else
|
||||
ore = c_rubore
|
||||
cry = c_ruby
|
||||
end
|
||||
else --deep_glacial
|
||||
if math.random(3) == 1 then
|
||||
ore = c_crystore
|
||||
cry = c_crystal
|
||||
else
|
||||
ore = c_iced
|
||||
cry = c_thinice
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -1,51 +1,20 @@
|
|||
|
||||
-- mod check and sound settings
|
||||
|
||||
local def = core.get_modpath("default")
|
||||
local mcl = core.get_modpath("mcl_core")
|
||||
local snd = mcl and mcl_sounds.node_sound_glass_defaults() or default.node_sound_glass_defaults()
|
||||
|
||||
-- PB&J Pup node
|
||||
|
||||
core.register_node("pbj_pup:pbj_pup", {
|
||||
description = "PB&J Pup",
|
||||
tiles = {
|
||||
"pbj_pup_sides.png", "pbj_pup_jelly.png", "pbj_pup_sides.png",
|
||||
"pbj_pup_sides.png", "pbj_pup_back.png", "pbj_pup_front.png"
|
||||
},
|
||||
paramtype = "light",
|
||||
light_source = 15,
|
||||
paramtype2 = "facedir",
|
||||
groups = {cracky = 2, handy = 1},
|
||||
is_ground_content = false,
|
||||
sounds = snd,
|
||||
_mcl_hardness = 1,
|
||||
})
|
||||
|
||||
-- Nyan Cat node
|
||||
|
||||
core.register_node(":nyancat:nyancat", {
|
||||
description = "Nyan Cat",
|
||||
tiles = {
|
||||
"nyancat_side.png", "nyancat_side.png", "nyancat_side.png",
|
||||
"nyancat_side.png", "nyancat_back.png", "nyancat_front.png"
|
||||
},
|
||||
paramtype = "light",
|
||||
light_source = 15,
|
||||
paramtype2 = "facedir",
|
||||
groups = {cracky = 2, handy = 1},
|
||||
is_ground_content = false,
|
||||
sounds = snd,
|
||||
_mcl_hardness = 1,
|
||||
})
|
||||
|
||||
-- MooGNU node
|
||||
|
||||
core.register_node(":moognu:moognu", {
|
||||
description = "MooGNU",
|
||||
tiles = {
|
||||
"moognu_side.png", "moognu_side.png", "moognu_side.png",
|
||||
"moognu_side.png", "moognu_back.png", "moognu_front.png"
|
||||
"nyancat_side.png",
|
||||
"nyancat_side.png",
|
||||
"nyancat_side.png",
|
||||
"nyancat_side.png",
|
||||
"nyancat_back.png",
|
||||
"nyancat_front.png",
|
||||
},
|
||||
paramtype = "light",
|
||||
light_source = 15,
|
||||
|
@ -63,7 +32,7 @@ core.register_node(":nyancat:nyancat_rainbow", {
|
|||
tiles = {
|
||||
"nyancat_rainbow.png^[transformR90",
|
||||
"nyancat_rainbow.png^[transformR90",
|
||||
"nyancat_rainbow.png"
|
||||
"nyancat_rainbow.png",
|
||||
},
|
||||
paramtype = "light",
|
||||
light_source = 15,
|
||||
|
@ -76,37 +45,26 @@ core.register_node(":nyancat:nyancat_rainbow", {
|
|||
|
||||
-- Fuels
|
||||
|
||||
core.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "pbj_pup:pbj_pup",
|
||||
burntime = 10
|
||||
})
|
||||
|
||||
core.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "nyancat:nyancat",
|
||||
burntime = 10
|
||||
})
|
||||
|
||||
core.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "moognu:moognu",
|
||||
burntime = 10
|
||||
burntime = 10,
|
||||
})
|
||||
|
||||
core.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "nyancat:nyancat_rainbow",
|
||||
burntime = 10
|
||||
burntime = 10,
|
||||
})
|
||||
|
||||
-- helper function to place Nyan/Pup/Moo with rainbow tail
|
||||
|
||||
local types = {"pbj_pup:pbj_pup", "nyancat:nyancat", "moognu:moognu"}
|
||||
local types = { "nyancat:nyancat" }
|
||||
|
||||
local function place(pos, facedir, length)
|
||||
|
||||
if facedir > 3 then facedir = 0 end
|
||||
if facedir > 3 then
|
||||
facedir = 0
|
||||
end
|
||||
|
||||
local tailvec = core.facedir_to_dir(facedir)
|
||||
local p = { x = pos.x, y = pos.y, z = pos.z }
|
||||
|
@ -115,7 +73,6 @@ local function place(pos, facedir, length)
|
|||
core.swap_node(p, { name = types[num], param2 = facedir })
|
||||
|
||||
for i = 1, length do
|
||||
|
||||
p.x = p.x + tailvec.x
|
||||
p.z = p.z + tailvec.z
|
||||
|
||||
|
@ -125,22 +82,20 @@ end
|
|||
|
||||
-- Do we generate PB&J Pup and Nyan Cat's in world?
|
||||
|
||||
if core.settings:get_bool("pbj_pup_generate") ~= false then
|
||||
|
||||
local function generate(minp, maxp, seed)
|
||||
|
||||
local height_min = -31000
|
||||
local height_max = -32
|
||||
local chance = 1000
|
||||
|
||||
if maxp.y < height_min or minp.y > height_max then return end
|
||||
if maxp.y < height_min or minp.y > height_max then
|
||||
return
|
||||
end
|
||||
|
||||
local y_min = math.max(minp.y, height_min)
|
||||
local y_max = math.min(maxp.y, height_max)
|
||||
local pr = PseudoRandom(seed + 9324342)
|
||||
|
||||
if pr:next(0, chance) == 0 then
|
||||
|
||||
local x0 = pr:next(minp.x, maxp.x)
|
||||
local y0 = pr:next(minp.y, maxp.y)
|
||||
local z0 = pr:next(minp.z, maxp.z)
|
||||
|
@ -152,15 +107,17 @@ if core.settings:get_bool("pbj_pup_generate") ~= false then
|
|||
|
||||
core.register_on_generated(generate)
|
||||
|
||||
if def then default.generate_nyancats = generate end --Legacy
|
||||
end
|
||||
if def then
|
||||
default.generate_nyancats = generate
|
||||
end --Legacy
|
||||
|
||||
-- Legacy
|
||||
|
||||
core.register_alias("default:nyancat", "nyancat:nyancat")
|
||||
core.register_alias("default:nyancat_rainbow", "nyancat:nyancat_rainbow")
|
||||
core.register_alias("pbj_pup:pbj_pup_candies", "nyancat:nyancat_rainbow")
|
||||
|
||||
if def then default.make_nyancat = place end
|
||||
if def then
|
||||
default.make_nyancat = place
|
||||
end
|
||||
|
||||
print("[MOD] PB&J Pup loaded")
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
# If enabled generates PB&J Pup and Nyan Cats in world
|
||||
pbj_pup_generate (Generate PB&J Pup) bool false
|
||||
pbj_pup_generate (Generate PB&J Pup) bool true
|
||||
|
|