introduce temporary aliases
An alias, that was at least once used with the new "tempalias" will not be written to saved.cfg. So, now there are four ways to create aliases: 1) alias (or "=") General alias, who's value gets saved at game exit in saved.cfg, and restored at the next restart - unless the alias was created at a time, where persistidents was zero (usually during execution of the game's own config files during startup). 2) const Creates an alias, that can not be changed. Makes it harder for users to destroy their config. 3) push Reassigns an alias with a new value. After "pop", the old value is restored. Allows the use of "local" aliases in scripts. Also avoids name conflicts. 4) tempalias Like "alias", but the value will not be written to saved.cfg. The commit also changes aliases, written by the engine itself, to "temp": gametimestart, __getmaprevisions DOCREF tempalias
This commit is contained in:
@@ -754,7 +754,7 @@ bool load_world(char *mname) // still supports all map formats that have
|
||||
c2skeepalive();
|
||||
|
||||
defformatstring(startmillis)("%d", millis_());
|
||||
alias("gametimestart", startmillis);
|
||||
alias("gametimestart", startmillis, true);
|
||||
startmap(mname);
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user