|
|
|
@ -303,7 +303,12 @@ command_result df_createitem (color_ostream &out, vector <string> & parameters)
|
|
|
|
|
case item_type::PET:
|
|
|
|
|
case item_type::EGG:
|
|
|
|
|
split_string(&tokens, material_str, ":");
|
|
|
|
|
if (tokens.size() != 2)
|
|
|
|
|
if (tokens.size() == 1)
|
|
|
|
|
{
|
|
|
|
|
// default to empty caste to display a list of valid castes later
|
|
|
|
|
tokens.push_back("");
|
|
|
|
|
}
|
|
|
|
|
else if (tokens.size() != 2)
|
|
|
|
|
{
|
|
|
|
|
out.printerr("You must specify a creature ID and caste for this item type!\n");
|
|
|
|
|
return CR_FAILURE;
|
|
|
|
@ -328,7 +333,15 @@ command_result df_createitem (color_ostream &out, vector <string> & parameters)
|
|
|
|
|
}
|
|
|
|
|
if (mat_type == -1)
|
|
|
|
|
{
|
|
|
|
|
out.printerr("The creature you specified has no such caste!\nValid castes:%s\n", castes.c_str());
|
|
|
|
|
if (tokens[1].empty())
|
|
|
|
|
{
|
|
|
|
|
out.printerr("You must also specify a caste.\n");
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
out.printerr("The creature you specified has no such caste!\n");
|
|
|
|
|
}
|
|
|
|
|
out.printerr("Valid castes:%s\n", castes.c_str());
|
|
|
|
|
return CR_FAILURE;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|