| 1386 | /* common code to check and possibly charge for 1 svc.context.tin.tin, |
| 1387 | * will split() svc.context.tin.tin if necessary */ |
| 1388 | staticfn struct obj * |
| 1389 | costly_tin(int alter_type) /* COST_xxx */ |
| 1390 | { |
| 1391 | struct obj *tin = svc.context.tin.tin; |
| 1392 | |
| 1393 | if (carried(tin) ? tin->unpaid |
| 1394 | : (costly_spot(tin->ox, tin->oy) && !tin->no_charge)) { |
| 1395 | if (tin->quan > 1L) { |
| 1396 | tin = svc.context.tin.tin = splitobj(tin, 1L); |
| 1397 | svc.context.tin.o_id = tin->o_id; |
| 1398 | } |
| 1399 | costly_alteration(tin, alter_type); |
| 1400 | } |
| 1401 | return tin; |
| 1402 | } |
| 1403 | |
| 1404 | int |
| 1405 | tin_variety_txt(char *s, int *tinvariety) |
no test coverage detected