再修动物
This commit is contained in:
Binary file not shown.
@@ -121,13 +121,28 @@ namespace ArachnaeSwarm
|
||||
var currentMealDef = dispenser.DispensableDef;
|
||||
if (currentMealDef == null) continue;
|
||||
|
||||
// Use the game's built-in social properness check.
|
||||
// This correctly handles colonists, prisoners, visitors, and animals (wild vs tame).
|
||||
// --- Start of refined access checks ---
|
||||
|
||||
// 1. Block hostile pawns.
|
||||
if (getter.HostileTo(Faction.OfPlayer))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
// 2. Block wild animals. Tamed player-faction animals are allowed.
|
||||
if (getter.RaceProps.Animal && getter.Faction != Faction.OfPlayer)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
// 3. Use the game's built-in social properness check for things like prisoner access.
|
||||
if (!dispenser.IsSociallyProper(getter))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
// --- End of refined access checks ---
|
||||
|
||||
// Check if the dispenser is usable
|
||||
if (!dispenser.CanDispenseNow || dispenser.IsForbidden(getter) || !eater.WillEat(currentMealDef, getter))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user