From b37d2b9e8138ad7b611776e342c08e789fd3956c Mon Sep 17 00:00:00 2001 From: Myk Taylor Date: Sat, 30 Nov 2024 01:36:35 -0800 Subject: [PATCH] don't mark visitors as hostile unless they are --- changelog.txt | 1 + internal/notify/notifications.lua | 1 + 2 files changed, 2 insertions(+) diff --git a/changelog.txt b/changelog.txt index 156060eab..fd18b433e 100644 --- a/changelog.txt +++ b/changelog.txt @@ -44,6 +44,7 @@ Template for new versions: - `emigration`: save-and-reload no longer resets the emigration cycle timeout - `geld`, `ungeld`: save-and-reload no longer loses changes done by `geld` and `ungeld` for units who are historical figures - `rejuvenate`: fix error when specifying ``--age`` parameter +- `gui/notify`: don't classify (peacefully) visiting night creatures as hostile ## Misc Improvements - `idle-crafting`: also support making shell crafts for workshops with linked input stockpiles diff --git a/internal/notify/notifications.lua b/internal/notify/notifications.lua index cd3341af6..a0e103fbd 100644 --- a/internal/notify/notifications.lua +++ b/internal/notify/notifications.lua @@ -71,6 +71,7 @@ local function for_hostile(fn, reverse) not dfhack.units.isFortControlled(unit) and not dfhack.units.isHidden(unit) and not dfhack.units.isAgitated(unit) and + (not unit.flags2.visitor or unit.flags2.visitor_uninvited) and dfhack.units.isDanger(unit) end, fn, reverse) end