move liquids.history to dfhack-config/liquids.history

develop
myk002 2022-07-23 22:12:58 -07:00
parent f9d4781cbc
commit d1f690baa5
No known key found for this signature in database
GPG Key ID: 8A39CA0FA0C16E78
1 changed files with 3 additions and 2 deletions

@ -55,6 +55,7 @@ using namespace df::enums;
DFHACK_PLUGIN("liquids"); DFHACK_PLUGIN("liquids");
REQUIRE_GLOBAL(world); REQUIRE_GLOBAL(world);
static const char * HISTORY_FILE = "dfhack-config/liquids.history";
CommandHistory liquids_hist; CommandHistory liquids_hist;
command_result df_liquids (color_ostream &out, vector <string> & parameters); command_result df_liquids (color_ostream &out, vector <string> & parameters);
@ -62,7 +63,7 @@ command_result df_liquids_here (color_ostream &out, vector <string> & parameters
DFhackCExport command_result plugin_init ( color_ostream &out, std::vector <PluginCommand> &commands) DFhackCExport command_result plugin_init ( color_ostream &out, std::vector <PluginCommand> &commands)
{ {
liquids_hist.load("liquids.history"); liquids_hist.load(HISTORY_FILE);
commands.push_back(PluginCommand( commands.push_back(PluginCommand(
"liquids", "Place magma, water or obsidian.", "liquids", "Place magma, water or obsidian.",
df_liquids, true, df_liquids, true,
@ -80,7 +81,7 @@ DFhackCExport command_result plugin_init ( color_ostream &out, std::vector <Plug
DFhackCExport command_result plugin_shutdown ( color_ostream &out ) DFhackCExport command_result plugin_shutdown ( color_ostream &out )
{ {
liquids_hist.save("liquids.history"); liquids_hist.save(HISTORY_FILE);
return CR_OK; return CR_OK;
} }