(sct_typematch): New. Use it instead of typematch() where
appropriate. (typematch): Prefer exact match to partial match. Use plain char instead of s_char.
This commit is contained in:
parent
844b654d44
commit
f5e49a830c
5 changed files with 51 additions and 52 deletions
|
@ -118,7 +118,7 @@ do_desi(struct natstr *natp, s_char *sects, s_char *deschar, long int cash,
|
|||
if (!check_sect_ok(§))
|
||||
continue;
|
||||
|
||||
des = typematch(p, EF_SECTOR);
|
||||
des = sct_typematch(p);
|
||||
if (des < 0 || (((des == SCT_BSPAN) || (des == SCT_BTOWER)) &&
|
||||
!player->god)) {
|
||||
pr("See \"info Sector-types\"\n");
|
||||
|
|
|
@ -641,7 +641,7 @@ doland(s_char op, int arg, s_char *p, struct sctstr *sect)
|
|||
sect->sct_dist_y = newy;
|
||||
break;
|
||||
case 's':
|
||||
des = typematch(p, EF_SECTOR);
|
||||
des = sct_typematch(p);
|
||||
if (des < 0)
|
||||
return RET_SYN;
|
||||
pr("Designation for sector %s changed from %c to %c\n",
|
||||
|
@ -650,7 +650,7 @@ doland(s_char op, int arg, s_char *p, struct sctstr *sect)
|
|||
sect->sct_type = des;
|
||||
break;
|
||||
case 'S':
|
||||
des = typematch(p, EF_SECTOR);
|
||||
des = sct_typematch(p);
|
||||
if (des < 0)
|
||||
return RET_SYN;
|
||||
pr("New Designation for sector %s changed from %c to %c\n",
|
||||
|
|
|
@ -61,7 +61,7 @@ shar(void)
|
|||
return RET_SYN;
|
||||
|
||||
if (player->argp[3] && *player->argp[3]) {
|
||||
if (typematch(player->argp[3], EF_SECTOR) < 0)
|
||||
if (sct_typematch(player->argp[3]) < 0)
|
||||
return RET_SYN;
|
||||
else
|
||||
des = *player->argp[3];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue