Although I have this in progress, my early tests suggest there's a reason they didn't have this functionality in place. Searching an area for a building is a fairly expensive operation to be performed in the CanStartRitualNow function, since that runs very frequently when a ritual spot is selected to decide on the Gizmos.
I have the logic more or less working for TryExecute, but it allows you to bring up the ritual confirm window and then just doesn't start the ritual unless the specified building is present (i.e nearby the start spot).
It may be better to just implement this as a customizable RitualTargetFilter, though showing that the ritual can't be started due to the lack of the building in the ritual confirm dialog is also potentially an option.
Although I have this in progress, my early tests suggest there's a reason they didn't have this functionality in place. Searching an area for a building is a fairly expensive operation to be performed in the CanStartRitualNow function, since that runs very frequently when a ritual spot is selected to decide on the Gizmos.
I have the logic more or less working for TryExecute, but it allows you to bring up the ritual confirm window and then just doesn't start the ritual unless the specified building is present (i.e nearby the start spot).
It may be better to just implement this as a customizable RitualTargetFilter, though showing that the ritual can't be started due to the lack of the building in the ritual confirm dialog is also potentially an option.