Skip to content

Commit

Permalink
1.0.3
Browse files Browse the repository at this point in the history
Updated PluginAPI to 12.0.0
Added new feature AutoOpen
  • Loading branch information
MrAfitol committed Jan 17, 2023
1 parent d9e3e9a commit e6dd49f
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 7 deletions.
2 changes: 1 addition & 1 deletion BetterDrops/BetterDrops.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public class BetterDrops
public Config Config;

[PluginPriority(LoadPriority.Highest)]
[PluginEntryPoint("BetterDrops", "1.0.2", "Plugin to summon and spawn drops.", "Jesus-QC, update by MrAfitol")]
[PluginEntryPoint("BetterDrops", "1.0.3", "Plugin to summon and spawn drops.", "Jesus-QC, update by MrAfitol")]
public void LoadPlugin()
{
Instance = this;
Expand Down
2 changes: 1 addition & 1 deletion BetterDrops/BetterDrops.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
<HintPath>..\..\..\..\Documents\SCP_References\NorthwoodLib.dll</HintPath>
</Reference>
<Reference Include="PluginAPI, Version=12.0.0.0, Culture=neutral, processorArchitecture=AMD64">
<HintPath>..\packages\Northwood.PluginAPI.12.0.0-rc.6\lib\net48\PluginAPI.dll</HintPath>
<HintPath>..\packages\Northwood.PluginAPI.12.0.0\lib\net48\PluginAPI.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
Expand Down
4 changes: 3 additions & 1 deletion BetterDrops/Config.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@

public class Config
{
public bool IsEnabled { get; set; } = true;
[Description("The configs of the MTF drop waves.")]
public float AutoOpen { get; set; } = 15f;

[Description("The configs of the MTF drop waves.")]
public DropConfig MtfDropWave { get; set; } = new DropConfig();

[Description("The configs of the Chaos drop waves.")]
public DropConfig ChaosDropWave { get; set; } = new DropConfig();

Expand Down
9 changes: 8 additions & 1 deletion BetterDrops/Features/Components/DropController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ private void OnCollisionEnter()

DeployBalloon();
AddTrigger();
if (BetterDrops.Instance.Config.AutoOpen > 0)
Invoke(nameof(OpenDrop), BetterDrops.Instance.Config.AutoOpen);
}

private void DeployBalloon()
Expand Down Expand Up @@ -145,10 +147,15 @@ private void OnTriggerEnter(Collider other)
if (_triggered || !_collided || !other.gameObject.name.Contains("Player"))
return;

OpenDrop();
}

private void OpenDrop()
{
_triggered = true;

Transform t = transform;

for (int i = 0; i < t.childCount - 2; i++)
{
t.GetChild(i).gameObject.AddComponent<DisappearController>().startPos = t.position;
Expand Down
4 changes: 2 additions & 2 deletions BetterDrops/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.2.0")]
[assembly: AssemblyFileVersion("1.0.2.0")]
[assembly: AssemblyVersion("1.0.3.0")]
[assembly: AssemblyFileVersion("1.0.3.0")]
2 changes: 1 addition & 1 deletion BetterDrops/packages.config
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Northwood.PluginAPI" version="12.0.0-rc.6" targetFramework="net48" />
<package id="Northwood.PluginAPI" version="12.0.0" targetFramework="net48" />
<package id="YamlDotNet" version="11.0.1" targetFramework="net48" />
</packages>

0 comments on commit e6dd49f

Please sign in to comment.