/* This does special processing on the 'take' command. If the
* player has a container open, we want to specifiy what object
* to move from that since we've sorted it. command is
* the command as tped, cpnext is any optional params.
*/
void command_take (const char *command, const char *cpnext)
{
/* If the player has specified optional data, or the player
* does not have a container open, just issue the command
* as normal
*/
if (cpnext || cpl.container == NULL)
send_command(command, cpl.count, 0);
else {
if (cpl.container->inv == NULL)
draw_info("There is nothing in the container to move", NDI_BLACK);
else
cs_print_string(csocket.fd,"move %d %d %d", cpl.ob->tag,
cpl.container->inv->tag, cpl.count);
}
}