Note: Undead said he didn't want cavern, iceroad, or swamp in 1.3.
from those 3, only swamp stays because it is under CC BY-NC-SA 3.0 license (You are free to: Share and adapt.)
menuitemmapload mapname action [hoveraction [desc]]
create menu entry for a map file
menudirlistsub action dots
adds subdirectory entries to a menu with a files list
has to come after the menudirlist command
<action> is the command to be executed, when the menu entry is chosen
if <dots> is 1, an entry ".." is added
enumfiles path [extension]
lists files in a directory
if extension is specified, only files of that extension are listed
if the extension is "dir", only directories are listed
DOCREF menuitemmapload menudirlistsub enumfiles
Restore the old persistidents system from AC 1.0, since it's working as
intended - if used properly.
As a reminder:
* aliases created by "const" and "tempalias" are never persistent
* aliases created or altered by "alias" or "=" become persistent, if
the persistidents flag is set during that operation
* persistidents if false during the execution of almost all config files
during game start - those files can create aliases with default values
which will not be persistent (until changed later while the flag is
set)
* before saved.cfg is executed, the flag is set and stays set all
throughout the game - which means, that all changes (from menus, for
example) will change the altered alias to "persistent"
* exceptions for map or model config files are unnecessary, since those
run restricted and can't create aliases anyway
* exceptions are necessary for "late run" config files like those in
config/opt/
The new command "persistidents" may be used to manually set or clear the
flag. It also returns the current state of the flag. If used in a config
file, the flag is restored to its original value when the file ends
execution.
In short: only late-run config files (meaning: run after saved.cfg was
restored) may need to manually set/reset the flag. Use const and tempalias
where appropriate and clear persistidents before creating an alias with a
not-to-save default value that may be changed and made persistent later.
DOCREF persistidents
menusynctabstops 0|1
if enabled(1), tab positions in a menu are synchronised
default is off(0)
affects menu title, header and items but not footer or descriptions
DOCREF menusynctabstops
changed command:
docfind <pattern> <silent>
Searches for pattern in all reference entries. If <silent> is zero or
omitted, all found references are listed.
A table of all found entries is returned as result. For each entry,
the index of the doc entry string that contains the pattern is listed.
new command:
getdoc <ref> <idx>
Returns a string of the doc entry specified by <ref>. String index
numbers match with the result of docfind.
0 name
1 description
2- remarks
DOCREF docfind getdoc
Remarks:
1. Changed order in keycmds lets to keep alphabetical order in saved.cfg .
2. Earlier long information in docs about arguments of command could be
invisible for low aspect ratio (example: "weapon" command), now it's fixed.
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
* 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
- fix possible crash in conc (but it's still an ugly hack)
- fix noob usage of strcmp
- flag some memory leaks (it would be nice, if the author(s) would clean
up the mess himself)
- fix crash in substr
- whitespace cleanup
there are plenty more memory leaks in command.cpp - for example, every
goto in cubescript does not clean up anything
* Tested "strip and preserve" mode on map cfg files, which worked very well -> deleted spare whitespace.
* Checked clippings on all new models, added them all to menus_edit.cfg
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7354 e016b1c5-ed68-44aa-a2f7-31cac88cffde
Note: This commit effects a lot of configs, be on the look out for little cubescript errors/broken menuitems/etc. and report them ASAP.
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7146 e016b1c5-ed68-44aa-a2f7-31cac88cffde