From e063705c9b8c79a3055f91baa6e0a0cc93211feb Mon Sep 17 00:00:00 2001 From: alek13 Date: Wed, 8 Jan 2025 20:46:50 +0300 Subject: [PATCH] Mount Gen: finally restruct files. Closes #1906 --- mods/lord/World/mountgen/src/mountgen.lua | 6 +++--- mods/lord/World/mountgen/src/{ => mountgen}/Generator.lua | 4 ++-- .../World/mountgen/src/{ => mountgen}/algorithms/cone.lua | 2 +- .../src/{ => mountgen}/algorithms/diamond_square.lua | 2 +- .../src/{ => mountgen}/generator/ChunksIterator.lua | 0 .../mountgen/src/{ => mountgen}/generator/HeightMap.lua | 0 .../World/mountgen/src/{ => mountgen}/generator/Node.lua | 0 mods/lord/World/mountgen/src/{ => mountgen}/ui.lua | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) rename mods/lord/World/mountgen/src/{ => mountgen}/Generator.lua (95%) rename mods/lord/World/mountgen/src/{ => mountgen}/algorithms/cone.lua (96%) rename mods/lord/World/mountgen/src/{ => mountgen}/algorithms/diamond_square.lua (98%) rename mods/lord/World/mountgen/src/{ => mountgen}/generator/ChunksIterator.lua (100%) rename mods/lord/World/mountgen/src/{ => mountgen}/generator/HeightMap.lua (100%) rename mods/lord/World/mountgen/src/{ => mountgen}/generator/Node.lua (100%) rename mods/lord/World/mountgen/src/{ => mountgen}/ui.lua (99%) diff --git a/mods/lord/World/mountgen/src/mountgen.lua b/mods/lord/World/mountgen/src/mountgen.lua index c7430afd8..72db73dae 100644 --- a/mods/lord/World/mountgen/src/mountgen.lua +++ b/mods/lord/World/mountgen/src/mountgen.lua @@ -1,9 +1,9 @@ mountgen = {} -require('algorithms.cone') -require('algorithms.diamond_square') -require('ui') +require('mountgen.algorithms.cone') +require('mountgen.algorithms.diamond_square') +require('mountgen.ui') diff --git a/mods/lord/World/mountgen/src/Generator.lua b/mods/lord/World/mountgen/src/mountgen/Generator.lua similarity index 95% rename from mods/lord/World/mountgen/src/Generator.lua rename to mods/lord/World/mountgen/src/mountgen/Generator.lua index fc84360ec..5e2927029 100644 --- a/mods/lord/World/mountgen/src/Generator.lua +++ b/mods/lord/World/mountgen/src/mountgen/Generator.lua @@ -1,8 +1,8 @@ local math_floor, math_ceil, math_tan, id = math.floor, math.ceil, math.tan, minetest.get_content_id -local ChunksIterator = require('generator.ChunksIterator') -local Node = require('generator.Node') +local ChunksIterator = require('mountgen.generator.ChunksIterator') +local Node = require('mountgen.generator.Node') local Logger = minetest.get_mod_logger() diff --git a/mods/lord/World/mountgen/src/algorithms/cone.lua b/mods/lord/World/mountgen/src/mountgen/algorithms/cone.lua similarity index 96% rename from mods/lord/World/mountgen/src/algorithms/cone.lua rename to mods/lord/World/mountgen/src/mountgen/algorithms/cone.lua index 87b935201..2c5e56c58 100644 --- a/mods/lord/World/mountgen/src/algorithms/cone.lua +++ b/mods/lord/World/mountgen/src/mountgen/algorithms/cone.lua @@ -1,7 +1,7 @@ local math_min, math_max, math_floor, math_ceil, math_sqrt, math_tan, math_rad = math.min, math.max, math.floor, math.ceil, math.sqrt, math.tan, math.rad -local HeightMap = require('generator.HeightMap') +local HeightMap = require('mountgen.generator.HeightMap') local MIN_CONE_FOOT_DIAMETER = 3 diff --git a/mods/lord/World/mountgen/src/algorithms/diamond_square.lua b/mods/lord/World/mountgen/src/mountgen/algorithms/diamond_square.lua similarity index 98% rename from mods/lord/World/mountgen/src/algorithms/diamond_square.lua rename to mods/lord/World/mountgen/src/mountgen/algorithms/diamond_square.lua index 521eedb46..0f0cc4c06 100644 --- a/mods/lord/World/mountgen/src/algorithms/diamond_square.lua +++ b/mods/lord/World/mountgen/src/mountgen/algorithms/diamond_square.lua @@ -1,7 +1,7 @@ local math_max, math_ceil, math_log, math_random = math.max, math.ceil, math.log, math.random -local HeightMap = require('generator.HeightMap') +local HeightMap = require('mountgen.generator.HeightMap') local smooth_filter = { diff --git a/mods/lord/World/mountgen/src/generator/ChunksIterator.lua b/mods/lord/World/mountgen/src/mountgen/generator/ChunksIterator.lua similarity index 100% rename from mods/lord/World/mountgen/src/generator/ChunksIterator.lua rename to mods/lord/World/mountgen/src/mountgen/generator/ChunksIterator.lua diff --git a/mods/lord/World/mountgen/src/generator/HeightMap.lua b/mods/lord/World/mountgen/src/mountgen/generator/HeightMap.lua similarity index 100% rename from mods/lord/World/mountgen/src/generator/HeightMap.lua rename to mods/lord/World/mountgen/src/mountgen/generator/HeightMap.lua diff --git a/mods/lord/World/mountgen/src/generator/Node.lua b/mods/lord/World/mountgen/src/mountgen/generator/Node.lua similarity index 100% rename from mods/lord/World/mountgen/src/generator/Node.lua rename to mods/lord/World/mountgen/src/mountgen/generator/Node.lua diff --git a/mods/lord/World/mountgen/src/ui.lua b/mods/lord/World/mountgen/src/mountgen/ui.lua similarity index 99% rename from mods/lord/World/mountgen/src/ui.lua rename to mods/lord/World/mountgen/src/mountgen/ui.lua index 5acb9c8c8..c4c42b04f 100644 --- a/mods/lord/World/mountgen/src/ui.lua +++ b/mods/lord/World/mountgen/src/mountgen/ui.lua @@ -1,4 +1,4 @@ -local Generator = require('Generator') +local Generator = require('mountgen.Generator') local S = minetest.get_mod_translator()