From 48c48baab4a718c7198259b8538425442052cfad Mon Sep 17 00:00:00 2001 From: Myk Taylor Date: Sat, 16 Sep 2023 19:08:38 -0700 Subject: [PATCH] allow semi-wild units to be butchered --- docs/changelog.txt | 1 + plugins/autobutcher.cpp | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/changelog.txt b/docs/changelog.txt index 6579cf1a8..fde3e40a6 100644 --- a/docs/changelog.txt +++ b/docs/changelog.txt @@ -57,6 +57,7 @@ Template for new versions: ## Fixes - Linux launcher: preserve LD_PRELOAD set by Steam, so Steam Overlay and game streaming works +- `autobutcher`: allow semi-wild units to be butchered again ## Misc Improvements diff --git a/plugins/autobutcher.cpp b/plugins/autobutcher.cpp index 483e29759..d3d8487de 100644 --- a/plugins/autobutcher.cpp +++ b/plugins/autobutcher.cpp @@ -746,7 +746,8 @@ static bool isInappropriateUnit(df::unit *unit) { static bool isProtectedUnit(df::unit *unit) { return Units::isWar(unit) // ignore war dogs etc || Units::isHunter(unit) // ignore hunting dogs etc - || Units::isMarkedForTraining(unit) // ignore units marked for any kind of training + || Units::isMarkedForWarTraining(unit) // ignore units marked for any kind of training + || Units::isMarkedForHuntTraining(unit) // ignore creatures in built cages which are defined as rooms to leave zoos alone // (TODO: better solution would be to allow some kind of slaughter cages which you can place near the butcher) || (isContainedInItem(unit) && isInBuiltCageRoom(unit)) // !!! see comments in isBuiltCageRoom()