mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-01 17:38:41 +00:00
Fix mapgen selection problem and whitespaces(?)
This commit is contained in:
parent
f9bad58d77
commit
231b44615f
4 changed files with 12 additions and 6 deletions
|
@ -87,11 +87,6 @@ local function create_world_formspec(dialogdata)
|
||||||
mapgens[#mapgens+1] = k
|
mapgens[#mapgens+1] = k
|
||||||
end
|
end
|
||||||
|
|
||||||
local current_mapgen_internal = dialogdata.mg
|
|
||||||
if lua_mapgens[current_mapgen_internal] then
|
|
||||||
current_mapgen_internal = "singlenode"
|
|
||||||
end
|
|
||||||
|
|
||||||
local flags = dialogdata.flags
|
local flags = dialogdata.flags
|
||||||
|
|
||||||
local game = pkgmgr.find_by_gameid(core.settings:get("menu_last_game"))
|
local game = pkgmgr.find_by_gameid(core.settings:get("menu_last_game"))
|
||||||
|
@ -159,6 +154,11 @@ local function create_world_formspec(dialogdata)
|
||||||
mglist = mglist:sub(1, -2)
|
mglist = mglist:sub(1, -2)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local current_mapgen_internal = current_mapgen
|
||||||
|
if lua_mapgens[current_mapgen_internal] and current_mapgen == dialogdata.mg then
|
||||||
|
current_mapgen_internal = "singlenode"
|
||||||
|
end
|
||||||
|
|
||||||
-- The logic of the flag element IDs is as follows:
|
-- The logic of the flag element IDs is as follows:
|
||||||
-- "flag_main_foo-bar-baz" controls dialogdata.flags["main"]["foo_bar_baz"]
|
-- "flag_main_foo-bar-baz" controls dialogdata.flags["main"]["foo_bar_baz"]
|
||||||
-- see the buttonhandler for the implementation of this
|
-- see the buttonhandler for the implementation of this
|
||||||
|
|
1
mapgens/egen/init.lua
Normal file
1
mapgens/egen/init.lua
Normal file
|
@ -0,0 +1 @@
|
||||||
|
print("Loaded Egen!")
|
5
mapgens/egen/mapgen.conf
Normal file
5
mapgens/egen/mapgen.conf
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
name = egen
|
||||||
|
title = Egen
|
||||||
|
description = Example mapgen.
|
||||||
|
author = TX_Miner/Xeno333
|
||||||
|
mapgen = true
|
|
@ -74,7 +74,7 @@ public:
|
||||||
*/
|
*/
|
||||||
void addMapgenFromConfig(const std::string &settings_path,
|
void addMapgenFromConfig(const std::string &settings_path,
|
||||||
const std::unordered_map<std::string, std::string> &mapgenPaths);
|
const std::unordered_map<std::string, std::string> &mapgenPaths);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Call this function once all mods have been added
|
* Call this function once all mods have been added
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue