… | |
… | |
1008 | } |
1008 | } |
1009 | |
1009 | |
1010 | // already applied == open on ground, or open in inv, or active in inv |
1010 | // already applied == open on ground, or open in inv, or active in inv |
1011 | if (sack->flag [FLAG_APPLIED]) |
1011 | if (sack->flag [FLAG_APPLIED]) |
1012 | { |
1012 | { |
1013 | if (op->container == sack) |
1013 | if (op->container_ () == sack) |
1014 | { |
1014 | { |
1015 | // open on ground or inv, so close |
1015 | // open on ground or inv, so close |
1016 | op->close_container (); |
1016 | op->close_container (); |
1017 | return 1; |
1017 | return 1; |
1018 | } |
1018 | } |
… | |
… | |
1384 | } |
1384 | } |
1385 | break; |
1385 | break; |
1386 | |
1386 | |
1387 | case BUTTON: |
1387 | case BUTTON: |
1388 | case PEDESTAL: |
1388 | case PEDESTAL: |
|
|
1389 | case T_MATCH: |
1389 | update_button (trap, originator); |
1390 | update_button (trap, originator); |
1390 | break; |
1391 | break; |
1391 | |
1392 | |
1392 | case ALTAR: |
1393 | case ALTAR: |
1393 | /* sacrifice victim on trap */ |
1394 | /* sacrifice victim on trap */ |
… | |
… | |
1551 | return; |
1552 | return; |
1552 | } |
1553 | } |
1553 | |
1554 | |
1554 | if (!tmp->msg) |
1555 | if (!tmp->msg) |
1555 | { |
1556 | { |
1556 | op->failmsg (format ("You open the %s and find it empty.", &tmp->name)); |
1557 | op->failmsg (format ("The %s contains nothing but meaningless gibberish. H<There is nothing interesting to read here.>", &tmp->name)); |
1557 | return; |
1558 | return; |
1558 | } |
1559 | } |
1559 | |
1560 | |
1560 | /* need a literacy skill to read stuff! */ |
1561 | /* need a literacy skill to read stuff! */ |
1561 | skill_ob = find_skill_by_name (op, tmp->skill); |
1562 | skill_ob = find_skill_by_name (op, tmp->skill); |
… | |
… | |
2586 | if (INVOKE_OBJECT (APPLY, op, ARG_OBJECT (who))) |
2587 | if (INVOKE_OBJECT (APPLY, op, ARG_OBJECT (who))) |
2587 | return RESULT_INT (0); |
2588 | return RESULT_INT (0); |
2588 | |
2589 | |
2589 | switch (op->type) |
2590 | switch (op->type) |
2590 | { |
2591 | { |
2591 | case CF_HANDLE: |
2592 | case T_HANDLE: |
2592 | who->play_sound (sound_find ("turn_handle")); |
2593 | who->play_sound (sound_find ("turn_handle")); |
2593 | who->statusmsg ("You turn the handle."); |
2594 | who->statusmsg ("You turn the handle."); |
2594 | op->value = op->value ? 0 : 1; |
2595 | op->value = op->value ? 0 : 1; |
2595 | SET_ANIMATION (op, op->value); |
2596 | SET_ANIMATION (op, op->value); |
2596 | update_object (op, UP_OBJ_FACE); |
2597 | update_object (op, UP_OBJ_FACE); |
… | |
… | |
2844 | * we don't use a corrupt pointer for the next object, so we get the |
2845 | * we don't use a corrupt pointer for the next object, so we get the |
2845 | * next object in the stack before applying. This is can only be a |
2846 | * next object in the stack before applying. This is can only be a |
2846 | * problem if player_apply() has a bug in that it uses the object but does |
2847 | * problem if player_apply() has a bug in that it uses the object but does |
2847 | * not return a proper value. |
2848 | * not return a proper value. |
2848 | */ |
2849 | */ |
2849 | for (object *next, *tmp = pl->container ? pl->container->inv : pl->below; tmp; tmp = next) |
2850 | for (object *next, *tmp = pl->container_ () ? pl->container_ ()->inv : pl->below; tmp; tmp = next) |
2850 | { |
2851 | { |
2851 | next = tmp->below; |
2852 | next = tmp->below; |
2852 | |
2853 | |
2853 | if (QUERY_FLAG (tmp, FLAG_IS_FLOOR)) |
2854 | if (QUERY_FLAG (tmp, FLAG_IS_FLOOR)) |
2854 | floors++; |
2855 | floors++; |