Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ Template for new versions:
## New Tools

## New Features
- `fix/loyaltycascade`: Added announcements for units who aren't renegades but still got removed from conflicts by makeown.remove_from_conflict in fixUnit
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is too technical. I suggest removing the bit about by makeown.remove_from_conflict in fixUnit.


## Fixes

Expand Down
9 changes: 8 additions & 1 deletion fix/loyaltycascade.lua
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,14 @@ local function fixUnit(unit)
makeown.clear_enemy_status(unit)
end

return makeown.remove_from_conflict(unit) or fixed
local calmed = makeown.remove_from_conflict(unit)

if calmed and not fixed then
dfhack.gui.showAnnouncement(
('loyaltycascade: %s is now removed from miscellaneous conflicts'):format(unit_name), COLOR_WHITE)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this would be better wording:
%s has been removed from one or more existing conflicts. (%s may re-join existing conflicts.)

end

return calmed or fixed
end

local count = 0
Expand Down
Loading