es/biome_aftermath_node.lua

358 lines
9.3 KiB
Lua

--Extreme Survival created by maikerumine
-- Minetest 0.4.13 mod: "Extreme Survival"
-- namespace: es
--version 1.8
--https://github.com/maikerumine
--NODE TWEAKINGS
minetest.override_item("default:dirt_with_grass", {
description = "Dirt with Grass",
tiles = {"default_dry_grass.png", "default_dirt.png",
{name = "default_dirt.png^default_dry_grass_side.png",
tileable_vertical = false}},
groups = {crumbly = 3, soil = 1},
drop = 'default:dirt',
sounds = default.node_sound_dirt_defaults({
footstep = {name = "default_grass_footstep", gain = 0.25},
}),
})
minetest.override_item("default:leaves", {
description = "Leaves",
drawtype = "allfaces_optional",
waving = 1,
visual_scale = 1.3,
tiles = {"a-leavedead.png"},
special_tiles = {"a-leavedead.png"},
paramtype = "light",
is_ground_content = false,
groups = {snappy = 3, leafdecay = 3, flammable = 2, leaves = 1},
drop = {
max_items = 1,
items = {
{
-- player will get sapling with 1/20 chance
items = {'default:sapling'},
rarity = 20,
},
{
-- player will get leaves only if he get no saplings,
-- this is because max_items is 1
items = {'default:stick'},
}
}
},
sounds = default.node_sound_leaves_defaults(),
after_place_node = default.after_place_leaves,
})
minetest.override_item("default:jungleleaves", {
description = "Jungle Leaves",
drawtype = "allfaces_optional",
waving = 1,
visual_scale = 1.3,
tiles = {"a-leavedead.png"},
special_tiles = {"a-leavedead.png"},
paramtype = "light",
is_ground_content = false,
groups = {snappy = 3, leafdecay = 3, flammable = 2, leaves = 1},
drop = {
max_items = 1,
items = {
{items = {'default:junglesapling'}, rarity = 20},
{items = {'default:stick'}}
}
},
sounds = default.node_sound_leaves_defaults(),
after_place_node = default.after_place_leaves,
})
minetest.override_item("default:pine_needles",{
description = "Pine Needles",
drawtype = "allfaces_optional",
visual_scale = 1.3,
tiles = {"default_pine_needles.png^[colorize:white:80"},
waving = 1,
paramtype = "light",
is_ground_content = false,
groups = {snappy = 3, leafdecay = 3, flammable = 2, leaves = 1},
drop = {
max_items = 1,
items = {
{items = {"default:pine_sapling"}, rarity = 20},
{items = {"default:stick"}}
}
},
sounds = default.node_sound_leaves_defaults(),
after_place_node = default.after_place_leaves,
})
minetest.override_item("default:acacia_leaves", {
description = "Acacia Leaves",
drawtype = "allfaces_optional",
visual_scale = 1.3,
tiles = {"default_acacia_leaves.png^[colorize:brown:120"},
waving = 1,
paramtype = "light",
is_ground_content = false,
groups = {snappy = 3, leafdecay = 3, flammable = 2, leaves = 1},
drop = {
max_items = 1,
items = {
{items = {"default:acacia_sapling"}, rarity = 20},
{items = {"default:stick"}}
}
},
sounds = default.node_sound_leaves_defaults(),
after_place_node = default.after_place_leaves,
})
minetest.override_item("default:aspen_leaves", {
description = "Aspen Leaves",
drawtype = "allfaces_optional",
visual_scale = 1.3,
tiles = {"default_aspen_leaves.png^[colorize:brown:80"},
waving = 1,
paramtype = "light",
is_ground_content = false,
groups = {snappy = 3, leafdecay = 3, flammable = 2, leaves = 1},
drop = {
max_items = 1,
items = {
{items = {"default:aspen_sapling"}, rarity = 20},
{items = {"default:stick"}}
}
},
sounds = default.node_sound_leaves_defaults(),
after_place_node = default.after_place_leaves,
})
--
-- Plantlife (non-cubic)
--
minetest.override_item("default:cactus", {
description = "Cactus",
tiles = {"default_cactus_top.png^[colorize:brown:80", "default_cactus_top.png^[colorize:brown:80",
"default_cactus_side.png^[colorize:brown:80"},
paramtype2 = "facedir",
groups = {snappy = 1, choppy = 3},
sounds = default.node_sound_wood_defaults(),
on_place = minetest.rotate_node,
after_dig_node = function(pos, node, metadata, digger)
default.dig_up(pos, node, digger)
end,
})
minetest.override_item("default:papyrus", {
description = "Papyrus",
drawtype = "plantlike",
tiles = {"default_papyrus.png^[colorize:brown:120"},
inventory_image = "default_papyrus.png^[colorize:brown:120",
wield_image = "default_papyrus.png^[colorize:brown:120",
paramtype = "light",
sunlight_propagates = true,
walkable = false,
selection_box = {
type = "fixed",
fixed = {-0.3, -0.5, -0.3, 0.3, 0.5, 0.3}
},
groups = {snappy = 3, flammable = 2},
sounds = default.node_sound_leaves_defaults(),
after_dig_node = function(pos, node, metadata, digger)
default.dig_up(pos, node, digger)
end,
})
minetest.override_item("default:junglegrass", {
description = "Jungle Grass",
drawtype = "plantlike",
waving = 1,
visual_scale = 1.3,
tiles = {"default_junglegrass.png^[colorize:brown:80"},
inventory_image = "default_junglegrass.png^[colorize:brown:80",
wield_image = "default_junglegrass.png^[colorize:brown:80",
paramtype = "light",
sunlight_propagates = true,
walkable = false,
buildable_to = true,
groups = {snappy = 3, flora = 1, attached_node = 1, grass = 1},
sounds = default.node_sound_leaves_defaults(),
selection_box = {
type = "fixed",
fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},
},
})
minetest.override_item("default:grass_1", {
description = "Grass",
drawtype = "plantlike",
waving = 1,
tiles = {"default_grass_1.png^[colorize:brown:80"},
-- Use texture of a taller grass stage in inventory
inventory_image = "default_grass_3.png^[colorize:brown:80",
wield_image = "default_grass_3.png^[colorize:brown:80",
paramtype = "light",
sunlight_propagates = true,
walkable = false,
buildable_to = true,
groups = {snappy = 3, flora = 1, attached_node = 1, grass = 1},
sounds = default.node_sound_leaves_defaults(),
selection_box = {
type = "fixed",
fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},
},
on_place = function(itemstack, placer, pointed_thing)
-- place a random grass node
local stack = ItemStack("default:grass_" .. math.random(1,5))
local ret = minetest.item_place(stack, placer, pointed_thing)
return ItemStack("default:grass_1 " ..
itemstack:get_count() - (1 - ret:get_count()))
end,
})
for i = 2, 5 do
minetest.override_item("default:grass_" .. i, {
description = "Grass",
drawtype = "plantlike",
waving = 1,
tiles = {"default_grass_" .. i .. ".png^[colorize:brown:80"},
inventory_image = "default_grass_" .. i .. ".png^[colorize:brown:80",
wield_image = "default_grass_" .. i .. ".png^[colorize:brown:80",
paramtype = "light",
sunlight_propagates = true,
walkable = false,
buildable_to = true,
drop = "default:grass_1",
groups = {snappy = 3, flora = 1, attached_node = 1,
not_in_creative_inventory = 1, grass = 1},
sounds = default.node_sound_leaves_defaults(),
selection_box = {
type = "fixed",
fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},
},
})
end
--
-- Liquids
--
minetest.override_item("default:water_source", {
inventory_image = minetest.inventorycube("es_toxic_water.png"),
drawtype = "liquid",
tiles = {
{
name = "es_toxic_water_source_animated.png",
animation = {
type = "vertical_frames",
aspect_w = 16,
aspect_h = 16,
length = 2.0,
},
},
},
special_tiles = {
-- New-style water source material (mostly unused)
{
name = "es_toxic_water_source_animated.png",
animation = {
type = "vertical_frames",
aspect_w = 16,
aspect_h = 16,
length = 2.0,
},
backface_culling = false,
},
},
--alpha = 240,
paramtype = "light",
walkable = false,
climbable = true,
pointable = false,
diggable = false,
buildable_to = true,
is_ground_content = false,
drop = "",
drowning = 1,
liquidtype = "source",
liquid_alternative_flowing = "default:water_flowing",
liquid_alternative_source = "default:water_source",
liquid_viscosity = 4,
post_effect_color = {a = 213, r = 30, g = 60, b = 90},
damage_per_second = 3*2,
groups = {water = 3, liquid = 3, puts_out_fire = 1, radioactive = 2},
sounds = default.node_sound_glass_defaults(),
})
minetest.override_item("default:water_flowing", {
description = "Toxic_Flowing Water",
inventory_image = minetest.inventorycube("es_toxic_water.png"),
drawtype = "flowingliquid",
tiles = {"es_toxic_water.png"},
special_tiles = {
{
name = "es_toxic_water_flowing_animated.png",
backface_culling = false,
animation = {
type = "vertical_frames",
aspect_w = 16,
aspect_h = 16,
length = 0.8,
},
},
{
name = "es_toxic_water_flowing_animated.png",
backface_culling = true,
animation = {
type = "vertical_frames",
aspect_w = 16,
aspect_h = 16,
length = 0.8,
},
},
},
--alpha = 240,
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 = "default:water_flowing",
liquid_alternative_source = "default:water_source",
liquid_viscosity = 3,
post_effect_color = {a = 203, r = 30, g = 60, b = 90},
damage_per_second = 3*2,
groups = {water = 3, liquid = 3, puts_out_fire = 1, radioactive = 2, not_in_creative_inventory = 1},
sounds = default.node_sound_glass_defaults(),
})
minetest.override_item("default:ice", {
description = "Ice",
tiles = {"default_ice.png^es_toxic_water.png"},
is_ground_content = false,
paramtype = "light",
groups = {cracky = 3, puts_out_fire = 1, cools_lava = 1, slippery = 3},
sounds = default.node_sound_glass_defaults(),
})