Files
RickGrymes e31e5947f4 Hostile animal AI, weighted hatcher, enlist
Add hostile-animal behavior and AI: new MentalState_HostileAnimal, JobGiver_HostileAnimal and HediffComp_HostileAnimal (with properties) to force hostile mental states and target selection for animals.

Introduce weighted hatcher support: add WeightedHatchEntry and CompProperties_HatcherCustom.weightedPawns, plus CompHatcherCustom.PickKind() and simplified Hatch() that picks a PawnKindDef by weight/secondary fallback.

Adjust Enlist code: remove guest/world-pawn pass in ProvisionsInfo pawn generation and improve WorldObjectCompEnlist settlement selection with a non-hostile fallback if no same-faction destinations exist.

Add a new soundCast entry to Abilities_Core.xml and update compiled assemblies accordingly.
2026-05-15 00:11:15 -05:00

24 lines
538 B
C#

using System.Collections.Generic;
namespace FCP.Core;
public class CompProperties_HatcherCustom : CompProperties
{
public float hatcherDaystoHatch = 1f;
public PawnKindDef hatcherPawn;
public float secondaryOverrideChance = 0f;
public PawnKindDef secondaryPawn;
public List<WeightedHatchEntry> weightedPawns;
public CompProperties_HatcherCustom()
{
compClass = typeof(CompHatcherCustom);
}
}
public class WeightedHatchEntry
{
public PawnKindDef pawnKind;
public float weight = 1f;
}