mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-02-20 15:41:01 +00:00
Merge remote-tracking branch 'origin/alarm-totems' into dev
This commit is contained in:
commit
3f1bd48762
@ -1,13 +0,0 @@
|
||||
using QSB.EchoesOfTheEye.AlarmTotemSync.WorldObjects;
|
||||
using QSB.Messaging;
|
||||
using QSB.Patches;
|
||||
|
||||
namespace QSB.EchoesOfTheEye.AlarmTotemSync.Messages;
|
||||
|
||||
public class TotemFaceOpenMessage : QSBWorldObjectMessage<QSBAlarmTotem, bool>
|
||||
{
|
||||
public TotemFaceOpenMessage(bool open) : base(open) { }
|
||||
|
||||
public override void OnReceiveRemote() =>
|
||||
QSBPatch.RemoteCall(() => WorldObject.AttachedObject.SetFaceOpen(Data));
|
||||
}
|
@ -12,29 +12,6 @@ public class AlarmTotemPatches : QSBPatch
|
||||
{
|
||||
public override QSBPatchTypes Type => QSBPatchTypes.OnClientConnect;
|
||||
|
||||
[HarmonyPrefix]
|
||||
[HarmonyPatch(typeof(AlarmTotem), nameof(AlarmTotem.SetFaceOpen))]
|
||||
private static void SetFaceOpen(AlarmTotem __instance, bool open)
|
||||
{
|
||||
if (Remote)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (__instance._isFaceOpen == open)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (!QSBWorldSync.AllObjectsReady)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
__instance.GetWorldObject<QSBAlarmTotem>()
|
||||
.SendMessage(new TotemFaceOpenMessage(open));
|
||||
}
|
||||
|
||||
[HarmonyPrefix]
|
||||
[HarmonyPatch(typeof(AlarmTotem), nameof(AlarmTotem.OnSectorOccupantAdded))]
|
||||
private static void OnSectorOccupantAdded(AlarmTotem __instance, SectorDetector sectorDetector)
|
||||
|
@ -15,7 +15,6 @@ public class QSBAlarmTotem : WorldObject<AlarmTotem>
|
||||
|
||||
public override void SendInitialState(uint to)
|
||||
{
|
||||
this.SendMessage(new TotemFaceOpenMessage(AttachedObject._isFaceOpen) { To = to });
|
||||
this.SendMessage(new TotemEnabledMessage(AttachedObject.enabled) { To = to });
|
||||
this.SendMessage(new TotemVisibleForMessage(VisibleFor) { To = to });
|
||||
}
|
||||
|
@ -60,7 +60,7 @@ public class DebugActions : MonoBehaviour, IAddComponentOnStart
|
||||
{
|
||||
var relativeLocation = new RelativeLocationData(Vector3.up * 2 + Vector3.forward * 2, Quaternion.identity, Vector3.zero);
|
||||
|
||||
var location = Keyboard.current[Key.LeftShift].isPressed ? DreamArrivalPoint.Location.Zone4 : DreamArrivalPoint.Location.Zone3;
|
||||
var location = Keyboard.current[Key.LeftShift].isPressed ? DreamArrivalPoint.Location.Zone4 : DreamArrivalPoint.Location.Zone2;
|
||||
var arrivalPoint = Locator.GetDreamArrivalPoint(location);
|
||||
var dreamCampfire = Locator.GetDreamCampfire(location);
|
||||
if (Locator.GetToolModeSwapper().GetItemCarryTool().GetHeldItemType() != ItemType.DreamLantern)
|
||||
|
Loading…
x
Reference in New Issue
Block a user