Skip to content

Commit

Permalink
Prepare 1.7.14 for release on EXILED
Browse files Browse the repository at this point in the history
  • Loading branch information
PatPeter committed Apr 16, 2022
1 parent 5168127 commit 5881627
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 18 deletions.
19 changes: 16 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,19 @@ This is a plugin for Exiled 2.0 that prevents SCP-049-2 from commiting suicide.
## Configuration Settings
Key | Value Type | Default Value | Description
--- | --- | --- | ---
IsEnabled | boolean | true | `Enable` or `Disable` the plugin on each server
RecallCD | float | 20 | How long should the cooldown on recall be
ZombieDmg | float | 0 | How much damage a zombie takes from atempting suicide
is_enabled | boolean | true | Is the plugin enabled?
allow_recall | boolean | false | Enable or disable SCP-049 using .recall to teleport zombies back.
allow_vent | boolean | false | Enable or disable SCP-173 ~~using .vent to teleport to another SCP~~ BEING A SUSSY BAKA.
allow_unstuck | boolean | false | Enable or disable command for when players get stuck in the map or outside of it.
respawn_zombie_ragequits | boolean | false | Enable or disable respawning players who ragequit the game after being killed by SCP-049.
recall_cooldown | float | 20 | How many seconds between each use of .recall?
vent_cooldown | float | 40 | How many seconds between each use of .vent?
unstuck_time | int | 300 | How long does a player need to be in the same room in order to be considered stuck?
hotline_calls: | Dictionary | |
Scp049 | float | -1 | -1 disabled, 0 teleports to spawn with no damage, > 0 do this % of damage to current health
Scp0492 | float | 0 | -1 disabled, 0 teleports to spawn with no damage, > 0 do this % of damage to current health
Scp096 | float | -1 | -1 disabled, 0 teleports to spawn with no damage, > 0 do this % of damage to current health
Scp106 | float | -1 | -1 disabled, 0 teleports to spawn with no damage, > 0 do this % of damage to current health
Scp173 | float | -1 | -1 disabled, 0 teleports to spawn with no damage, > 0 do this % of damage to current health
Scp93953 | float | -1 | -1 disabled, 0 teleports to spawn with no damage, > 0 do this % of damage to current health
Scp93989 | float | -1 | -1 disabled, 0 teleports to spawn with no damage, > 0 do this % of damage to current health
6 changes: 6 additions & 0 deletions ZombieSuicideHotline.sln
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ VisualStudioVersion = 15.0.27130.2026
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ZombieSuicideHotline", "ZombieSuicideHotline\ZombieSuicideHotline.csproj", "{0952A53A-A70E-4DAA-86A6-6560F2F3607B}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{221A4810-267D-4292-AB2F-35EEE33D727C}"
ProjectSection(SolutionItems) = preProject
.gitignore = .gitignore
README.md = README.md
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down
16 changes: 8 additions & 8 deletions ZombieSuicideHotline/Config.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,19 @@ public class Config : IConfig {
[Description("Enable or disable SCPs using .Unstuck to teleport to spawn.")]
public bool AllowUnstuck { get; set; } = false;

[Description("Time till Unstuck")]
public int UnstuckTime { get; set; } = 300;

[Description("Enable or disable respawning players who ragequit the game after being killed by SCP-049.")]
public bool RespawnZombieRagequits { get; set; } = false;

[Description("How long between each use of .recall?")]
public float RecallCooldown { get; set; } = 20f;
[Description("How many seconds between each use of .recall?")]
public float RecallCooldown { get; set; } = 120f;

[Description("How long between each use of .vent?")]
public float VentCooldown { get; set; } = 40f;
[Description("How many seconds between each use of .vent?")]
public float VentCooldown { get; set; } = 300f;

[Description("How long does a player need to be in the same room in order to be considered stuck?")]
public int UnstuckTime { get; set; } = 300;

[Description("A list of classes that should be able to call the suicide hotline and what percent of their health is removed.")]
[Description("A list of classes that should be able to call the suicide hotline and what percent of their health is removed.")]
public Dictionary<string, float> HotlineCalls { get; set; } = new Dictionary<string, float>
{
{
Expand Down
2 changes: 1 addition & 1 deletion ZombieSuicideHotline/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,6 @@ static internal class AssemblyInfo
/// <summary>
/// The AssemblyFileVersion of this web part
/// </summary>
internal const string Version = "1.7.13";
internal const string Version = "1.7.14";
}
}
7 changes: 4 additions & 3 deletions ZombieSuicideHotline/StuckCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,12 @@ public bool Execute(ArraySegment<string> arguments, ICommandSender sender, out s
}
else
{
response = ".Stuck is not enabled.";
response = ".stuck is not enabled.";
return false;
}
return true;
}

public IEnumerator<float> UnstuckPlayer(Player player, Room room)
{
int timer = 0;
Expand All @@ -54,12 +55,12 @@ public IEnumerator<float> UnstuckPlayer(Player player, Room room)
timer += 10;
if (player.CurrentRoom != room)
{
player.Broadcast(5, "You have left the room, Unstuck canceled");
player.Broadcast(5, "You have left the room, unstuck canceled.");
leftroom = true;
break;
}
}
if(!leftroom)
if (!leftroom)
{
player.Position = player.Role.GetRandomSpawnProperties().Item1;
}
Expand Down
6 changes: 3 additions & 3 deletions ZombieSuicideHotline/VentCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ class VentCommand : ICommand

public string Description => "Allows SCP-173 to teleport to other SCPs.";

public bool Execute(ArraySegment<string> arguments, ICommandSender sender, out string response)
public float LastTime = 0;

public bool Execute(ArraySegment<string> arguments, ICommandSender sender, out string response)
{
response = "";
if (Plugin.Instance.Config.AllowVent)
Expand Down Expand Up @@ -57,8 +59,6 @@ public bool Execute(ArraySegment<string> arguments, ICommandSender sender, out s
return true;
}

public float LastTime = 0;

public bool TimerFunction()
{
if (LastTime + Plugin.Instance.Config.VentCooldown < Time.time)
Expand Down

0 comments on commit 5881627

Please sign in to comment.