News:

Simutrans Sites
Know our official sites. Find tools and resources for Simutrans.

[112.0] Language text files of scenario are loaded repeatedly

Started by z9999+, October 29, 2012, 07:42:09 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

z9999+

I'm not sure this is intended or not.

pak128/scenario/new_york/scenario.nut

function get_info_text(pl)
{
return ttextfile("info.txt")
}

function get_rule_text(pl)
{
return ttextfile("rule.txt")
}

function get_goal_text(pl)
{
return ttextfile("goal.txt")


This code means, three text files are loaded repeatedly while scenario info window is open.
I confirmed this behavior with ProcessActivityView and Process Monitor.
Reloading these text files needed only when player changed their language, isn't is ?


Dwachs

Thanks for the report. Sorry for the late reply.

This is just the way it is implemented. Sure, the content of the file should be cached.
Parsley, sage, rosemary, and maggikraut.

Dwachs

The contents of these files are cached since some time. They will be reloaded when restarting or save & load the scenario savegame.
Parsley, sage, rosemary, and maggikraut.