move stuff

This commit is contained in:
JohnCorby 2022-01-12 19:18:59 -08:00
parent 2cbff8bb9a
commit 1cd97b5ef6
10 changed files with 85 additions and 20 deletions

View File

@ -17,6 +17,8 @@ using QSB.Tools.TranslatorTool.TranslationSync.WorldObjects;
using QSB.TornadoSync.Messages;
using QSB.TornadoSync.WorldObjects;
using QSB.TriggerSync;
using QSB.TriggerSync.Messages;
using QSB.TriggerSync.WorldObjects;
using QSB.Utility;
using QSB.WorldSync;
using System.Linq;

View File

@ -1,7 +1,8 @@
using QSB.Messaging;
using QSB.Player;
using QSB.TriggerSync.WorldObjects;
namespace QSB.TriggerSync
namespace QSB.TriggerSync.Messages
{
public class TriggerMessage : QSBBoolWorldObjectMessage<IQSBTrigger>
{

View File

@ -1,11 +1,12 @@
using QSB.Messaging;
using QSB.Player;
using QSB.TriggerSync.WorldObjects;
using QSB.Utility;
using QuantumUNET.Transport;
using System.Collections.Generic;
using System.Linq;
namespace QSB.TriggerSync
namespace QSB.TriggerSync.Messages
{
/// <summary>
/// always sent by host

View File

@ -1,4 +1,5 @@
using QSB.WorldSync;
using QSB.TriggerSync.WorldObjects;
using QSB.WorldSync;
namespace QSB.TriggerSync
{

View File

@ -0,0 +1,19 @@
namespace QSB.TriggerSync.WorldObjects
{
public class QSBCharacterTrigger : QSBTrigger<CharacterAnimController>
{
public override void Init()
{
base.Init();
AttachedObject.OnEntry -= TriggerOwner.OnZoneEntry;
AttachedObject.OnExit -= TriggerOwner.OnZoneExit;
}
public override void OnRemoval()
{
base.OnRemoval();
AttachedObject.OnEntry += TriggerOwner.OnZoneEntry;
AttachedObject.OnExit += TriggerOwner.OnZoneExit;
}
}
}

View File

@ -0,0 +1,19 @@
namespace QSB.TriggerSync.WorldObjects
{
public class QSBMaskZoneTrigger : QSBTrigger<MaskZoneController>
{
public override void Init()
{
base.Init();
AttachedObject.OnEntry -= TriggerOwner.OnEnterMaskZone;
AttachedObject.OnExit -= TriggerOwner.OnExitMaskZone;
}
public override void OnRemoval()
{
base.OnRemoval();
AttachedObject.OnEntry += TriggerOwner.OnEnterMaskZone;
AttachedObject.OnExit += TriggerOwner.OnExitMaskZone;
}
}
}

View File

@ -0,0 +1,19 @@
namespace QSB.TriggerSync.WorldObjects
{
public class QSBSolanumTrigger : QSBTrigger<NomaiConversationManager>
{
public override void Init()
{
base.Init();
AttachedObject.OnEntry -= TriggerOwner.OnEnterWatchVolume;
AttachedObject.OnExit -= TriggerOwner.OnExitWatchVolume;
}
public override void OnRemoval()
{
base.OnRemoval();
AttachedObject.OnEntry += TriggerOwner.OnEnterWatchVolume;
AttachedObject.OnExit += TriggerOwner.OnExitWatchVolume;
}
}
}

View File

@ -1,12 +1,13 @@
using OWML.Common;
using QSB.Messaging;
using QSB.Player;
using QSB.TriggerSync.Messages;
using QSB.Utility;
using QSB.WorldSync;
using System.Collections.Generic;
using UnityEngine;
namespace QSB.TriggerSync
namespace QSB.TriggerSync.WorldObjects
{
public interface IQSBTrigger : IWorldObject
{
@ -97,20 +98,4 @@ namespace QSB.TriggerSync
DebugLog.DebugWrite($"{LogName} - {player.PlayerId}");
}
}
public class QSBCharacterTrigger : QSBTrigger<CharacterAnimController>
{
}
public class QSBSolanumTrigger : QSBTrigger<NomaiConversationManager>
{
}
public class QSBVesselCageTrigger : QSBTrigger<VesselWarpController>
{
}
public class QSBMaskZoneTrigger : QSBTrigger<MaskZoneController>
{
}
}

View File

@ -0,0 +1,17 @@
namespace QSB.TriggerSync.WorldObjects
{
public class QSBVesselCageTrigger : QSBTrigger<VesselWarpController>
{
public override void Init()
{
base.Init();
AttachedObject.OnExit -= TriggerOwner.OnExitCageTrigger;
}
public override void OnRemoval()
{
base.OnRemoval();
AttachedObject.OnExit += TriggerOwner.OnExitCageTrigger;
}
}
}

View File

@ -2,6 +2,7 @@
using QSB.ConversationSync.Patches;
using QSB.LogSync;
using QSB.TriggerSync;
using QSB.TriggerSync.WorldObjects;
using QSB.Utility;
using System;
using System.Collections.Generic;