| 946 | COMMAND(deletemapsoundslot, "is"); |
| 947 | |
| 948 | void editmapsoundslot(int *n, char *name, char *maxuses) // edit slot parameters != "" |
| 949 | { |
| 950 | string res = ""; |
| 951 | if(mapconfigdata.mapsoundlines.inrange(*n)) |
| 952 | { |
| 953 | mapsoundline &msl = mapconfigdata.mapsoundlines[*n]; |
| 954 | if((*name || *maxuses) && !noteditmode("editmapsoundslot") && !multiplayer("editmapsoundslot")) |
| 955 | { // change attributes |
| 956 | if(*maxuses) msl.maxuses = strtol(maxuses, NULL, 0); |
| 957 | if(*name) copystring(msl.name, strncmp(name, mapsoundfinalpath, mapsoundfinalpath_n) ? name : name + mapsoundfinalpath_n); |
| 958 | reloadmapsoundconfig(); |
| 959 | mapsoundchanged = 1; |
| 960 | unsavededits++; |
| 961 | hdr.flags |= MHF_AUTOMAPCONFIG; // requires automapcfg |
| 962 | } |
| 963 | formatstring(res)("\"%s\" %d", msl.name, msl.maxuses); // give back all current attributes |
| 964 | } |
| 965 | result(res); |
| 966 | } |
| 967 | COMMAND(editmapsoundslot, "iss"); |
| 968 | |
| 969 | void getmapsoundorigin(char *fname) |
nothing calls this directly
no test coverage detected