adsurv/mods/main/nodes.lua

333 lines
7.5 KiB
Lua

minetest.register_node("main:stone", {
description = "Stone",
tiles = {"main_stone.png"},
groups = {cracky = 3, stone = 1},
drop = 'main:cobble',
legacy_mineral = true,
})
minetest.register_node("main:cobble", {
description = "Cobble",
tiles = {"main_cobble.png"},
groups = {cracky = 2, stone = 1},
drop = 'main:cobble',
legacy_mineral = true,
})
minetest.register_node("main:dirt", {
description = "Dirt",
tiles = {"main_dirt.png"},
groups = {crumbly = 3, soil = 1},
})
minetest.register_node("main:snow", {
description = "Snow",
tiles = {"main_snow.png"},
groups = {crumbly = 3},
})
minetest.register_node("main:dirt_with_grass", {
description = "Dirt with Grass",
tiles = {"main_grass.png", "main_dirt.png",
{name = "main_dirt.png^main_grass_side.png",
tileable_vertical = false}},
groups = {crumbly = 3, soil = 1, spreading_dirt_type = 1},
drop = 'main:dirt',
})
minetest.register_node("main:dirt_with_swamp_grass", {
description = "Dirt with Swamp Grass",
tiles = {"main_swamp_grass.png", "main_dirt.png",
{name = "main_dirt.png^main_swamp_grass_side.png",
tileable_vertical = false}},
groups = {crumbly = 3, soil = 1, spreading_dirt_type = 1},
drop = 'main:dirt',
})
minetest.register_node("main:sand", {
description = "Sand",
tiles = {"main_sand.png"},
groups = {crumbly = 3, falling_node = 1, sand = 1},
})
--Player made nodes
minetest.register_node("main:torch", {
description = "Torch",
tiles = {"main_sand.png"},
light_source = 14,
groups = {choppy = 3, oddly_breakable_by_hand = 3},
})
--Ores
minetest.register_node("main:coal_ore", {
description = "Coal Ore",
tiles = {"main_stone.png^main_coal_ore.png"},
groups = {cracky = 1},
})
minetest.register_node("main:iron_ore", {
description = "Iron Ore",
tiles = {"main_stone.png^main_iron_ore.png"},
groups = {cracky = 3},
})
minetest.register_node("main:sulfur_ore", {
description = "Sulfur Ore",
tiles = {"main_stone.png^main_sulfur_ore.png"},
groups = {cracky = 2},
})
minetest.register_node("main:salt_ore", {
description = "Salt Ore",
tiles = {"main_stone.png^main_salt_ore.png"},
groups = {cracky = 3},
drop = 'main:salt_crystals',
})
minetest.register_node("main:cinnabar_ore", {
description = "Cinnabar",
tiles = {"main_stone.png^main_cinnabar_ore.png"},
groups = {cracky = 3},
})
--Diamond Ores
minetest.register_node("main:diamond_ore_lowdens", {
description = "Low Density Diamond ore",
tiles = {"main_stone.png^main_diamond_ore_lowdensity.png"},
groups = {cracky = 3},
})
minetest.register_node("main:diamond_ore_hidens", {
description = "High Density Diamond Ore",
tiles = {"main_stone.png^main_diamond_ore.png"},
groups = {cracky = 3},
})
--
-- Plants and Other Living Organisms
--
--Red Apple
minetest.register_node("main:apple_red", {
description = "Red Apple",
tiles = {"main_apple_red.png"},
groups = {fleshy = 3, oddly_breakable_by_hand = 3},
on_use = minetest.item_eat(4),
})
--Oak Log
minetest.register_node("main:log_oak", {
description = "Oak Log",
tiles = {"main_log_oak.png"},
groups = {choppy = 2},
})
--Oak Leaves
minetest.register_node("main:leaves_oak", {
drawtype = "allfaces",
description = "Oak Leaves",
tiles = {"main_leaves_oak.png"},
groups = {snappy = 3},
})
--Apple Tree Log
minetest.register_node("main:log_apple", {
description = "Apple Tree Log",
tiles = {"main_log_apple.png"},
groups = {choppy = 3},
})
--Apple Tree Leaves
minetest.register_node("main:leaves_apple", {
drawtype = "allfaces",
description = "Apple Tree Leaves",
tiles = {"main_leaves_apple.png"},
groups = {snappy = 3},
})
--
-- Liquids
--
--Regular water
minetest.register_node("main:water_source", {
description = "Water Source",
drawtype = "liquid",
paramtype = "light",
tiles = {
{
name = "main_water_source_animated.png",
animation = {
type = "vertical_frames",
aspect_w = 16,
aspect_h = 16,
length = 2.0,
},
},
},
alpha = 180,
post_effect_color = {a = 50, r = 0, g = 50, b = 200},
--Behavior
walkable = false,
pointable = false,
buildable_to = true,
diggable = false,
is_ground_content = false,
--Properties
liquid_range = 10,
liquid_viscosity = 0.1,
drowning = 1,
liquidtype = "source",
liquid_alternative_flowing = "main:water_flowing",
liquid_alternative_source = "main:water_source",
groups = {liquid = 3, water = 1},
})
minetest.register_node("main:water_flowing", {
description = "Flowing Water",
drawtype = "flowingliquid",
paramtype = "light",
tiles = {
{
name = "main_water_flowing_animated.png",
animation = {
type = "vertical_frames",
aspect_w = 16,
aspect_h = 16,
length = 2.0,
},
},
},
special_tiles = {
{
name = "main_water_flowing_animated.png",
animation = {type = "vertical_frames", aspect_w = 16,
aspect_h = 16, length = 2.0},
backface_culling = true,
},
{
name = "main_water_flowing_animated.png",
animation = {type = "vertical_frames", aspect_w = 16,
aspect_h = 16, length = 2.0},
backface_culling = false,
}
},
alpha = 180,
post_effect_color = {a = 50, r = 0, g = 50, b = 200},
--Behavior
walkable = false,
pointable = false,
buildable_to = true,
diggable = false,
is_ground_content = false,
--Properties
liquid_range = 10,
liquid_viscosity = 0.1,
drowning = 1,
liquidtype = "flowing",
liquid_alternative_flowing = "main:water_flowing",
liquid_alternative_source = "main:water_source",
groups = {liquid = 3, water = 1},
})
--Toxic Water
minetest.register_node("main:toxicwater_source", {
description = "Toxic Water Source",
drawtype = "liquid",
paramtype = "light",
tiles = {
{
name = "main_toxicwater_animated.png",
animation = {
type = "vertical_frames",
aspect_w = 16,
aspect_h = 16,
length = 2.0,
},
},
},
alpha = 180,
post_effect_color = {a = 50, r = 0, g = 200, b = 50},
--Behavior
walkable = false,
pointable = false,
buildable_to = true,
diggable = false,
is_ground_content = false,
--Properties
liquid_range = 10,
liquid_viscosity = 0.1,
drowning = 1,
liquidtype = "source",
liquid_alternative_flowing = "main:toxicwater_flowing",
liquid_alternative_source = "main:toxicwater_source",
damage_per_second = 4 * 2,
groups = {liquid = 3, water = 1},
})
minetest.register_node("main:toxicwater_flowing", {
description = "Flowing Toxic Water",
drawtype = "flowingliquid",
paramtype = "light",
tiles = {
{
name = "main_toxicwater_animated.png",
animation = {
type = "vertical_frames",
aspect_w = 16,
aspect_h = 16,
length = 2.0,
},
},
},
special_tiles = {
{
name = "main_toxicwater_animated.png",
animation = {type = "vertical_frames", aspect_w = 16,
aspect_h = 16, length = 2.0},
backface_culling = true,
},
{
name = "main_toxicwater_animated.png",
animation = {type = "vertical_frames", aspect_w = 16,
aspect_h = 16, length = 2.0},
backface_culling = false,
}
},
alpha = 180,
post_effect_color = {a = 50, r = 0, g = 200, b = 50},
--Behavior
walkable = false,
pointable = false,
buildable_to = true,
diggable = false,
is_ground_content = false,
--Properties
liquid_range = 10,
liquid_viscosity = 0.1,
drowning = 1,
liquidtype = "flowing",
liquid_alternative_flowing = "main:toxicwater_flowing",
liquid_alternative_source = "main:toxicwater_source",
damage_per_second = 4 * 2,
groups = {liquid = 3, water = 1},
})