From 5a1c3c7aa81d0ef25bd422fc53412f9d20da1637 Mon Sep 17 00:00:00 2001 From: Myk Taylor Date: Wed, 1 Feb 2023 22:30:56 -0800 Subject: [PATCH] remove unused vars copypastad from seedwatch --- plugins/nestboxes.cpp | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/plugins/nestboxes.cpp b/plugins/nestboxes.cpp index 8feee65f7..98becf170 100644 --- a/plugins/nestboxes.cpp +++ b/plugins/nestboxes.cpp @@ -51,7 +51,7 @@ static void set_config_bool(PersistentDataItem &c, int index, bool value) { static const int32_t CYCLE_TICKS = 100; // need to react quickly if eggs are unforbidden static int32_t cycle_timestamp = 0; // world->frame_counter at last cycle -static void do_cycle(color_ostream &out, int32_t *num_enabled_seeds, int32_t *num_disabled_seeds); +static void do_cycle(color_ostream &out); DFhackCExport command_result plugin_init(color_ostream &out, std::vector &commands) { DEBUG(config,out).print("initializing %s\n", plugin_name); @@ -112,16 +112,8 @@ DFhackCExport command_result plugin_onstatechange(color_ostream &out, state_chan } DFhackCExport command_result plugin_onupdate(color_ostream &out) { - if (is_enabled && world->frame_counter - cycle_timestamp >= CYCLE_TICKS) { - int32_t num_enabled_seeds, num_disabled_seeds; - do_cycle(out, &num_enabled_seeds, &num_disabled_seeds); - if (0 < num_enabled_seeds) - out.print("%s: enabled %d seed types for cooking\n", - plugin_name, num_enabled_seeds); - if (0 < num_disabled_seeds) - out.print("%s: protected %d seed types from cooking\n", - plugin_name, num_disabled_seeds); - } + if (is_enabled && world->frame_counter - cycle_timestamp >= CYCLE_TICKS) + do_cycle(out); return CR_OK; } @@ -129,7 +121,7 @@ DFhackCExport command_result plugin_onupdate(color_ostream &out) { // cycle logic // -static void do_cycle(color_ostream &out, int32_t *num_enabled_seed_types, int32_t *num_disabled_seed_types) { +static void do_cycle(color_ostream &out) { DEBUG(cycle,out).print("running %s cycle\n", plugin_name); // mark that we have recently run