DecryptionWindow::DecryptionWindow(Market* market, QWidget *parent, QVector<QString> wordOverride) : QWidget(parent), ui(new Ui::DecryptionWindow) { ui->setupUi(this); this->market = market; if (market != NULL) { QString decryptsFileName = "Decrypts " + QDateTime::currentDateTime().toString(" - MM-dd hh.mm.txt"); decryptsFile = new QFile(decryptsFileName); bool ok = decryptsFile->open(QIODevice::WriteOnly | QIODevice::Text); if (!ok) { // We've failed to open a log file for writing. wtf. QMessageBox::critical(0,"Error","Unable to write user decryptions file"); exit(EXIT_FAILURE); } } connect(ui->btnSubmit, SIGNAL(clicked()), this, SLOT(DoneClicked())); score = 0; if (wordOverride.count() == 0) { wordyStuff = WordList(":/dictionary") .Generate(MIN_DECRYPTION_LEN,MAX_DECRYPTION_LEN); } else { wordyStuff = wordOverride; } ResetTask(); }
void Scene_House_Hall::Check() { EScene::Check(); #ifdef SCENE_SHORTCUT if (KInput::isPressed(K_VK_F5)) { ResetTask("task_meetnathan2"); ResolveTask("task_inca_universeresolved"); Init(); } if (KInput::isPressed(K_VK_F6)) { SetVisible("house_hall_livingdooropen", true, true); } if (KInput::isPressed(K_VK_F7)) { SetVisible("diningroom", false); SetVisible("house_hall_diningdooropen", true); } if (KInput::isPressed(K_VK_F8)) { ResolveGroundFloor(); } #endif }
void ReverseTask() { int lower=0; int upper = getFinalWaypoint(); while(lower<upper) { //Swap in pairs starting from the sides of task array std::swap(Task[lower++],Task[upper--]); } ResetTask(false); // Reset the task without showing the message about task reset RefreshTask(); //Recalculate the task DoStatusMessage(gettext(TEXT("_@M1853_"))); // LKTOKEN _@M1853_ "TASK REVERSED" }
void CommonStats::Reset() { vector_home.SetInvalid(); V_block = fixed(0); V_dolphin = fixed(0); current_risk_mc = fixed(0); ResetTask(); }
CTaskManager::~CTaskManager() { ResetTask(); }