Skip to content

Commit 4481971

Browse files
committed
Added new announcement to fixUnit
1 parent af457f9 commit 4481971

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

changelog.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ Template for new versions:
2929
## New Tools
3030

3131
## New Features
32+
- `fix/loyaltycascade`: Added announcements for units who aren't renegades but still got removed from conflicts by makeown.remove_from_conflict in fixUnit
3233

3334
## Fixes
3435

fix/loyaltycascade.lua

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,14 @@ local function fixUnit(unit)
7777
makeown.clear_enemy_status(unit)
7878
end
7979

80-
return makeown.remove_from_conflict(unit) or fixed
80+
local calmed = makeown.remove_from_conflict(unit)
81+
82+
if calmed and not fixed then
83+
dfhack.gui.showAnnouncement(
84+
('loyaltycascade: %s is now removed from miscellaneous conflicts'):format(unit_name), COLOR_WHITE)
85+
end
86+
87+
return calmed or fixed
8188
end
8289

8390
local count = 0

0 commit comments

Comments
 (0)