From 797592a3b5b0858599015fa28ccc87e8b4aafc9b Mon Sep 17 00:00:00 2001 From: Seven Of Aces Date: Tue, 10 Dec 2024 20:24:11 -0800 Subject: [PATCH] moving around things --- .vscode/settings.json | 3 +- .../vox_misc_blocks}/init.lua | 8 +- mods/BLOCKS/vox_misc_blocks/mod.conf | 2 + mods/BLOCKS/vox_overworld/mod.conf | 2 - .../vox_overworld_blocks}/init.lua | 86 +++++++++--------- mods/BLOCKS/vox_overworld_blocks/mod.conf | 2 + .../textures/vox_grass.png | Bin .../textures/vox_sand.png | Bin 0 -> 119 bytes .../textures/vox_stone.png | Bin .../textures/vox_water.png | Bin mods/CORE/vox_explosions/mod.conf | 2 - mods/CORE/vox_init/init.lua | 2 +- mods/CORE/vox_init/mod.conf | 2 +- mods/CORE/vox_main/mod.conf | 2 - mods/MAPGEN/vox_biomes/mod.conf | 2 - .../{BLOCKS => MAPGEN}/vox_overworld/init.lua | 6 +- mods/MAPGEN/vox_overworld/mod.conf | 2 + .../init.lua => vox_overworld/registry.lua} | 16 +++- 18 files changed, 81 insertions(+), 56 deletions(-) rename mods/{CORE/vox_explosions => BLOCKS/vox_misc_blocks}/init.lua (56%) create mode 100644 mods/BLOCKS/vox_misc_blocks/mod.conf delete mode 100644 mods/BLOCKS/vox_overworld/mod.conf rename mods/{CORE/vox_main => BLOCKS/vox_overworld_blocks}/init.lua (50%) create mode 100644 mods/BLOCKS/vox_overworld_blocks/mod.conf rename mods/BLOCKS/{vox_overworld => vox_overworld_blocks}/textures/vox_grass.png (100%) create mode 100644 mods/BLOCKS/vox_overworld_blocks/textures/vox_sand.png rename mods/BLOCKS/{vox_overworld => vox_overworld_blocks}/textures/vox_stone.png (100%) rename mods/BLOCKS/{vox_overworld => vox_overworld_blocks}/textures/vox_water.png (100%) delete mode 100644 mods/CORE/vox_explosions/mod.conf delete mode 100644 mods/CORE/vox_main/mod.conf delete mode 100644 mods/MAPGEN/vox_biomes/mod.conf rename mods/{BLOCKS => MAPGEN}/vox_overworld/init.lua (87%) create mode 100644 mods/MAPGEN/vox_overworld/mod.conf rename mods/MAPGEN/{vox_biomes/init.lua => vox_overworld/registry.lua} (62%) diff --git a/.vscode/settings.json b/.vscode/settings.json index 592016b..3834fc3 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -7,6 +7,7 @@ "Voxelis" ], "Lua.diagnostics.globals": [ - "vox_colors" + "vox_colors", + "core" ] } \ No newline at end of file diff --git a/mods/CORE/vox_explosions/init.lua b/mods/BLOCKS/vox_misc_blocks/init.lua similarity index 56% rename from mods/CORE/vox_explosions/init.lua rename to mods/BLOCKS/vox_misc_blocks/init.lua index c08fa8c..f6a2d4d 100644 --- a/mods/CORE/vox_explosions/init.lua +++ b/mods/BLOCKS/vox_misc_blocks/init.lua @@ -11,4 +11,10 @@ -- with this program; if not, see . --------------------------------------------------------------------------- -vox_explosions = { } \ No newline at end of file +-- -------------------------------------------------------------------------- -- +-- Blocks -- +-- -------------------------------------------------------------------------- -- + +-- -------------------------------------------------------------------------- -- +-- Liquids -- +-- -------------------------------------------------------------------------- -- diff --git a/mods/BLOCKS/vox_misc_blocks/mod.conf b/mods/BLOCKS/vox_misc_blocks/mod.conf new file mode 100644 index 0000000..1d1fb3f --- /dev/null +++ b/mods/BLOCKS/vox_misc_blocks/mod.conf @@ -0,0 +1,2 @@ +name = vox_misc_blocks +description = Voxelis - misc_blocks: General blocks that don't fit in other categories \ No newline at end of file diff --git a/mods/BLOCKS/vox_overworld/mod.conf b/mods/BLOCKS/vox_overworld/mod.conf deleted file mode 100644 index 8b29529..0000000 --- a/mods/BLOCKS/vox_overworld/mod.conf +++ /dev/null @@ -1,2 +0,0 @@ -name = vox_overworld -description = Voxelis - overworld: General Overworld blocks \ No newline at end of file diff --git a/mods/CORE/vox_main/init.lua b/mods/BLOCKS/vox_overworld_blocks/init.lua similarity index 50% rename from mods/CORE/vox_main/init.lua rename to mods/BLOCKS/vox_overworld_blocks/init.lua index d074cd0..d31d5ab 100644 --- a/mods/CORE/vox_main/init.lua +++ b/mods/BLOCKS/vox_overworld_blocks/init.lua @@ -11,56 +11,53 @@ -- with this program; if not, see . --------------------------------------------------------------------------- --- This file is intended as the primary entry point for the game. +-- -------------------------------------------------------------------------- -- +-- Blocks -- +-- -------------------------------------------------------------------------- -- --- Grass Block -core.register_node("vox_main:grass", { +-- ----------------------------- Terrain Surface ---------------------------- -- + +-- Grass +core.register_node("vox_overworld_blocks: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_alias("grass", "vox_overworld_blocks:grass") +core.register_alias("default:dirt_with_grass" , "vox_overworld_blocks: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 +-- Dirt +core.register_node("vox_overworld_blocks:dirt", { + description = "Dirt", + tiles = {"vox_dirt.png"}, + groups = {crumbly = 3} }) - --- 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") +core.register_alias("dirt", "vox_overworld_blocks:dirt") -- Sand -- (I don't like sand. It's coarse and rough and irritating and it gets everywhere.) -core.register_node("vox_main:sand", { +core.register_node("vox_overworld_blocks: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") +core.register_alias("sand", "vox_overworld_blocks:sand") +core.register_alias("default:sand", "vox_overworld_blocks:sand") + +-- -------------------------------- Minerals -------------------------------- -- + +core.register_node("vox_overworld_blocks:stone", { + description = "Stone", + tiles = {"vox_stone.png"}, + groups = {cracky = 2} +}) +core.register_alias("stone", "vox_overworld_blocks:stone") +core.register_alias("mapgen_stone", "vox_overworld_blocks:stone") +-- core.register_alias("default:stone", "vox_overworld_blocks:stone") -- Water -core.register_node("vox_main:water_source", { +core.register_node("vox_overworld_blocks:water_source", { description = "Water Source", drawtype = "liquid", tiles = { @@ -81,16 +78,21 @@ core.register_node("vox_main:water_source", { diggable = false, buildable_to = true, liquidtype = "source", - liquid_alternative_flowing = "vox_main:water_flowing", - liquid_alternative_source = "vox_main:water_source", + liquid_alternative_flowing = "vox_overworld_blocks:water_flowing", + liquid_alternative_source = "vox_overworld_blocks: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_alias("water_source", "vox_overworld_blocks:water_source") +core.register_alias("default:river_water", "vox_overworld_blocks:water_source") +core.register_alias("mapgen_water_source", "vox_overworld_blocks:water_source") -core.register_node("vox_main:water_flowing", { + +-- -------------------------------------------------------------------------- -- +-- Liquids -- +-- -------------------------------------------------------------------------- -- + +core.register_node("vox_overworld_blocks:water_flowing", { description = "Flowing Water", drawtype = "flowingliquid", tiles = {"vox_water.png"}, @@ -113,9 +115,9 @@ core.register_node("vox_main:water_flowing", { diggable = false, buildable_to = true, liquidtype = "flowing", - liquid_alternative_flowing = "vox_main:water_flowing", - liquid_alternative_source = "vox_main:water_source", + liquid_alternative_flowing = "vox_overworld_blocks:water_flowing", + liquid_alternative_source = "vox_overworld_blocks: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") \ No newline at end of file +core.register_alias("water_flowing", "vox_overworld_blocks:water_flowing") \ No newline at end of file diff --git a/mods/BLOCKS/vox_overworld_blocks/mod.conf b/mods/BLOCKS/vox_overworld_blocks/mod.conf new file mode 100644 index 0000000..93ca1f8 --- /dev/null +++ b/mods/BLOCKS/vox_overworld_blocks/mod.conf @@ -0,0 +1,2 @@ +name = vox_overworld_blocks +description = Voxelis - overworld_blocks: General Overworld blocks \ No newline at end of file diff --git a/mods/BLOCKS/vox_overworld/textures/vox_grass.png b/mods/BLOCKS/vox_overworld_blocks/textures/vox_grass.png similarity index 100% rename from mods/BLOCKS/vox_overworld/textures/vox_grass.png rename to mods/BLOCKS/vox_overworld_blocks/textures/vox_grass.png diff --git a/mods/BLOCKS/vox_overworld_blocks/textures/vox_sand.png b/mods/BLOCKS/vox_overworld_blocks/textures/vox_sand.png new file mode 100644 index 0000000000000000000000000000000000000000..2e4f2cb14557b7c8b9927ffd5122ec498368957f GIT binary patch literal 119 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|3_V>OLo9le z|NK4q#-5qAp|!EG@!{vABAZM;zdE0ou;@q`8(Ui-vm393DFc^;=Gk)$A7VLEc~c(U Q1ZrmRboFyt=akR{0G9(LX8-^I literal 0 HcmV?d00001 diff --git a/mods/BLOCKS/vox_overworld/textures/vox_stone.png b/mods/BLOCKS/vox_overworld_blocks/textures/vox_stone.png similarity index 100% rename from mods/BLOCKS/vox_overworld/textures/vox_stone.png rename to mods/BLOCKS/vox_overworld_blocks/textures/vox_stone.png diff --git a/mods/BLOCKS/vox_overworld/textures/vox_water.png b/mods/BLOCKS/vox_overworld_blocks/textures/vox_water.png similarity index 100% rename from mods/BLOCKS/vox_overworld/textures/vox_water.png rename to mods/BLOCKS/vox_overworld_blocks/textures/vox_water.png diff --git a/mods/CORE/vox_explosions/mod.conf b/mods/CORE/vox_explosions/mod.conf deleted file mode 100644 index fa5e286..0000000 --- a/mods/CORE/vox_explosions/mod.conf +++ /dev/null @@ -1,2 +0,0 @@ -name = vox_explosions -description = Voxelis - explosions \ No newline at end of file diff --git a/mods/CORE/vox_init/init.lua b/mods/CORE/vox_init/init.lua index 797023f..49e95d0 100644 --- a/mods/CORE/vox_init/init.lua +++ b/mods/CORE/vox_init/init.lua @@ -11,4 +11,4 @@ -- with this program; if not, see . --------------------------------------------------------------------------- -vox_init = { } \ No newline at end of file +-- This file is intended as the primary entry point (init) for the game. \ No newline at end of file diff --git a/mods/CORE/vox_init/mod.conf b/mods/CORE/vox_init/mod.conf index 4c25471..47e7307 100644 --- a/mods/CORE/vox_init/mod.conf +++ b/mods/CORE/vox_init/mod.conf @@ -1,2 +1,2 @@ name = vox_init -description = Voxelis - init \ No newline at end of file +description = Voxelis - init: core mod \ No newline at end of file diff --git a/mods/CORE/vox_main/mod.conf b/mods/CORE/vox_main/mod.conf deleted file mode 100644 index 58e8b9f..0000000 --- a/mods/CORE/vox_main/mod.conf +++ /dev/null @@ -1,2 +0,0 @@ -name = vox_main -description = Voxelis - main: core mod \ No newline at end of file diff --git a/mods/MAPGEN/vox_biomes/mod.conf b/mods/MAPGEN/vox_biomes/mod.conf deleted file mode 100644 index f219090..0000000 --- a/mods/MAPGEN/vox_biomes/mod.conf +++ /dev/null @@ -1,2 +0,0 @@ -name = vox_biomes -description = Voxelis - biomes \ No newline at end of file diff --git a/mods/BLOCKS/vox_overworld/init.lua b/mods/MAPGEN/vox_overworld/init.lua similarity index 87% rename from mods/BLOCKS/vox_overworld/init.lua rename to mods/MAPGEN/vox_overworld/init.lua index da8e53c..87f6f50 100644 --- a/mods/BLOCKS/vox_overworld/init.lua +++ b/mods/MAPGEN/vox_overworld/init.lua @@ -11,4 +11,8 @@ -- with this program; if not, see . --------------------------------------------------------------------------- --- TODO: Why are we not initializing the blocks here? \ No newline at end of file +vox_overworld = {} + +dofile(core.get_modpath(core.get_current_modname()) .. "/registry.lua") + + diff --git a/mods/MAPGEN/vox_overworld/mod.conf b/mods/MAPGEN/vox_overworld/mod.conf new file mode 100644 index 0000000..c4e15c7 --- /dev/null +++ b/mods/MAPGEN/vox_overworld/mod.conf @@ -0,0 +1,2 @@ +name = vox_overworld +description = Voxelis - overworld \ No newline at end of file diff --git a/mods/MAPGEN/vox_biomes/init.lua b/mods/MAPGEN/vox_overworld/registry.lua similarity index 62% rename from mods/MAPGEN/vox_biomes/init.lua rename to mods/MAPGEN/vox_overworld/registry.lua index 7523b8c..0fab817 100644 --- a/mods/MAPGEN/vox_biomes/init.lua +++ b/mods/MAPGEN/vox_overworld/registry.lua @@ -11,4 +11,18 @@ -- with this program; if not, see . --------------------------------------------------------------------------- -vox_biomes = { } \ No newline at end of file +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 +}) -- 2.45.3