-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.lua
More file actions
58 lines (44 loc) · 1.53 KB
/
Copy pathmain.lua
File metadata and controls
58 lines (44 loc) · 1.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
-- Steady Growth Perfect - Extends Demeter's Steady Growth to upgrade boons to Perfect rarity
-- Author: shadowofdoom
-- Version: 1.1.1
local mods = rom.mods
-- Setup environment isolation
mods['SGG_Modding-ENVY'].auto()
-- Setup game and utility references
game = rom.game
modutil = mods['SGG_Modding-ModUtil']
chalk = mods["SGG_Modding-Chalk"]
reload = mods['SGG_Modding-ReLoad']
-- Load configuration
config = chalk.auto('config.lua')
public.config = config
local function on_ready()
-- ONE-TIME setup only (wrappers, hooks, etc.)
if config.enabled == false then return end
if config.debug then
print("[SteadyGrowthPerfect] Mod loaded and enabled")
end
-- Load core logic
import 'core.lua'
end
local function on_reload()
-- HOT-RELOAD logic (can be re-run safely)
-- CRITICAL: DO NOT import core.lua here - would create duplicate modifications!
if config.enabled == false then return end
if config.debug then
print("[SteadyGrowthPerfect] Mod reloaded (config changes applied)")
end
-- Nothing to reload (all logic is in core.lua applied once in on_ready)
end
-- Setup reload system and register with ModUtil
local loader = reload.auto_single()
modutil.once_loaded.game(function()
loader.load(on_ready, on_reload)
end)
-- Initialize when save is loaded
modutil.once_loaded.save(function()
if config.enabled == false then return end
if config.debug then
print("[SteadyGrowthPerfect] Save loaded")
end
end)