Mapgen: write SuperUltraSigmaMapgen part 7.1

This commit is contained in:
Van
2025-11-23 21:09:20 +03:00
parent 1e430aaeb0
commit 3c482d6f04
4 changed files with 37 additions and 9 deletions

View File

@@ -1,13 +1,33 @@
-- 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 --
-- Ensure
dofile(core.get_modpath('smc__api__ensure')..'/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')
-- String
dofile(core.get_modpath('smc__api__string')..'/init.lua')
-- Table
dofile(core.get_modpath('smc__api__table')..'/init.lua')
-- --- MapGen definiton ---
local id = core.get_content_id
Require = dofile(core.get_modpath('smc__api__require')..'/init.lua')
---@type Mod
Mod = dofile(core.get_modpath('smc__api__mod')..'/init.lua')
print(core.get_modpath('smc__api__mod')..'/init.lua')
local mapGenRequire = Mod.getInfo('smc__core__map_gen').require
---@type MapGen

View File

@@ -1 +1,4 @@
-- World generation runs in the mapgen environment (separate thread)
-- The Mapgen environment is isolated from the main enviroment.
core.register_mapgen_script(core.get_modpath(core.get_current_modname())..'/MapGenerator.lua')