[0.17.4] Scenario locale is not available to error until after scenario control.lua runs
Posted: Sat Mar 02, 2019 10:04 am
A continuation of viewtopic.php?f=11&t=60767&p=366009
It seems that this was half-resolved: the locale data seems loaded, just unavailable to error while it is available to log.
3 control.luas for 3 test runs:
1) log in control init
As expected:
2) error in control init
Does not give the contents of locale:
3) error in init
As expected, the log shows the error correctly:
It seems that this was half-resolved: the locale data seems loaded, just unavailable to error while it is available to log.
3 control.luas for 3 test runs:
1) log in control init
Code: Select all
log({'apocalypse.apocalypse_already_running'})
Code: Select all
27.596 Info Scenario.cpp:147: Map version 0.17.4-1
27.626 Script @C:/Users/Matthew/AppData/Roaming/Factorio/temp/currently-playing/control.lua:2: The apocalypse has already begun. There is nothing more to do in this world.
Code: Select all
error({'apocalypse.apocalypse_already_running'})
Code: Select all
226.463 Loading Level.dat: 1272918 bytes.
226.464 Info Scenario.cpp:147: Map version 0.17.4-1
226.635 Error AppManager.cpp:597: Unknown key: "apocalypse.apocalypse_already_running"
stack traceback:
[C]: in function 'error'
...Data/Roaming/Factorio/temp/currently-playing/control.lua:2: in main chunk
Code: Select all
script.on_init(
function()
error({'apocalypse.apocalypse_already_running'})
end
)
Code: Select all
Error while running event level::on_init()
The apocalypse has already begun. There is nothing more to do in this world.
stack traceback:
[C]: in function 'error'
...Data/Roaming/Factorio/temp/currently-playing/control.lua:3: in function <...Data/Roaming/Factorio/temp/currently-playing/control.lua:2>