SRMP-Public/SRMP/Patches/Patch_FashionPod.cs

23 lines
570 B
C#
Raw Permalink Normal View History

2023-05-29 22:23:11 +02:00
using HarmonyLib;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SRMultiplayer.Packets;
using SRMultiplayer.Networking;
namespace SRMultiplayer.Patches
{
[HarmonyPatch(typeof(FashionPod))]
[HarmonyPatch("Update")]
class FashionPod_Update
{
static bool Prefix(FashionPod __instance)
{
if (!Globals.IsMultiplayer) return true;
var gadget = __instance.GetComponentInParent<NetworkGadgetSite>();
return (gadget != null && gadget.IsLocal);
}
}
}