SRMP-Public/SRMP/Patches/Patch_FashionPod.cs
2023-05-29 22:23:11 +02:00

23 lines
No EOL
570 B
C#

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);
}
}
}