• We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.

FeiXue

Private
10 Badges
Apr 12, 2018
11
0
  • Cities: Skylines
  • Stellaris
  • Hearts of Iron IV: Cadet
  • Cities: Skylines - Mass Transit
  • Surviving Mars
  • Stellaris: Synthetic Dawn
  • Age of Wonders III
  • Stellaris: Apocalypse
  • Cities: Skylines Deluxe Edition
  • Stellaris - Path to Destruction bundle
From docs:
"The message handlers are executed in the order of registration.
Therefore message handlers registered at file scope will be executed
in the order of file execution (see [Lua startup](LuaStartup.html)).
The message handlers are executed in the order of registration.
"
startup.png

So obviously there's a list of registered message handlers kept. Can it be fetched for individual events, or at least as a whole? Like OnMsg:GetRegisteredHandlers("NewDay") or somesuch.

If not, will a parent be always handled before its child? If I inherit City as CityExt, will City's handlers be served before CityExt's ones? And what if there is more than one child?

If that can't be guaranteed, can we get order in which mods were loaded:
Code:
function OnMsg.NewMap()
local lMods = somefunction()
end