Changeset 385

Show
Ignore:
Timestamp:
07/27/07 17:48:46 (1 year ago)
Author:
takkaria
Message:

Restore the "jump into trap and don't autopickup" command. It's worth it, honest. (#241)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/angband-3.0.8/src/cmd0.c

    r382 r385  
    154154        { "Alter a grid",             '+', do_cmd_alter }, 
    155155        { "Walk",                     ';', do_cmd_walk }, 
     156        { "Jump into a trap",         '-', do_cmd_jump }, 
    156157        { "Start running",            '.', do_cmd_run }, 
    157158        { "Stand still",              ',', do_cmd_hold }, 
  • branches/angband-3.0.8/src/cmd1.c

    r291 r385  
    756756        bool msg = TRUE; 
    757757 
     758        bool auto_okay = p_ptr->auto_pickup_okay; 
     759 
     760 
     761        /* Reset auto_pickup_okay */ 
     762        p_ptr->auto_pickup_okay = TRUE; 
     763 
    758764 
    759765        /* Nothing to pick up -- return */ 
     
    780786 
    781787                /* Automatically pick up items into the backpack */ 
    782                 if (p_ptr->auto_pickup_okay && auto_pickup_okay(o_ptr)) 
     788                if (auto_okay && auto_pickup_okay(o_ptr)) 
    783789                { 
    784790                        /* Pick up the object with message */ 
  • branches/angband-3.0.8/src/cmd2.c

    r292 r385  
    20952095        /* Move the player */ 
    20962096        move_player(dir); 
     2097} 
     2098 
     2099/* 
     2100 * Jump into a trap, turn off pickup. 
     2101 * 
     2102 * What a horrible function. 
     2103 */ 
     2104void do_cmd_jump(void) 
     2105{ 
     2106        bool old_easy_alter; 
     2107 
     2108        /* Picking up NOT okay, so whatever you heard is obviously wrong */ 
     2109        p_ptr->auto_pickup_okay = FALSE; 
     2110 
     2111        /* easy_alter can be turned off (don't disarm traps) */ 
     2112        old_easy_alter = easy_alter; 
     2113        easy_alter = FALSE; 
     2114 
     2115        /* Now actually do this silly walk */ 
     2116        do_cmd_walk(); 
     2117 
     2118        /* Restore easy_alter */ 
     2119        easy_alter = old_easy_alter; 
    20972120} 
    20982121 
  • branches/angband-3.0.8/src/dungeon.c

    r291 r385  
    14731473 
    14741474        while (!p_ptr->energy_use && !p_ptr->leaving); 
    1475  
    1476  
    1477         /* Allowed to automatically pick up things again */ 
    1478         p_ptr->auto_pickup_okay = TRUE; 
    14791475} 
    14801476