(item_by_name): New, factored out of whatitem(). Use it to simplify
some uses of whatitem().
This commit is contained in:
parent
e42f7e8210
commit
a8a6f5649f
4 changed files with 34 additions and 14 deletions
|
@ -80,10 +80,10 @@ tend(void)
|
|||
|
||||
if (!strncmp(p, "land", 4))
|
||||
type = EF_LAND;
|
||||
else if (NULL != (ip = whatitem(p, (s_char *)0)))
|
||||
else if (NULL != (ip = item_by_name(p)))
|
||||
type = EF_SECTOR;
|
||||
else {
|
||||
pr("Bad commodity.\n");
|
||||
pr("Can't tend '%s'\n", p);
|
||||
return RET_SYN;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue