Skip to content

Commit

Permalink
Update to v0.6.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Substrata1 committed Jun 20, 2022
1 parent 43c3265 commit dfead54
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions Inbound.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

namespace Oxide.Plugins
{
[Info("Inbound", "Substrata", "0.6.0")]
[Info("Inbound", "Substrata", "0.6.2")]
[Description("Broadcasts notifications when patrol helicopters, supply drops, cargo ships, etc. are inbound")]

class Inbound : RustPlugin
Expand All @@ -30,7 +30,7 @@ void OnEntitySpawned(BaseHelicopter heli)
{
NextTick(() =>
{
if (heli == null) return;
if (heli == null || heli.IsDestroyed) return;
SendInboundMessage(Lang("PatrolHeli", null, Location(heli.transform.position, null), Destination(heli.myAI.destination)), configData.alerts.patrolHeli);
});
}
Expand All @@ -39,7 +39,7 @@ void OnEntitySpawned(CargoShip ship)
{
timer.Once(2f, () =>
{
if (ship == null) return;
if (ship == null || ship.IsDestroyed) return;
SendInboundMessage(Lang("CargoShip_", null, Location(ship.transform.position, null), Destination(TerrainMeta.Path.OceanPatrolFar[ship.GetClosestNodeToUs()])), configData.alerts.cargoShip);
});
}
Expand All @@ -48,7 +48,7 @@ void OnEntitySpawned(CH47HelicopterAIController ch47)
{
timer.Once(2f, () =>
{
if (ch47 == null) return;
if (ch47 == null || ch47.IsDestroyed) return;
SendInboundMessage(Lang("CH47", null, Location(ch47.transform.position, null), Destination(ch47.GetMoveTarget())), configData.alerts.ch47 && (!configData.misc.hideRigCrates || !ch47.ShouldLand()));
});
}
Expand All @@ -57,7 +57,7 @@ void OnBradleyApcInitialize(BradleyAPC apc)
{
NextTick(() =>
{
if (apc == null) return;
if (apc == null || apc.IsDestroyed) return;
SendInboundMessage(Lang("BradleyAPC", null, Location(apc.transform.position, null)), configData.alerts.bradleyAPC);
});
}
Expand All @@ -67,7 +67,7 @@ void OnExcavatorResourceSet(ExcavatorArm arm, string resourceName, BasePlayer pl
if (arm == null || arm.IsOn()) return;
NextTick(() =>
{
if (arm == null || player == null || !arm.IsOn()) return;
if (player == null || arm == null || arm.IsDestroyed || !arm.IsOn()) return;
SendInboundMessage(Lang("Excavator_", null, player.displayName, Location(arm.transform.position, null, true)), configData.alerts.excavator);
});
}
Expand All @@ -76,7 +76,7 @@ void OnEntitySpawned(HackableLockedCrate crate)
{
NextTick(() =>
{
if (crate == null) return;
if (crate == null || crate.IsDestroyed) return;
SendInboundMessage(Lang("HackableCrateSpawned", null, Location(crate.transform.position, crate)), configData.alerts.hackableCrateSpawn && !HideCrateAlert(crate));
});
}
Expand All @@ -85,7 +85,7 @@ void CanHackCrate(BasePlayer player, HackableLockedCrate crate)
{
NextTick(() =>
{
if (player == null || crate == null || !crate.IsBeingHacked()) return;
if (player == null || crate == null || crate.IsDestroyed || !crate.IsBeingHacked()) return;
SendInboundMessage(Lang("HackingCrate", null, player.displayName, Location(crate.transform.position, crate)), configData.alerts.hackingCrate && !HideCrateAlert(crate));
});
}
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"Version (Do not modify)": {
"Major": 0,
"Minor": 6,
"Patch": 0
"Patch": 2
}
}
```
Expand Down

0 comments on commit dfead54

Please sign in to comment.