mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-15 22:50:56 +00:00
more work
This commit is contained in:
parent
1cd97b5ef6
commit
50ffb7de12
@ -12,7 +12,9 @@ namespace QSB.TriggerSync
|
||||
QSBWorldSync.Init<QSBCharacterTrigger, CharacterAnimController>(x => x.playerTrackingZone);
|
||||
QSBWorldSync.Init<QSBSolanumTrigger, NomaiConversationManager>(x => x._watchPlayerVolume);
|
||||
QSBWorldSync.Init<QSBVesselCageTrigger, VesselWarpController>(x => x._cageTrigger);
|
||||
QSBWorldSync.Init<QSBShrineTrigger, QuantumShrine>(x => x._triggerVolume);
|
||||
QSBWorldSync.Init<QSBMaskZoneTrigger, MaskZoneController>(x => x._maskZoneTrigger);
|
||||
QSBWorldSync.Init<QSBInflationTrigger, CosmicInflationController>(x => x._smokeSphereTrigger);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,8 @@
|
||||
namespace QSB.TriggerSync.WorldObjects
|
||||
using QSB.Animation.NPC.WorldObjects;
|
||||
using QSB.Player;
|
||||
using QSB.WorldSync;
|
||||
|
||||
namespace QSB.TriggerSync.WorldObjects
|
||||
{
|
||||
public class QSBCharacterTrigger : QSBTrigger<CharacterAnimController>
|
||||
{
|
||||
@ -9,11 +13,10 @@
|
||||
AttachedObject.OnExit -= TriggerOwner.OnZoneExit;
|
||||
}
|
||||
|
||||
public override void OnRemoval()
|
||||
{
|
||||
base.OnRemoval();
|
||||
AttachedObject.OnEntry += TriggerOwner.OnZoneEntry;
|
||||
AttachedObject.OnExit += TriggerOwner.OnZoneExit;
|
||||
}
|
||||
protected override void OnEnter(PlayerInfo player)
|
||||
=> TriggerOwner.GetWorldObject<QSBCharacterAnimController>().AddPlayerToHeadZone(player);
|
||||
|
||||
protected override void OnExit(PlayerInfo player)
|
||||
=> TriggerOwner.GetWorldObject<QSBCharacterAnimController>().RemovePlayerFromHeadZone(player);
|
||||
}
|
||||
}
|
||||
|
18
QSB/TriggerSync/WorldObjects/QSBInflationTrigger.cs
Normal file
18
QSB/TriggerSync/WorldObjects/QSBInflationTrigger.cs
Normal file
@ -0,0 +1,18 @@
|
||||
using QSB.EyeOfTheUniverse.CosmicInflation;
|
||||
using QSB.Player;
|
||||
|
||||
namespace QSB.TriggerSync.WorldObjects
|
||||
{
|
||||
public class QSBInflationTrigger : QSBTrigger<CosmicInflationController>
|
||||
{
|
||||
public override void Init()
|
||||
{
|
||||
base.Init();
|
||||
AttachedObject.OnEntry -= TriggerOwner.OnEnterFogSphere;
|
||||
}
|
||||
|
||||
protected override void OnEnter(PlayerInfo player) => InflationManager.Instance.Enter(player);
|
||||
|
||||
protected override void OnExit(PlayerInfo player) { }
|
||||
}
|
||||
}
|
@ -1,4 +1,7 @@
|
||||
namespace QSB.TriggerSync.WorldObjects
|
||||
using QSB.EyeOfTheUniverse.MaskSync;
|
||||
using QSB.Player;
|
||||
|
||||
namespace QSB.TriggerSync.WorldObjects
|
||||
{
|
||||
public class QSBMaskZoneTrigger : QSBTrigger<MaskZoneController>
|
||||
{
|
||||
@ -9,11 +12,8 @@
|
||||
AttachedObject.OnExit -= TriggerOwner.OnExitMaskZone;
|
||||
}
|
||||
|
||||
public override void OnRemoval()
|
||||
{
|
||||
base.OnRemoval();
|
||||
AttachedObject.OnEntry += TriggerOwner.OnEnterMaskZone;
|
||||
AttachedObject.OnExit += TriggerOwner.OnExitMaskZone;
|
||||
}
|
||||
protected override void OnEnter(PlayerInfo player) => MaskManager.Instance.Enter(player);
|
||||
|
||||
protected override void OnExit(PlayerInfo player) => MaskManager.Instance.Exit(player);
|
||||
}
|
||||
}
|
||||
|
11
QSB/TriggerSync/WorldObjects/QSBShrineTrigger.cs
Normal file
11
QSB/TriggerSync/WorldObjects/QSBShrineTrigger.cs
Normal file
@ -0,0 +1,11 @@
|
||||
using QSB.Player;
|
||||
|
||||
namespace QSB.TriggerSync.WorldObjects
|
||||
{
|
||||
public class QSBShrineTrigger : QSBTrigger<QuantumShrine>
|
||||
{
|
||||
protected override void OnEnter(PlayerInfo player) => player.IsInShrine = true;
|
||||
|
||||
protected override void OnExit(PlayerInfo player) => player.IsInShrine = false;
|
||||
}
|
||||
}
|
@ -1,4 +1,8 @@
|
||||
namespace QSB.TriggerSync.WorldObjects
|
||||
using QSB.Animation.NPC.WorldObjects;
|
||||
using QSB.Player;
|
||||
using QSB.WorldSync;
|
||||
|
||||
namespace QSB.TriggerSync.WorldObjects
|
||||
{
|
||||
public class QSBSolanumTrigger : QSBTrigger<NomaiConversationManager>
|
||||
{
|
||||
@ -9,11 +13,10 @@
|
||||
AttachedObject.OnExit -= TriggerOwner.OnExitWatchVolume;
|
||||
}
|
||||
|
||||
public override void OnRemoval()
|
||||
{
|
||||
base.OnRemoval();
|
||||
AttachedObject.OnEntry += TriggerOwner.OnEnterWatchVolume;
|
||||
AttachedObject.OnExit += TriggerOwner.OnExitWatchVolume;
|
||||
}
|
||||
protected override void OnEnter(PlayerInfo player)
|
||||
=> TriggerOwner.GetWorldObject<QSBSolanumAnimController>().AddPlayerToHeadZone(player);
|
||||
|
||||
protected override void OnExit(PlayerInfo player)
|
||||
=> TriggerOwner.GetWorldObject<QSBSolanumAnimController>().RemovePlayerFromHeadZone(player);
|
||||
}
|
||||
}
|
||||
|
@ -85,6 +85,7 @@ namespace QSB.TriggerSync.WorldObjects
|
||||
}
|
||||
|
||||
DebugLog.DebugWrite($"{LogName} + {player.PlayerId}");
|
||||
OnEnter(player);
|
||||
}
|
||||
|
||||
public void Exit(PlayerInfo player)
|
||||
@ -96,6 +97,11 @@ namespace QSB.TriggerSync.WorldObjects
|
||||
}
|
||||
|
||||
DebugLog.DebugWrite($"{LogName} - {player.PlayerId}");
|
||||
OnExit(player);
|
||||
}
|
||||
|
||||
protected virtual void OnEnter(PlayerInfo player) { }
|
||||
|
||||
protected virtual void OnExit(PlayerInfo player) { }
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,7 @@
|
||||
namespace QSB.TriggerSync.WorldObjects
|
||||
using QSB.EyeOfTheUniverse.VesselSync;
|
||||
using QSB.Player;
|
||||
|
||||
namespace QSB.TriggerSync.WorldObjects
|
||||
{
|
||||
public class QSBVesselCageTrigger : QSBTrigger<VesselWarpController>
|
||||
{
|
||||
@ -8,10 +11,8 @@
|
||||
AttachedObject.OnExit -= TriggerOwner.OnExitCageTrigger;
|
||||
}
|
||||
|
||||
public override void OnRemoval()
|
||||
{
|
||||
base.OnRemoval();
|
||||
AttachedObject.OnExit += TriggerOwner.OnExitCageTrigger;
|
||||
}
|
||||
protected override void OnEnter(PlayerInfo player) => VesselManager.Instance.Enter(player);
|
||||
|
||||
protected override void OnExit(PlayerInfo player) => VesselManager.Instance.Exit(player);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user