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
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.
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
Use LSHIFT to direct TAB-completion to browse backwards through the
available alternatives.
also: full cleanup of the commandcomplete()-code [by stef]
* fix crashing buffer overflow
* remove some ancient ludicrous code
* ignore more spaces
* browse command- and filename-alternatives in alphabetical order
* clean up nickcomplete
* more comments (sry)
The fix also allows to turn on/off the scope during intermission (since
a few years the scope was blocked in intermission, because it was
immediately turned off by scoreboard).
Sometimes the enet build seems to get messed up and "make" won't work
anymore in ../enet. The mrproper target tries to clean up ../enet, but
if it doesn't work, it deletes ../enet/Makefile manually. This triggers
a configure run in ../enet with the next make invocation - which should
fix everything.