bruh commit
This commit is contained in:
@@ -1 +1,2 @@
|
|||||||
name = smc__core__player
|
name = smc__core__player
|
||||||
|
depends = smc__api__api_loader
|
||||||
|
|||||||
@@ -1 +1,2 @@
|
|||||||
name = smc__core__sound
|
name = smc__core__sound
|
||||||
|
depends = smc__api__api_loader
|
||||||
@@ -1,7 +1,18 @@
|
|||||||
-- World generation runs in the mapgen environment (separate thread)
|
-- World generation occurs in a separate thread (MapGen Environment).
|
||||||
-- The Mapgen environment is isolated from the main enviroment.
|
-- But for the main thread, the mapgenerator object is also initialized.
|
||||||
|
|
||||||
core.register_mapgen_script(core.get_modpath(core.get_current_modname())..'/MapGenerator.lua')
|
local mapGeneneratorRequire = Mod.getInfo('smc__core__map_generator').require
|
||||||
|
|
||||||
|
-- Main env init
|
||||||
|
local mapGenerator = mapGeneneratorRequire('mapGenerator')
|
||||||
|
|
||||||
|
-- Async env init
|
||||||
|
core.register_mapgen_script(core.get_modpath('smc__core__map_generator')..'/src/asyncInit.lua')
|
||||||
|
|
||||||
|
|
||||||
|
-- --- Register vanilla ores & decorations ---
|
||||||
|
-- For now, the generation does not have its own support
|
||||||
|
-- for the generation of ores and decorations, so vanilla ones are used.
|
||||||
|
|
||||||
core.register_ore({
|
core.register_ore({
|
||||||
ore_type = "scatter",
|
ore_type = "scatter",
|
||||||
@@ -20,4 +31,6 @@ core.register_decoration({
|
|||||||
sidelen = 8,
|
sidelen = 8,
|
||||||
fill_ratio = 0.1,
|
fill_ratio = 0.1,
|
||||||
decoration = "plants:plants",
|
decoration = "plants:plants",
|
||||||
})
|
})
|
||||||
|
|
||||||
|
return mapGenerator
|
||||||
43
mods/ENVIRONMENT/MapGenerator/src/asyncInit.lua
Normal file
43
mods/ENVIRONMENT/MapGenerator/src/asyncInit.lua
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
-- MAPGEN ENVIROMENT ONLY
|
||||||
|
-- https://api.luanti.org/core-namespace-reference/#mapgen-environment
|
||||||
|
|
||||||
|
-- This environment is isolated from the main environment,
|
||||||
|
-- so global tables need to be preloaded manually.
|
||||||
|
|
||||||
|
-- --- Global APIs load --
|
||||||
|
-- Api loader
|
||||||
|
dofile(core.get_modpath('smc__api__api_loader')..'/init.lua')
|
||||||
|
|
||||||
|
-- Class
|
||||||
|
dofile(core.get_modpath('smc__api__class')..'/init.lua')
|
||||||
|
|
||||||
|
-- Ensure
|
||||||
|
dofile(core.get_modpath('smc__api__ensure')..'/init.lua')
|
||||||
|
|
||||||
|
-- Logger
|
||||||
|
dofile(core.get_modpath('smc__api__logger')..'/init.lua')
|
||||||
|
|
||||||
|
-- Math
|
||||||
|
dofile(core.get_modpath('smc__api__math')..'/init.lua')
|
||||||
|
|
||||||
|
-- Require
|
||||||
|
dofile(core.get_modpath('smc__api__require')..'/init.lua')
|
||||||
|
|
||||||
|
-- Mod
|
||||||
|
dofile(core.get_modpath('smc__api__mod')..'/init.lua')
|
||||||
|
|
||||||
|
-- TODO: исправить загрузку строковых библиотек (хотя они пока что не юзаются в мапгене)
|
||||||
|
-- Они не работают из-за get_current_modname внутри utf8
|
||||||
|
-- UTF-8
|
||||||
|
-- dofile(core.get_modpath('smc__api__utf8')..'/init.lua')
|
||||||
|
|
||||||
|
-- String
|
||||||
|
-- dofile(core.get_modpath('smc__api__string')..'/init.lua')
|
||||||
|
|
||||||
|
-- Table
|
||||||
|
dofile(core.get_modpath('smc__api__table')..'/init.lua')
|
||||||
|
|
||||||
|
---@type MapGen
|
||||||
|
local mapGenerator = dofile(core.get_modpath('smc__core__map_generator')..'/src/mapGenerator.lua')
|
||||||
|
|
||||||
|
mapGenerator:run()
|
||||||
@@ -1,44 +1,3 @@
|
|||||||
-- MAPGEN ENVIROMENT ONLY
|
|
||||||
-- https://api.luanti.org/core-namespace-reference/#mapgen-environment
|
|
||||||
|
|
||||||
-- This environment is isolated from the main environment,
|
|
||||||
-- so global tables need to be preloaded manually.
|
|
||||||
|
|
||||||
-- --- Global APIs load --
|
|
||||||
-- Api loader
|
|
||||||
dofile(core.get_modpath('smc__api__api_loader')..'/init.lua')
|
|
||||||
|
|
||||||
-- Class
|
|
||||||
dofile(core.get_modpath('smc__api__class')..'/init.lua')
|
|
||||||
|
|
||||||
-- Ensure
|
|
||||||
dofile(core.get_modpath('smc__api__ensure')..'/init.lua')
|
|
||||||
|
|
||||||
-- Logger
|
|
||||||
dofile(core.get_modpath('smc__api__logger')..'/init.lua')
|
|
||||||
|
|
||||||
-- Math
|
|
||||||
dofile(core.get_modpath('smc__api__math')..'/init.lua')
|
|
||||||
|
|
||||||
-- Require
|
|
||||||
dofile(core.get_modpath('smc__api__require')..'/init.lua')
|
|
||||||
|
|
||||||
-- Mod
|
|
||||||
dofile(core.get_modpath('smc__api__mod')..'/init.lua')
|
|
||||||
|
|
||||||
-- TODO: исправить загрузку строковых библиотек (хотя они пока что не юзаются в мапгене)
|
|
||||||
-- Они не работают из-за get_current_modname внутри utf8
|
|
||||||
-- UTF-8
|
|
||||||
-- dofile(core.get_modpath('smc__api__utf8')..'/init.lua')
|
|
||||||
|
|
||||||
-- String
|
|
||||||
-- dofile(core.get_modpath('smc__api__string')..'/init.lua')
|
|
||||||
|
|
||||||
-- Table
|
|
||||||
dofile(core.get_modpath('smc__api__table')..'/init.lua')
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
-- --- MapGen definiton ---
|
-- --- MapGen definiton ---
|
||||||
local id = core.get_content_id
|
local id = core.get_content_id
|
||||||
|
|
||||||
@@ -271,4 +230,4 @@ mapGenerator:registerBiome('world', "biome2", {
|
|||||||
--generateSoil = generateSoil,
|
--generateSoil = generateSoil,
|
||||||
})
|
})
|
||||||
|
|
||||||
mapGenerator:run()
|
return mapGenerator
|
||||||
@@ -68,7 +68,7 @@ logFactory:registerItems({
|
|||||||
tiles = t(2, 1),
|
tiles = t(2, 1),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
---@type Node.NodeDefinition
|
---@type Node.NodeDefinition
|
||||||
{
|
{
|
||||||
settings = {
|
settings = {
|
||||||
name = "fis_log",
|
name = "fis_log",
|
||||||
@@ -77,6 +77,33 @@ logFactory:registerItems({
|
|||||||
tiles = t(4, 1),
|
tiles = t(4, 1),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
---@type Node.NodeDefinition
|
||||||
|
{
|
||||||
|
settings = {
|
||||||
|
name = "tammoy_log",
|
||||||
|
title = "Tammoy Log",
|
||||||
|
--description = "",
|
||||||
|
tiles = t(6, 1),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
---@type Node.NodeDefinition
|
||||||
|
{
|
||||||
|
settings = {
|
||||||
|
name = "dallalia_log",
|
||||||
|
title = "Dallalia Log",
|
||||||
|
--description = "",
|
||||||
|
tiles = t(8, 1),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
---@type Node.NodeDefinition
|
||||||
|
{
|
||||||
|
settings = {
|
||||||
|
name = "zuph_log",
|
||||||
|
title = "Zuph Log",
|
||||||
|
--description = "",
|
||||||
|
tiles = t(10, 1),
|
||||||
|
},
|
||||||
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
planksFactory:registerItems({
|
planksFactory:registerItems({
|
||||||
@@ -89,7 +116,7 @@ planksFactory:registerItems({
|
|||||||
tiles = { logTileSheet:t(0, 4) },
|
tiles = { logTileSheet:t(0, 4) },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
---@type Node.NodeDefinition
|
---@type Node.NodeDefinition
|
||||||
{
|
{
|
||||||
settings = {
|
settings = {
|
||||||
name = "allwhere_planks",
|
name = "allwhere_planks",
|
||||||
@@ -98,7 +125,7 @@ planksFactory:registerItems({
|
|||||||
tiles = { logTileSheet:t(2, 4) },
|
tiles = { logTileSheet:t(2, 4) },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
---@type Node.NodeDefinition
|
---@type Node.NodeDefinition
|
||||||
{
|
{
|
||||||
settings = {
|
settings = {
|
||||||
name = "fis_planks",
|
name = "fis_planks",
|
||||||
@@ -107,4 +134,31 @@ planksFactory:registerItems({
|
|||||||
tiles = { logTileSheet:t(4, 4) },
|
tiles = { logTileSheet:t(4, 4) },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
---@type Node.NodeDefinition
|
||||||
|
{
|
||||||
|
settings = {
|
||||||
|
name = "tammoy_planks",
|
||||||
|
title = "Tammoy Planks",
|
||||||
|
--description = "",
|
||||||
|
tiles = { logTileSheet:t(6, 4) },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
---@type Node.NodeDefinition
|
||||||
|
{
|
||||||
|
settings = {
|
||||||
|
name = "dallalia_planks",
|
||||||
|
title = "Dallalia Planks",
|
||||||
|
--description = "",
|
||||||
|
tiles = { logTileSheet:t(8, 4) },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
---@type Node.NodeDefinition
|
||||||
|
{
|
||||||
|
settings = {
|
||||||
|
name = "zuph_planks",
|
||||||
|
title = "Zuph Planks",
|
||||||
|
--description = "",
|
||||||
|
tiles = { logTileSheet:t(10, 4) },
|
||||||
|
},
|
||||||
|
},
|
||||||
})
|
})
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 122 KiB After Width: | Height: | Size: 122 KiB |
Reference in New Issue
Block a user