Replies: 2 comments
-
|
Dedicated namespace will be especially useful if we'll have custom hooks at some point. E.g. Sky Island could introduce "on_raid_started" hook, which can be used later on by other mods. |
Beta Was this translation helpful? Give feedback.
-
|
Another things regarding hooks which is worth standardizing, it's where callbacks should be physically stored, and how they will be loaded in game. Once we'll have callbacks for mapgens, iexamine, mondeath, and all the things - how they going to be organized within data tree? Single .lua file might work for mods, but in base game it'll become too hard to navigate eventually. We're not dumping everything in single json after all. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
currently lua hooks re-use existing hooks like
examine_actionoruse_action. however, it is not namespaced, thus will be hard to manage when more hooks are added. therefore, i suggest a new centralized namespace for hooks:"hooks".{ "type": "GENERIC", "hooks": { "on_use": "FOO", "on_examine": "BAR", "on_destruction": "BAZ", "on_drop": "QUX", "on_throw": "QUUX" } }Beta Was this translation helpful? Give feedback.
All reactions