public static void AllDestroyed(MineRock5 __instance, bool __result) { if (!Configs.EnableAutoPin.Value || !__result) { return; } if (__instance.name.Contains("Copper", StringComparison.OrdinalIgnoreCase)) { if (PinAuto.RemovePin(__instance.transform.position, PinAuto.CopData)) { Main.Log.LogInfo($"Removing Copper pin at '{__instance.transform.position.ToString("F0")}'\n"); } return; } if (__instance.name.Contains("Silver", StringComparison.OrdinalIgnoreCase)) { if (PinAuto.RemovePin(__instance.transform.position, PinAuto.SilData)) { Main.Log.LogInfo($"Removing Silver pin at '{__instance.transform.position.ToString("F0")}'\n"); } return; } }
public static void Postfix(TombStone __instance) { if (!Configs.RemoveAtRetrieval.Value || !__instance.m_nview.IsValid() || !__instance.m_nview.IsOwner() || __instance.m_container.IsInUse() || __instance.m_container.GetInventory().NrOfItems() > 0) { return; } PinAuto.RemovePin(__instance.transform.position, Minimap.PinType.Death); }
public static void Destroy(Destructible __instance) { if (!Configs.EnableAutoPin.Value) { return; } if (__instance.name.Contains("Tin", StringComparison.OrdinalIgnoreCase)) { if (PinAuto.RemovePin(__instance.transform.position, PinAuto.TinData)) { Main.Log.LogInfo($"Removing Tin pin at '{__instance.transform.position.ToString("F0")}'\n"); } return; } }
public static void Postfix(Player __instance) { if (!InvIsEmpty || !Configs.DontPinWhenInvIsEmpty.Value) { return; } var pos = __instance.transform.position; Main.Log.LogInfo($"Negating pin at '{pos.ToString("F0")}' because inventory was empty\n"); PinAuto.RemovePin(pos, PinType.Death); var pp = Game.instance.GetPlayerProfile(); pp.GetWorldData(ZNet.instance.GetWorldUID()).m_haveDeathPoint = false; pp.GetWorldData(ZNet.instance.GetWorldUID()).m_deathPoint = Vector3.zero; }