Skip to content

Commit

Permalink
Change the .retreat command to the .vent command
Browse files Browse the repository at this point in the history
  • Loading branch information
PatPeter committed Aug 23, 2021
1 parent d94fa7d commit 6e63933
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 15 deletions.
25 changes: 15 additions & 10 deletions ZombieSuicideHotline/PlayerHandlers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@ public void OnPlayerSpawn(SpawningEventArgs ev)
}
if (ev.RoleType == RoleType.Scp049)
{
player.Broadcast(10, "Use .recall to bring all your zombies to you");
player.Broadcast(10, "Use .recall to bring all your zombies to you.");
}
if (ev.RoleType == RoleType.Scp173)
{
player.Broadcast(10, "Use .retreat to teleport to other SCPs");
player.Broadcast(10, "Use .vent to escape NTF fire and travel to another SCP.");
}

if (Spawns.ContainsKey(ev.RoleType) == false)
Expand All @@ -73,11 +73,14 @@ public void OnPlayerSpawn(SpawningEventArgs ev)

public void OnPlayerDied(DiedEventArgs ev)
{
Player player = ev.Target;
if (ev.Target.Role == RoleType.Scp0492)
{
plugin.zombies[player.UserId].Disconnected = false;
}
if (plugin.Config.IsEnabled)
{
Player player = ev.Target;
if (ev.Target.Role == RoleType.Scp0492)
{
plugin.zombies[player.UserId].Disconnected = false;
}
}
}

public void OnPlayerHurt(HurtingEventArgs ev)
Expand All @@ -86,11 +89,13 @@ public void OnPlayerHurt(HurtingEventArgs ev)
plugin.Config.HotlineCalls.ContainsKey(ev.Target.Role.ToString()) &&
plugin.Config.HotlineCalls[ev.Target.Role.ToString()] != -1)
{
float originalAmount = ev.Amount;
float percentHealth = ev.Target.Health * plugin.Config.HotlineCalls[ev.Target.Role.ToString()];
ev.Target.Broadcast(new Broadcast("You called the Zombie Suicide Hotline and took " + Math.Min(originalAmount, percentHealth) + " damage instead of/same as " + originalAmount + " " + ev.DamageType + " damage.", 2));
if ((ev.DamageType == DamageTypes.Tesla || ev.DamageType == DamageTypes.Wall || ev.DamageType == DamageTypes.Decont))
{
float originalAmount = ev.Amount;
float percentHealth = ev.Target.Health * plugin.Config.HotlineCalls[ev.Target.Role.ToString()];
Log.Debug(ev.Target.Nickname + " called the SCP Suicide Hotline and took " + Math.Min(originalAmount, percentHealth) + " damage instead of/same as " + originalAmount + " " + ev.DamageType.name + " damage.");
ev.Target.Broadcast(new Broadcast("You called the SCP Suicide Hotline and took " + Math.Min(originalAmount, percentHealth) + " damage instead of/same as " + originalAmount + " " + ev.DamageType.name + " damage.", 2));

Player targetPlayer = GetTeleportTarget(ev.Target);
if (targetPlayer != null)
{
Expand Down
2 changes: 1 addition & 1 deletion ZombieSuicideHotline/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,6 @@ static internal class AssemblyInfo
/// <summary>
/// The AssemblyFileVersion of this web part
/// </summary>
internal const string Version = "1.6.10.64";
internal const string Version = "1.6.11.65";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
namespace ZombieSuicideHotline
{
[CommandHandler(typeof(ClientCommandHandler))]
class RetreatCommand : ICommand
class VentCommand : ICommand
{
public string Command => "retreat"; //Why is this called respawn?
public string Command => "vent";

public string[] Aliases => null;

Expand All @@ -35,7 +35,7 @@ public bool Execute(ArraySegment<string> arguments, ICommandSender sender, out s
}
else
{
response = "retreat is on cooldown for " + (Lasttime + Plugin.Singleton.Config.RetreatCooldown - Time.time).ToString();
response = "vent is on cooldown for " + (Lasttime + Plugin.Singleton.Config.RetreatCooldown - Time.time).ToString();
}
}
if (response == "")
Expand Down
2 changes: 1 addition & 1 deletion ZombieSuicideHotline/ZombieSuicideHotline.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="RetreatCommand.cs" />
<Compile Include="VentCommand.cs" />
<Compile Include="Plugin.cs" />
<Compile Include="PlayerHandlers.cs" />
<Compile Include="RecallCommand.cs" />
Expand Down

0 comments on commit 6e63933

Please sign in to comment.