This repository has been archived by the owner on Dec 30, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
389 additions
and
397 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
using System; | ||
using CommandSystem; | ||
|
||
namespace BetterDrops.Commands | ||
{ | ||
[CommandHandler(typeof(RemoteAdminCommandHandler))] | ||
public class BetterDropsCommand : ParentCommand | ||
{ | ||
public BetterDropsCommand() => LoadGeneratedCommands(); | ||
|
||
public sealed override void LoadGeneratedCommands() | ||
{ | ||
RegisterCommand(SpawnCommand.Instance); | ||
} | ||
|
||
protected override bool ExecuteParent(ArraySegment<string> arguments, ICommandSender sender, out string response) | ||
{ | ||
response = "Please, specify a valid subcommand! Available ones: spawn"; | ||
return false; | ||
} | ||
|
||
public override string Command { get; } = "BetterDrops"; | ||
public override string[] Aliases { get; } = Array.Empty<string>(); | ||
public override string Description { get; } = "BetterDrops parent command."; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
using System.Collections.Generic; | ||
using System.ComponentModel; | ||
|
||
namespace BetterDrops.Configs | ||
{ | ||
public class DropConfig | ||
{ | ||
[Description("Is the drop wave enabled.")] | ||
public bool IsEnabled { get; set; } = true; | ||
|
||
[Description("Number of drops in the spawn wave.")] | ||
public uint NumberOfDrops { get; set; } = 5; | ||
|
||
[Description("Items per drop, I suggest low values, if you do stupid things with this config it is your fault.")] | ||
public uint ItemsPerDrop { get; set; } = 1; | ||
|
||
[Description("Drop color. (It accepts Random or hex values like '#ffffff')")] | ||
public string Color { get; set; } = "Random"; | ||
|
||
[Description("The possible items inside the drop")] | ||
public List<ItemType> PossibleItems { get; set; } = new List<ItemType> {ItemType.Adrenaline, ItemType.Coin, ItemType.Medkit, ItemType.GrenadeFlash, ItemType.GrenadeHE, ItemType.Radio, ItemType.Painkillers, ItemType.ArmorCombat, ItemType.ArmorHeavy, ItemType.ArmorLight, ItemType.GunRevolver, ItemType.GunShotgun, ItemType.GunAK, ItemType.GunCOM15, ItemType.GunFSP9, ItemType.GunE11SR}; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
using System.Collections.Generic; | ||
using System.ComponentModel; | ||
|
||
namespace BetterDrops.Configs | ||
{ | ||
public class RandomDropConfigs | ||
{ | ||
[Description("The minimum time that has to happen until the first random drop.")] | ||
public ushort FirstRandomDropOffset { get; set; } = 120; | ||
|
||
[Description("Minimum time between random drops.")] | ||
public ushort MinRandomDropsInterval { get; set; } = 120; | ||
|
||
[Description("Maximum time between random drops.")] | ||
public ushort MaxRandomDropsInterval { get; set; } = 240; | ||
|
||
[Description("Random drop wave settings. (Here you can disable them)")] | ||
public DropConfig WaveSettings { get; set; } = new DropConfig(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
using UnityEngine; | ||
|
||
namespace BetterDrops.Features.Components | ||
{ | ||
public class DisappearController : MonoBehaviour | ||
{ | ||
public Vector3 startPos; | ||
|
||
private void Start() | ||
{ | ||
Rigidbody r = gameObject.AddComponent<Rigidbody>(); | ||
|
||
Vector3 dir = transform.position - startPos; | ||
|
||
r.AddForce(dir * 10, ForceMode.Impulse); | ||
} | ||
} | ||
} |
Oops, something went wrong.