"editbind E edittoggle" is needed for such cases, when edittoggle will be
bounded to key, for which editbind exists. Then that will allow to
exit from edit mode still with use a key.
auto-generate mapmodel menus depending on the actually available models
in the current map config.
Also fixes memory leak in "newmenu".
DOCREF mapmodelname mapmodelbyname mapmodelchanged
Changes:
1. added single aliases bounded to the keys, in order to maintain easier
the binds;
2. cleaned up binds;
3. updated Keyboard menu and fixed searching binds.
Remark: aliases bounded to the keys shouldn't have leading and trailing
white spaces, if they are present in Keyboard menu, otherwise they won't
be found. So construction like, for example: bind SLASH [ key_commandline ]
is inadmissible.
4. Alternate edit binds (default disabled) moved to
config/opt/alternateeditbinds.cfg and removed old_editbinds variable.
DOCREF old_editbinds
Fixed nested list in Cubescript, fixed conopen (now read-only), removed changeteam(),
fixed name of shortcuts for team survivor modes (so it fixes
https://github.com/assaultcube/AC/issues/73 ).
DOCREF ts tsurv btsurv
curmenu gives back the name of the currently open menu, which can be used
to close just that.
The new script "closecurmenu" uses curmenu to close the current menu.
DOCREF curmenu closecurmenu
Moved the comment on the CXX flag to a seperate line, so that compiling logs don't show extra whitespace. Additionally, I've added a comment about why we use clang++ (instead of g++) to help future 3rd parties.
All cfg-files in config/autostart get executed during startup.
- more appropriate directory name and place
- files are now sorted alphabetically, as promised
- doubles are removed (resulting from identical file names in home and
install tree) since they would only result in files run twice
- scripts with file names prefixed with "_veryfirst_", "_beforesaved_"
or "_aftersaved_" will be run as very first config file, right before
saved.cfg or right after saved.cfg
- all remaining files will be run right before autoexec.cfg
- the directory "config/autostart" will be created, if it doesn't already
exist in the home tree
like this:
alias listwiththreeelements [
first // first element
second // second element
third // third element
]
"echo $listwiththreeelements" will print everything, including comments,
but "echo (listlen $listwiththreeelements)" will print "3", and
"echo (at $listwiththreeelements 1)" will print "second".
Before, if player switched to akimbo just as it expired, he ended up with
akimbo and 0 ammo. Now his weapon will change to default weapon (the most
often primary), as if he would take akimbo in the hands.
* no more need to delete aliases "onQuit"
* removed on_quit.cfg
* moved faq.cfg, parsestrings.cfg and survival.cfg to config/opt
* run faq.cfg and survival.cfg when needed
DOCREF addListOnQuit
instead of "pop var_a ; pop var_b" you can write "pop var_a var_b"
Also, "pop" will now give back the removed value of the first alias from
the argument list. This allows using the pop'd value one last time.
DOCREF pop
Some operations, like pop or looplist, leave empty aliases behind. Mostly,
this is without consequence - but before this commit, they showed up
during command completion.
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
Defaults to omitting variables from saved.cfg, that are still at default
value. By setting omitunchangeddefaults to zero, those variables get
written, but commented out. The variable "groupvariables" sets the number
of variables with similar names, that can be grouped on one line. Setting
it to zero will additionally write min, max and default values and a
short description of the variable to file.
In general, variables, that are still at default value, will not be
restored from saved.cfg, so when the default in the game is changed, all
clients will use that new default. This way, testers don't have to erase
their saved.cfg as often.
DOCREF omitunchangeddefaults groupvariables
If an alias has a local value assigned (by "push"), this change will write
the original value to saved.cfg instead of the last local value.
This has the additional effect, that aliases, that were created by "push",
will not be written to saved.cfg, since the original value was empty.
* combine all weapon attributes in a table
* sort variables and aliases
* group variables
* implement curname as SVAR
* implement cmdbuf as temporary alias
* parsed words starting with " will handle richtext
* all strings in saved.cfg that need escaping are escaped
* new command "escape" to escape a string manually
DOCREF escape
* use the same list of gun names for all occasions
* switched syntax, so that argument completion will work
* support old syntax, so old config files will work
* fix path handling by disallowing paths altogether ;)
DOCREF loadcrosshair
allows a SVAR to be assembled when needed
also:
* mapmsg is now a SVAR
* getmapmsg was removed (now: $mapmsg)
* new editsvar script to edit any SVAR in the console buffer
* nonfunctional menu removed
DOCREF mapmsg getmapmsg editsvar
* new command "listoptions" lists the argument options for several
argument types like entities, weapons and teamnames
* "burstshots", "weapon", "magcontent", "magreserve", "fragmessage" and
"gibmessage" now allow guns to be specified by name
* "addpunct" allows plaintext arguments like "brackets" and "quotes"
* the "team" command now understands numeric teams
* entity types can now be specified by type index number
* removed some lists from the config files (now provided by listoptions)
* added argument completion for several commands
* change nextprimary from integer to string variable
DOCREF listoptions burstshots weapon addpunct
DOCREF fragmessage gibmessage magcontent magreserve
DOCREF nextprimary