mirror of
https://github.com/Dadido3/noita-mapcap.git
synced 2024-11-18 17:17:31 +00:00
Add mod setting for custom/fixed seed
This commit is contained in:
parent
6ab8903c9b
commit
7ea4f058c8
4
init.lua
4
init.lua
@ -55,6 +55,10 @@ dofile("mods/noita-mapcap/files/ui.lua")
|
||||
|
||||
---Called in order upon loading a new(?) game.
|
||||
function OnModPreInit()
|
||||
if ModSettingGet("noita-mapcap.seed") ~= "" then
|
||||
SetWorldSeed(tonumber(ModSettingGet("noita-mapcap.seed")) or 0)
|
||||
end
|
||||
|
||||
-- Read Noita's config to be used in checks later on.
|
||||
Check.StartupConfig = Modification.GetConfig()
|
||||
|
||||
|
@ -128,6 +128,14 @@ modSettings = {
|
||||
foldable = true,
|
||||
_folded = true,
|
||||
settings = {
|
||||
{
|
||||
id = "seed",
|
||||
ui_name = "World seed",
|
||||
ui_description = "Lock the world to the given seed\n \nClear field to use a random seed.",
|
||||
value_default = DebugAPI.IsDevBuild() and "123" or "",
|
||||
allowed_characters = "0123456789",
|
||||
scope = MOD_SETTING_SCOPE_NEW_GAME,
|
||||
},
|
||||
{
|
||||
id = "grid-size",
|
||||
ui_name = "Grid size",
|
||||
|
Loading…
Reference in New Issue
Block a user