… | |
… | |
971 | check_pick (object *op) |
971 | check_pick (object *op) |
972 | { |
972 | { |
973 | object *tmp, *next; |
973 | object *tmp, *next; |
974 | int stop = 0; |
974 | int stop = 0; |
975 | int wvratio; |
975 | int wvratio; |
976 | char putstring[128]; |
|
|
977 | |
976 | |
978 | /* if you're flying, you cna't pick up anything */ |
977 | /* if you're flying, you cna't pick up anything */ |
979 | if (op->move_type & MOVE_FLYING) |
978 | if (op->move_type & MOVE_FLYING) |
980 | return 1; |
979 | return 1; |
981 | |
980 | |
… | |
… | |
1055 | { /* old model */ |
1054 | { /* old model */ |
1056 | /* NEW pickup handling */ |
1055 | /* NEW pickup handling */ |
1057 | if (op->contr->mode & PU_DEBUG) |
1056 | if (op->contr->mode & PU_DEBUG) |
1058 | { |
1057 | { |
1059 | /* some debugging code to figure out item information */ |
1058 | /* some debugging code to figure out item information */ |
1060 | if (tmp->name != NULL) |
1059 | const char *str = tmp->name |
1061 | sprintf (putstring, "item name: %s item type: %d weight/value: %d", |
1060 | ? format ("item name: %s item type: %d weight/value: %d", |
1062 | &tmp->name, tmp->type, (int) (query_cost (tmp, op, F_TRUE) * 100 / (tmp->weight * MAX (tmp->nrof, 1)))); |
1061 | &tmp->name, tmp->type, (int) (query_cost (tmp, op, F_TRUE) * 100 / (tmp->weight * MAX (tmp->nrof, 1)))) |
1063 | else |
|
|
1064 | sprintf (putstring, "item name: %s item type: %d weight/value: %d", |
1062 | : format ("item name: %s item type: %d weight/value: %d", |
1065 | &tmp->arch->archname, tmp->type, (int) (query_cost (tmp, op, F_TRUE) * 100 / (tmp->weight * MAX (tmp->nrof, 1)))); |
1063 | &tmp->arch->archname, tmp->type, (int) (query_cost (tmp, op, F_TRUE) * 100 / (tmp->weight * MAX (tmp->nrof, 1)))); |
1066 | |
1064 | |
1067 | new_draw_info (NDI_UNIQUE, 0, op, putstring); |
1065 | new_draw_info (NDI_UNIQUE, 0, op, str); |
1068 | } |
1066 | } |
1069 | |
1067 | |
1070 | /* philosophy: |
1068 | /* philosophy: |
1071 | * It's easy to grab an item type from a pile, as long as it's |
1069 | * It's easy to grab an item type from a pile, as long as it's |
1072 | * generic. This takes no game-time. For more detailed pickups |
1070 | * generic. This takes no game-time. For more detailed pickups |