diff options
| author | Petr Mrázek | 2011-07-13 11:45:30 +0200 |
|---|---|---|
| committer | Petr Mrázek | 2011-07-13 11:45:30 +0200 |
| commit | 630b746cfe8455ee89ef8af55013141aa70ccf87 (patch) | |
| tree | 5117a9bb7fec32452af2e2792cbdcce359395e1a /plugins/weather.cpp | |
| parent | 1b011cdf6ce4331d731fd361fd82f367a9484435 (diff) | |
| download | dfhack-630b746cfe8455ee89ef8af55013141aa70ccf87.tar.gz dfhack-630b746cfe8455ee89ef8af55013141aa70ccf87.tar.bz2 dfhack-630b746cfe8455ee89ef8af55013141aa70ccf87.tar.xz | |
Integrate linenoise into Console - Linux part
Diffstat (limited to 'plugins/weather.cpp')
| -rw-r--r-- | plugins/weather.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/plugins/weather.cpp b/plugins/weather.cpp index cf2833ab..0e2ed180 100644 --- a/plugins/weather.cpp +++ b/plugins/weather.cpp @@ -58,7 +58,7 @@ DFhackCExport command_result weather (Core * c, vector <string> & parameters) } if(lock && unlock) { - dfout << "Lock or unlock? DECIDE!" << std::endl; + c->con << "Lock or unlock? DECIDE!" << std::endl; return CR_FAILURE; } int cnt = 0; @@ -67,7 +67,7 @@ DFhackCExport command_result weather (Core * c, vector <string> & parameters) cnt += clear; if(cnt > 1) { - dfout << "Rain, snow or clear sky? DECIDE!" << std::endl; + c->con << "Rain, snow or clear sky? DECIDE!" << std::endl; return CR_FAILURE; } bool something = lock || unlock || rain || snow || clear; @@ -75,14 +75,14 @@ DFhackCExport command_result weather (Core * c, vector <string> & parameters) DFHack::World * w = c->getWorld(); if(!w->wmap) { - dfout << "Weather support seems broken :(" << std::endl; + c->con << "Weather support seems broken :(" << std::endl; c->Resume(); return CR_FAILURE; } if(!something) { // paint weather map - dfout << "Weather map (C = clear, R = rain, S = snow):" << std::endl; + c->con << "Weather map (C = clear, R = rain, S = snow):" << std::endl; for(int y = 0; y<5;y++) { for(int x = 0; x<5;x++) @@ -90,20 +90,20 @@ DFhackCExport command_result weather (Core * c, vector <string> & parameters) switch((*w->wmap)[x][y]) { case DFHack::CLEAR: - dfout << "C "; + c->con << "C "; break; case DFHack::RAINING: - dfout << "R "; + c->con << "R "; break; case DFHack::SNOWING: - dfout << "S "; + c->con << "S "; break; default: - dfout << (int) (*w->wmap)[x][y] << " "; + c->con << (int) (*w->wmap)[x][y] << " "; break; } } - dfout << std::endl; + c->con << std::endl; } } else @@ -111,17 +111,17 @@ DFhackCExport command_result weather (Core * c, vector <string> & parameters) // weather changing action! if(rain) { - dfout << "Here comes the rain." << std::endl; + c->con << "Here comes the rain." << std::endl; w->SetCurrentWeather(RAINING); } if(snow) { - dfout << "Snow everywhere!" << std::endl; + c->con << "Snow everywhere!" << std::endl; w->SetCurrentWeather(SNOWING); } if(clear) { - dfout << "Suddenly, sunny weather!" << std::endl; + c->con << "Suddenly, sunny weather!" << std::endl; w->SetCurrentWeather(CLEAR); } // FIXME: weather lock needs map ID to work reliably... needs to be implemented. |
