From e155986c1a94778045b2c20360b08c3c3e6c703e Mon Sep 17 00:00:00 2001 From: Myk Taylor Date: Mon, 12 Aug 2024 10:21:25 -0700 Subject: [PATCH] guard debug output with a DEBUG check --- timestream.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/timestream.lua b/timestream.lua index 89ee941f6..bf69f2a47 100644 --- a/timestream.lua +++ b/timestream.lua @@ -100,7 +100,9 @@ end local function check_new_unit(unit_id) local unit = df.unit.find(unit_id) if not unit then return end - print('registering new unit', unit.id, dfhack.units.getReadableName(unit)) + if DEBUG >= 3 then + print('registering new unit', unit.id, dfhack.units.getReadableName(unit)) + end register_birthday(unit) end