Compare commits

...

5 Commits

Author SHA1 Message Date
Milan deacbf14c8 add poison to bucket 2020-07-17 22:40:52 +02:00
Milan bc28471d26 use regular syntax for water_poison for compatibility 2019-03-06 21:56:20 +01:00
Milan* a9ed16717c adjust height setting for baseline 2017-09-15 23:49:14 +02:00
Duane Robertson f19412556e Fix get_decoration handling of tables. 2017-09-14 23:05:03 -05:00
Duane Robertson 51c624f507 Check for biome string in decorations. 2017-09-12 03:29:07 -05:00
4 changed files with 107 additions and 24 deletions

View File

@ -16,8 +16,12 @@ do
local deco = {}
if odeco.biomes then
deco.biomes = {}
for _, b in pairs(odeco.biomes) do
deco.biomes[b] = true
if type(odeco.biomes) == 'table' then
for _, b in pairs(odeco.biomes) do
deco.biomes[b] = true
end
elseif type(odeco.biomes) == 'string' then
deco.biomes[odeco.biomes] = true
end
end
@ -372,7 +376,11 @@ local function get_decoration(biome_name)
if not deco.biomes or deco.biomes[biome_name] then
if deco.deco_type == "simple" then
if deco.fill_ratio and math.random(1000) - 1 < deco.fill_ratio * 1000 then
return deco.decoration
if type(deco.decoration) == 'string' then
return deco.decoration
elseif type(deco.decoration) == 'table' then
return deco.decoration[math.random(#deco.decoration)]
end
end
end
end

View File

@ -25,7 +25,7 @@ end
loud_walking.DEBUG = false -- for maintenance only
loud_walking.max_height = 31000
loud_walking.baseline = 28000
loud_walking.baseline = 30000
loud_walking.extent_bottom = -400
loud_walking.extent_top = 400

115
nodes.lua
View File

@ -222,28 +222,103 @@ newnode.groups = {snappy = 3, flammable = 2}
minetest.register_node("loud_walking:leaves_black", newnode)
newnode = loud_walking.clone_node("default:water_source")
newnode.description = "Poisonous Water"
newnode.groups.poison = 3
--newnode.light_source = 6
newnode.liquid_alternative_flowing = "loud_walking:water_poison_flowing"
newnode.liquid_alternative_source = "loud_walking:water_poison_source"
newnode.post_effect_color = {a = 103, r = 108, g = 128, b = 64}
newnode.special_tiles[1].name = "loud_walking_water_poison_source_animated.png"
newnode.tiles[1].name = "loud_walking_water_poison_source_animated.png"
minetest.register_node("loud_walking:water_poison_source", newnode)
minetest.register_node("loud_walking:water_poison_source", {
description = "Poisonous Water",
drawtype = "liquid",
tiles = {
{
name = "loud_walking_water_poison_source_animated.png",
backface_culling = false,
animation = {
type = "vertical_frames",
aspect_w = 16,
aspect_h = 16,
length = 2.0,
},
},
{
name = "loud_walking_water_poison_source_animated.png",
backface_culling = true,
animation = {
type = "vertical_frames",
aspect_w = 16,
aspect_h = 16,
length = 2.0,
},
},
},
alpha = 160,
paramtype = "light",
walkable = false,
pointable = false,
diggable = false,
buildable_to = true,
is_ground_content = false,
drop = "",
drowning = 1,
liquidtype = "source",
liquid_alternative_flowing = "loud_walking:water_poison_flowing",
liquid_alternative_source = "loud_walking:water_poison_source",
liquid_viscosity = 1,
post_effect_color = {a = 103, r = 108, g = 128, b = 64},
groups = {water = 3, liquid = 3, cools_lava = 1, poison = 4},
sounds = default.node_sound_water_defaults(),
})
newnode = loud_walking.clone_node("default:water_flowing")
newnode.description = "Poisonous Water"
newnode.groups.poison = 3
--newnode.light_source = 6
newnode.liquid_alternative_flowing = "loud_walking:water_poison_flowing"
newnode.liquid_alternative_source = "loud_walking:water_poison_source"
newnode.post_effect_color = {a = 103, r = 108, g = 128, b = 64}
newnode.special_tiles[1].name = "loud_walking_water_poison_flowing_animated.png"
newnode.tiles[1] = "loud_walking_water_poison.png"
minetest.register_node("loud_walking:water_poison_flowing", newnode)
minetest.register_node("loud_walking:water_poison_flowing", {
description = "Poisonous Water",
drawtype = "flowingliquid",
tiles = {"loud_walking_water_poison.png"},
special_tiles = {
{
name = "loud_walking_water_poison_flowing_animated.png",
backface_culling = false,
animation = {
type = "vertical_frames",
aspect_w = 16,
aspect_h = 16,
length = 0.8,
},
},
{
name = "loud_walking_water_poison_flowing_animated.png",
backface_culling = true,
animation = {
type = "vertical_frames",
aspect_w = 16,
aspect_h = 16,
length = 0.8,
},
},
},
alpha = 160,
paramtype = "light",
paramtype2 = "flowingliquid",
walkable = false,
pointable = false,
diggable = false,
buildable_to = true,
is_ground_content = false,
drop = "",
drowning = 1,
liquidtype = "flowing",
liquid_alternative_flowing = "loud_walking:water_poison_flowing",
liquid_alternative_source = "loud_walking:water_poison_source",
liquid_viscosity = 1,
post_effect_color = {a = 103, r = 108, g = 128, b = 64},
groups = {water = 3, liquid = 3, not_in_creative_inventory = 1,
cools_lava = 1, poison = 3},
sounds = default.node_sound_water_defaults(),
})
bucket.register_liquid(
"loud_walking:water_poison_source",
"loud_walking:water_poison_flowing",
"loud_walking:bucket_poison",
"bucket_poison.png",
"Poison Bucket",
{}
)
minetest.register_node("loud_walking:basalt", {
description = "Basalt",

BIN
textures/bucket_poison.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB