Skip to content

Commit

Permalink
Update vo v0.6.7
Browse files Browse the repository at this point in the history
  • Loading branch information
Substrata1 committed Jul 17, 2024
1 parent fe241b7 commit 6be20bd
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 2 deletions.
21 changes: 20 additions & 1 deletion 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.6")]
[Info("Inbound", "Substrata", "0.6.7")]
[Description("Broadcasts notifications when patrol helicopters, supply drops, cargo ships, etc. are inbound")]

class Inbound : RustPlugin
Expand Down Expand Up @@ -103,6 +103,17 @@ void OnBradleyApcInitialize(BradleyAPC apc)
});
}

void OnEntitySpawned(TravellingVendor travellingVendor)
{
if (!initialized) return;

NextTick(() =>
{
if (travellingVendor == null || travellingVendor.IsDestroyed) return;
SendInboundMessage(Lang("TravellingVendor", null, Location(travellingVendor.transform.position)), configData.alerts.travellingVendor);
});
}

void OnExcavatorResourceSet(ExcavatorArm arm, string resourceName, BasePlayer player)
{
if (!initialized) return;
Expand Down Expand Up @@ -544,6 +555,8 @@ public class Alerts
public bool ch47 { get; set; }
[JsonProperty(PropertyName = "Bradley APC Alerts")]
public bool bradleyAPC { get; set; }
[JsonProperty(PropertyName = "Travelling Vendor Alerts")]
public bool travellingVendor { get; set; }
[JsonProperty(PropertyName = "Excavator Activated Alerts")]
public bool excavator { get; set; }
[JsonProperty(PropertyName = "Excavator Supply Request Alerts")]
Expand Down Expand Up @@ -662,6 +675,7 @@ private ConfigData GetBaseConfig()
cargoPlane = true,
ch47 = true,
bradleyAPC = true,
travellingVendor = true,
excavator = true,
excavatorSupply = true,
hackableCrateSpawn = true,
Expand Down Expand Up @@ -739,6 +753,10 @@ private void UpdateConfigValues()
{
configData.alerts.cargoShipHarbor = baseConfig.alerts.cargoShipHarbor;
}
if (configData.Version < new Core.VersionNumber(0, 6, 7))
{
configData.alerts.travellingVendor = baseConfig.alerts.travellingVendor;
}
configData.Version = Version;
PrintWarning("Config update completed!");
}
Expand Down Expand Up @@ -777,6 +795,7 @@ protected override void LoadDefaultMessages()
["CargoPlane_"] = "{0}Cargo Plane inbound{1}{2}",
["CH47"] = "Chinook inbound{0}{1}",
["BradleyAPC"] = "Bradley APC inbound{0}",
["TravellingVendor"] = "Travelling Vendor inbound{0}",
["Excavator_"] = "{0} has activated The Excavator{1}",
["ExcavatorSupplyRequest"] = "{0} has requested a supply drop{1}",
["HackableCrateSpawned"] = "Hackable Crate has spawned{0}",
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"Cargo Plane Alerts": true,
"CH47 Chinook Alerts": true,
"Bradley APC Alerts": true,
"Travelling Vendor Alerts": true,
"Excavator Activated Alerts": true,
"Excavator Supply Request Alerts": true,
"Hackable Crate Alerts": true,
Expand Down Expand Up @@ -61,7 +62,7 @@
"Version (Do not modify)": {
"Major": 0,
"Minor": 6,
"Patch": 6
"Patch": 7
}
}
```
Expand All @@ -83,6 +84,7 @@
"CargoPlane_": "{0}Cargo Plane inbound{1}{2}",
"CH47": "Chinook inbound{0}{1}",
"BradleyAPC": "Bradley APC inbound{0}",
"TravellingVendor": "Travelling Vendor inbound{0}",
"Excavator_": "{0} has activated The Excavator{1}",
"ExcavatorSupplyRequest": "{0} has requested a supply drop{1}",
"HackableCrateSpawned": "Hackable Crate has spawned{0}",
Expand Down

0 comments on commit 6be20bd

Please sign in to comment.