quantum-space-buddies/QSB/TriggerSync/TriggerManager.cs

35 lines
964 B
C#
Raw Normal View History

2022-01-13 02:43:18 +00:00
using QSB.WorldSync;
2022-01-13 01:02:21 +00:00
using System.Linq;
namespace QSB.TriggerSync
{
public class TriggerManager : WorldObjectManager
{
public override WorldObjectType WorldObjectType => WorldObjectType.Both;
protected override void RebuildWorldObjects(OWScene scene)
{
2022-01-13 02:43:18 +00:00
QSBWorldSync.Init<QSBCharacterTrigger, OWTriggerVolume>(
QSBWorldSync.GetUnityObjects<CharacterAnimController>()
.Where(x => x.playerTrackingZone)
.Select(x => x.playerTrackingZone)
);
2022-01-13 01:02:21 +00:00
2022-01-13 02:43:18 +00:00
QSBWorldSync.Init<QSBSolanumTrigger, OWTriggerVolume>(
QSBWorldSync.GetUnityObjects<NomaiConversationManager>()
.Select(x => x._watchPlayerVolume)
);
QSBWorldSync.Init<QSBVesselCageTrigger, OWTriggerVolume>(
QSBWorldSync.GetUnityObjects<VesselWarpController>()
.Select(x => x._cageTrigger)
);
2022-01-13 01:02:21 +00:00
2022-01-13 02:43:18 +00:00
QSBWorldSync.Init<QSBMaskZoneTrigger, OWTriggerVolume>(
QSBWorldSync.GetUnityObjects<MaskZoneController>()
.Select(x => x._maskZoneTrigger)
);
2022-01-13 01:02:21 +00:00
}
}
}