/*▄▄▄ ███▄ ▄███▓ ▄████ ▄▄▄██▀▀▀▓█████▄▄▄█████▓ ▓█████▄ ▓██▒▀█▀ ██▒ ██▒ ▀█▒ ▒██ ▓█ ▀▓ ██▒ ▓▒ ▒██▒ ▄██▓██ ▓██░▒██░▄▄▄░ ░██ ▒███ ▒ ▓██░ ▒░ ▒██░█▀ ▒██ ▒██ ░▓█ ██▓▓██▄██▓ ▒▓█ ▄░ ▓██▓ ░ ░▓█ ▀█▓▒██▒ ░██▒░▒▓███▀▒ ▓███▒ ░▒████▒ ▒██▒ ░ ░▒▓███▀▒░ ▒░ ░ ░ ░▒ ▒ ▒▓▒▒░ ░░ ▒░ ░ ▒ ░░*/ using HarmonyLib; using Oxide.Core.Plugins; using System; namespace Oxide.Plugins { [Info("AlwaysHotSpot", "bmgjet", "1.0.3")] class AlwaysHotSpot : RustPlugin { [AutoPatch] [HarmonyPatch(typeof(TreeEntity), "DidHitMarker", new Type[] { typeof(HitInfo) })] internal class TreeEntity_DidHitMarker { [HarmonyPrefix] private static bool Prefix(HitInfo info, ref bool __result) { try { if (info != null) { __result = true; return false; } } catch { } return true; } } [AutoPatch] [HarmonyPatch(typeof(OreResourceEntity), "OnAttacked", new Type[] { typeof(HitInfo) })] internal class OreResourceEntity_OnAttacked { [HarmonyPrefix] private static bool Prefix(HitInfo info, OreResourceEntity __instance, ref OreHotSpot ____hotSpot) { try { if (info != null && __instance != null) { if (____hotSpot == null) { ____hotSpot = __instance.SpawnBonusSpot(info.HitPositionWorld); } ____hotSpot.transform.position = info.HitPositionWorld; ____hotSpot.SendNetworkUpdateImmediate(); } } catch { } return true; } } } }