Voxelis/mods/CORE/vox_main/init.lua

121 lines
No EOL
3.7 KiB
Lua

---------------------------------------------------------------------------
-- Voxelis - Voxel survival sandbox for Luanti
-- Copyright (C) 2024 Mad Star Studio LLC
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 3 of the License, or
-- (at your option) any later version.
--
-- You should have received a copy of the GNU General Public License along
-- with this program; if not, see <http://www.gnu.org/licenses/>.
---------------------------------------------------------------------------
-- This file is intended as the primary entry point for the game.
-- Grass Block
core.register_node("vox_main:grass", {
description = "Grass Block",
tiles = {"vox_grass.png"},
groups = {cracky = 3}
})
core.register_alias("grass", "vox_main:grass")
core.register_alias("default:dirt_with_grass" , "vox_main:grass")
core.register_biome({
name = "grassland",
node_top = "grass",
depth_top = 1,
node_filler = "vox_main:dirt",
node_stone = "vox_main:stone",
depth_filler = 3,
node_riverbed = "vox_main:sand",
node_river_water = "vox_main:water_source",
depth_riverbed = 2,
height_min = 1,
height_max = 256,
heat_point = 35,
humidity_point = 50
})
-- Stone
core.register_node("vox_main:stone", {
description = "Stone",
tiles = {"vox_stone.png"},
groups = {cracky = 2}
})
core.register_alias("stone", "vox_main:stone")
core.register_alias("mapgen_stone", "vox_main:stone")
-- core.register_alias("default:stone", "vox_main:stone")
-- Sand
-- (I don't like sand. It's coarse and rough and irritating and it gets everywhere.)
core.register_node("vox_main:sand", {
description = "Sand",
tiles = {"vox_sand.png"},
groups = {crumbly = 3}
})
core.register_alias("sand", "vox_main:sand")
core.register_alias("default:sand", "vox_main:sand")
-- Water
core.register_node("vox_main:water_source", {
description = "Water Source",
drawtype = "liquid",
tiles = {
{
name = "vox_water.png",
animation = {
type = "vertical_frames",
aspect_w = 16,
aspect_h = 16,
length = 2.0
}
}
},
alpha = 128,
paramtype = "light",
walkable = false,
pointable = false,
diggable = false,
buildable_to = true,
liquidtype = "source",
liquid_alternative_flowing = "vox_main:water_flowing",
liquid_alternative_source = "vox_main:water_source",
liquid_viscosity = 1,
post_effect_color = {a = 103, r = 30, g = 60, b = 90}
})
core.register_alias("water_source", "vox_main:water_source")
core.register_alias("default:river_water", "vox_main:water_source")
core.register_alias("mapgen_water_source", "vox_main:water_source")
core.register_node("vox_main:water_flowing", {
description = "Flowing Water",
drawtype = "flowingliquid",
tiles = {"vox_water.png"},
special_tiles = {
{
name = "vox_water.png",
backface_culling = false,
animation = {
type = "vertical_frames",
aspect_w = 16,
aspect_h = 16,
length = 0.8
}
}
},
alpha = 160,
paramtype = "light",
walkable = false,
pointable = false,
diggable = false,
buildable_to = true,
liquidtype = "flowing",
liquid_alternative_flowing = "vox_main:water_flowing",
liquid_alternative_source = "vox_main:water_source",
liquid_viscosity = 1,
post_effect_color = {a = 103, r = 30, g = 60, b = 90}
})
core.register_alias("water_flowing", "vox_main:water_flowing")