allow symbolic arguments for some commands

* 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
This commit is contained in:
ac-stef
2015-02-23 18:52:04 +01:00
parent e89b2eae86
commit 47f71f1288
12 changed files with 135 additions and 166 deletions
+3 -3
View File
@@ -252,9 +252,9 @@ void delent()
int findtype(char *what)
{
loopi(MAXENTTYPES) if(strcmp(what, entnames[i])==0) return i;
conoutf("unknown entity type \"%s\"", what);
return NOTUSED;
int t = getlistindex(what, entnames, true, NOTUSED);
if(t == NOTUSED) conoutf("unknown entity type \"%s\"", what);
return t;
}
entity *newentity(int index, int x, int y, int z, char *what, int v1, int v2, int v3, int v4)