Skip to content
Permalink
Browse files

Prevent selecting "Initiate Tremors" a second time from the console.

  • Loading branch information...
BevapDin committed May 4, 2015
1 parent 435e107 commit 447b452aa04937b3a29b0d0e3ffa657fbe98352c
Showing with 16 additions and 0 deletions.
  1. +14 −0 src/computer.cpp
  2. +2 −0 src/computer.h
@@ -708,6 +708,9 @@ INITIATING STANDARD TREMOR TEST..."));
if (!g->u.has_artifact_with(AEP_PSYSHIELD)) {
g->u.add_effect("amigara", 20);
}
// Disable this action to prevent further amigara events, which would lead to
// further amigara monster, which would lead to further artifacts.
remove_option( COMPACT_AMIGARA_START );
break;

case COMPACT_STEMCELL_TREATMENT:
@@ -1278,6 +1281,7 @@ void computer::activate_failure(computer_failure fail)
g->u.add_effect("amigara", 20);
g->explosion( tripoint( rng(0, SEEX * MAPSIZE), rng(0, SEEY * MAPSIZE), g->get_levz() ), 10, 10, false );
g->explosion( tripoint( rng(0, SEEX * MAPSIZE), rng(0, SEEY * MAPSIZE), g->get_levz() ), 10, 10, false );
remove_option( COMPACT_AMIGARA_START );
break;

case COMPFAIL_DESTROY_BLOOD:
@@ -1331,6 +1335,16 @@ void computer::activate_failure(computer_failure fail)
}// switch (fail)
}

void computer::remove_option( computer_action const action )
{
for( auto it = options.begin(); it != options.end(); ++it ) {
if( it->action == action ) {
options.erase( it );
break;
}
}
}

bool computer::query_bool(const char *mes, ...)
{
va_list ap;
@@ -133,6 +133,8 @@ class computer
// ...but we can also choose a specific failure.
void activate_failure (computer_failure fail);

void remove_option( computer_action action );

// OUTPUT/INPUT:

// Reset to a blank terminal (e.g. at start of usage loop)

0 comments on commit 447b452

Please sign in to comment.
You can’t perform that action at this time.