… | |
… | |
255 | * pick up (0 means all of them) |
255 | * pick up (0 means all of them) |
256 | */ |
256 | */ |
257 | static void |
257 | static void |
258 | pick_up_object (object *pl, object *op, object *tmp, int nrof) |
258 | pick_up_object (object *pl, object *op, object *tmp, int nrof) |
259 | { |
259 | { |
260 | object *env = tmp->env; |
|
|
261 | uint32 weight, effective_weight_limit; |
260 | uint32 weight, effective_weight_limit; |
262 | int tmp_nrof = tmp->number_of (); |
261 | int tmp_nrof = tmp->number_of (); |
263 | |
262 | |
264 | /* IF the player is flying & trying to take the item out of a container |
263 | /* IF the player is flying & trying to take the item out of a container |
265 | * that is in his inventory, let him. tmp->env points to the container |
264 | * that is in his inventory, let him. tmp->env points to the container |
… | |
… | |
511 | * so this function isn't named very good anymore. |
510 | * so this function isn't named very good anymore. |
512 | */ |
511 | */ |
513 | void |
512 | void |
514 | put_object_in_sack (object *op, object *sack, object *tmp, uint32 nrof) |
513 | put_object_in_sack (object *op, object *sack, object *tmp, uint32 nrof) |
515 | { |
514 | { |
516 | object *tmp2, *sack2; |
515 | object *tmp2; |
517 | char buf[MAX_BUF]; |
516 | char buf[MAX_BUF]; |
518 | |
517 | |
519 | if (sack == tmp) |
518 | if (sack == tmp) |
520 | return; /* Can't put an object in itself */ |
519 | return; /* Can't put an object in itself */ |
521 | |
520 | |
… | |
… | |
529 | { |
528 | { |
530 | /* Eneq(@csd.uu.se): If the object to be dropped is a container |
529 | /* Eneq(@csd.uu.se): If the object to be dropped is a container |
531 | * we instead move the contents of that container into the active |
530 | * we instead move the contents of that container into the active |
532 | * container, this is only done if the object has something in it. |
531 | * container, this is only done if the object has something in it. |
533 | */ |
532 | */ |
534 | sack2 = tmp; |
|
|
535 | new_draw_info_format (NDI_UNIQUE, 0, op, "You move the items from %s into %s.", query_name (tmp), query_name (sack)); |
533 | new_draw_info_format (NDI_UNIQUE, 0, op, "You move the items from %s into %s.", query_name (tmp), query_name (sack)); |
536 | |
534 | |
537 | for (tmp2 = tmp->inv; tmp2; tmp2 = tmp) |
535 | for (tmp2 = tmp->inv; tmp2; tmp2 = tmp) |
538 | { |
536 | { |
539 | tmp = tmp2->below; |
537 | tmp = tmp2->below; |