diff options
| author | Petr Mrázek | 2012-02-01 04:12:15 +0100 |
|---|---|---|
| committer | Petr Mrázek | 2012-02-01 04:12:15 +0100 |
| commit | 22aeb6e2ac7a4199fa2ab980f43dd50d7aa64c25 (patch) | |
| tree | 3f9e791b93b0a0e5e2559a2bfbe7c94150fe5fde /plugins/mode.cpp | |
| parent | e5b1433d4499a4eb9691d43d6efc023bdf8e2793 (diff) | |
| download | dfhack-22aeb6e2ac7a4199fa2ab980f43dd50d7aa64c25.tar.gz dfhack-22aeb6e2ac7a4199fa2ab980f43dd50d7aa64c25.tar.bz2 dfhack-22aeb6e2ac7a4199fa2ab980f43dd50d7aa64c25.tar.xz | |
Added linkage to libdl, fix for mode.
Diffstat (limited to 'plugins/mode.cpp')
| -rw-r--r-- | plugins/mode.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/plugins/mode.cpp b/plugins/mode.cpp index e8ef7fa4..f318c385 100644 --- a/plugins/mode.cpp +++ b/plugins/mode.cpp @@ -113,7 +113,7 @@ DFhackCExport command_result mode (Core * c, vector <string> & parameters) printCurrentModes(gm, c->con); if(set) { - if(gm.g_mode == GAMEMODE_NONE || gm.g_type == GAMETYPE_VIEW_LEGENDS || gm.g_type == GAMETYPE_DWARF_RECLAIM) + if( gm.g_mode == GAMEMODE_NONE || gm.g_type == GAMETYPE_VIEW_LEGENDS ) { c->con.printerr("It is not safe to set modes in menus.\n"); return CR_FAILURE; @@ -123,6 +123,7 @@ DFhackCExport command_result mode (Core * c, vector <string> & parameters) << "1 = Adventurer Mode" << endl << "2 = Arena Mode" << endl << "3 = Arena, controlling creature" << endl + << "4 = Reclaim Fortress Mode" << endl << "c = cancel/do nothing" << endl; uint32_t select=99; @@ -135,7 +136,7 @@ DFhackCExport command_result mode (Core * c, vector <string> & parameters) const char * start = selected.c_str(); char * end = 0; select = strtol(start, &end, 10); - if(!end || end==start || select > 3) + if(!end || end==start || select > 4) { c->con.printerr("This is not a valid selection.\n"); goto input_again; @@ -159,6 +160,10 @@ DFhackCExport command_result mode (Core * c, vector <string> & parameters) gm.g_mode = GAMEMODE_ADVENTURE; gm.g_type = GAMETYPE_ADVENTURE_ARENA; break; + case 4: + gm.g_mode = GAMEMODE_DWARF; + gm.g_type = GAMETYPE_DWARF_RECLAIM; + break; } c->Suspend(); world->WriteGameMode(gm); |
