Faction Urgency Function
Posted: Fri Nov 30, 2018 9:59 am
Hello!
I'm not sure if I'm missing something (maybe a bug?), but why does the faction urgency function return the negative affinity towards the other faction?
I'm not sure if I'm missing something (maybe a bug?), but why does the faction urgency function return the negative affinity towards the other faction?
Code: Select all
public class FactionUrgencyFunction : UrgencyFunction
{
public override string typeName { get { return "By Faction"; } }
public override float Compute(WorldModel worldModel)
{
var observerFaction = worldModel.observer.entityType.GetFaction();
var otherFaction = worldModel.observed.entityType.GetFaction();
return worldModel.observed.count * -observerFaction.GetAffinity(otherFaction);
}
}