7 move_object(struct param *par, struct object *from, struct object *to)
9 struct object *obj = par->object;
10 enum distance dist = par->distance;
12 if (obj == NULL || dist == dist_unknown_obj || dist == dist_not_here)
13 printf("I don't understand what item you mean.\n");
15 printf("There is nobody here to give that to.\n");
17 printf("What's the meaning of putting a %s inside itself?\n",
19 else if (from != obj->location) {
20 /* give the appropriate error message */
23 printf("You should not be doing that to yourself.\n");
27 printf("You already have %s.\n", obj->description);
32 printf("That's not an item.\n");
37 printf("You have no %s.\n", par->tag);
39 printf("Sorry, %s has no %s.\n",
40 from->description, par->tag);
43 case dist_held_contained:
44 case dist_here_contained:
45 printf("Sorry, %s is holding it.\n",
46 obj->location->description);
50 /* we should have handled all other cases
51 * before this point */
54 } else if (obj->weight > to->capacity) {
55 printf("That is way too heavy.\n");
56 } else if (obj->weight + weight_of_contents(to) > to->capacity) {
57 printf("That would becamo too heavy.\n");