ideology compatibility

This commit is contained in:
c0ffee12 2021-07-24 07:32:04 -07:00
parent bc23c0d62f
commit 61fa2feb26
6 changed files with 51 additions and 1 deletions

View file

@ -22,5 +22,22 @@ namespace RJW_Events
return RCellFinder.TryFindGatheringSpot(organizer, this.def, false, out spot);
}
public override bool CanExecute(Map map, Pawn organizer = null)
{
if(ModLister.IdeologyInstalled)
{
var ideo = Faction.OfPlayer.ideos.PrimaryIdeo;
if (!ideo.HasPrecept(DefDatabase<PreceptDef>.GetNamed("Lovin_FreeApproved", true)))
{
return false;
}
}
return base.CanExecute(map, organizer);
}
}
}