Compare commits
4 Commits
14467eacde
...
b678671b62
Author | SHA1 | Date | |
---|---|---|---|
|
b678671b62 | ||
f437fe9bae | |||
ddb192a278 | |||
477dc4c297 |
@ -134,18 +134,6 @@ public class BloodFueledHandler : CustomClassHandler
|
||||
{
|
||||
public override void HandleSpawn(Player player, CustomClassConfig config, Random random)
|
||||
{
|
||||
player.SendBroadcast("You are SCP-939-<color=#C50000>Blood Fueled</color> \n Your stamina bar has been replaced by a <color=#C50000>blood meter</color>. \n You refill it by <color=#C50000>damaging</color> or <color=#C50000>killing</color> Humans. \n <color=#C50000><b>Don't let it run out.</color></b>", CustomClasses.BroadcastDuration);
|
||||
const string customInfo = "<color=#C50000>Blood Fueled</color>";
|
||||
if (!Player.ValidateCustomInfo(customInfo, out var reason))
|
||||
{
|
||||
Logger.Error($"Invalid custom info for Blood Fueled: {reason}");
|
||||
}
|
||||
else
|
||||
{
|
||||
player.CustomInfo = customInfo;
|
||||
player.InfoArea |= PlayerInfoArea.CustomInfo;
|
||||
}
|
||||
|
||||
player.MaxHumeShield = 0;
|
||||
player.HumeShield = 0;
|
||||
player.MaxHealth = 3500;
|
||||
@ -154,4 +142,9 @@ public class BloodFueledHandler : CustomClassHandler
|
||||
player.EnableEffect<DisableStaminaRegenEffect>(1, float.PositiveInfinity);
|
||||
player.EnableEffect<BloodFueledStaminaEffect>(1, float.PositiveInfinity);
|
||||
}
|
||||
|
||||
public override void SendSpawnMessage(Player player, CustomClassConfig config)
|
||||
{
|
||||
player.SendBroadcast("You are SCP-939-<color=#C50000>Blood Fueled</color> \n Your stamina bar has been replaced by a <color=#C50000>blood meter</color>. \n You refill it by <color=#C50000>damaging</color> or <color=#C50000>killing</color> Humans. \n <color=#C50000><b>Don't let it run out.</color></b>", CustomClasses.BroadcastDuration);
|
||||
}
|
||||
}
|
@ -464,7 +464,7 @@ public abstract class CustomClassHandler: ICustomClassHandler
|
||||
//Intentionally left blank
|
||||
}
|
||||
|
||||
protected virtual void SendSpawnMessage(Player player, CustomClassConfig config)
|
||||
public virtual void SendSpawnMessage(Player player, CustomClassConfig config)
|
||||
{
|
||||
if (config.Name.IsEmpty()) return;
|
||||
player.SendBroadcast($"You are a {config.FullCustomInfo}!", CustomClasses.BroadcastDuration);
|
||||
@ -967,6 +967,8 @@ public sealed class BloodFueledConfig : CustomClassConfig
|
||||
public override double ChancePerPlayer { get; set; } = 1.0;
|
||||
public override int MaxSpawns { get; set; } = int.MaxValue;
|
||||
public override RoleTypeId RequiredRole { get; set; } = RoleTypeId.Scp939;
|
||||
public override string Name { get; init; } = "Blood Fueled";
|
||||
public override string Color { get; init; } = "#C50000";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -12,7 +12,7 @@ namespace CustomClasses;
|
||||
|
||||
public class NegromancerHandler : CustomClassHandler
|
||||
{
|
||||
protected override void SendSpawnMessage(Player player, CustomClassConfig config)
|
||||
public override void SendSpawnMessage(Player player, CustomClassConfig config)
|
||||
{
|
||||
player.SendBroadcast("You are the <color=#6e2e99>Negromancer</color>! Revived players become your <color=#3c1361>Shadow</color>.", CustomClasses.BroadcastDuration);
|
||||
}
|
||||
|
@ -6,6 +6,12 @@ public static class PlayerExtensions
|
||||
{
|
||||
public static string GetExtendedClass(this Player player)
|
||||
{
|
||||
return "";
|
||||
foreach (var classManagerConfig in CustomClasses.Instance.ClassManager.Configs.Where(classManagerConfig => player.CustomInfo == classManagerConfig.Value.FullCustomInfo &&
|
||||
!classManagerConfig.Value.Name.IsEmpty()))
|
||||
{
|
||||
return classManagerConfig.Value.Name;
|
||||
}
|
||||
|
||||
return player.Role.ToString();
|
||||
}
|
||||
}
|
@ -284,10 +284,13 @@ public class SerpentsHandHandler : SimpleAddItemHandler
|
||||
|
||||
player.EnableEffect<MovementBoost>(20, 30);
|
||||
|
||||
player.SendBroadcast("You're a <color=#2E8B57>Serpent's Hand</color> member!", CustomClasses.BroadcastDuration);
|
||||
|
||||
player.EnableEffect<SpawnProtected>(1, 20f);
|
||||
}
|
||||
|
||||
public override void SendSpawnMessage(Player player, CustomClassConfig config)
|
||||
{
|
||||
player.SendBroadcast("You're a <color=#2E8B57>Serpent's Hand</color> member!", CustomClasses.BroadcastDuration);
|
||||
}
|
||||
}
|
||||
|
||||
[CommandHandler(typeof(RemoteAdminCommandHandler))]
|
||||
|
@ -36,7 +36,7 @@ public class SetCClassCommand : ICommand
|
||||
var className = args[arguments.Offset + arguments.Count - 1].ToLower();
|
||||
var playerName = string.Join(" ", args.Skip(arguments.Offset).Take(arguments.Count - 1));
|
||||
|
||||
var player = Player.ReadyList.FirstOrDefault(x => x.Nickname == playerName || x.UserId == playerName);
|
||||
var player = Player.ReadyList.FirstOrDefault(x => x.Nickname == playerName || x.UserId == playerName || x.NetworkId.ToString() == playerName);
|
||||
if (player == null)
|
||||
{
|
||||
response = $"Player {playerName} not found";
|
||||
|
Loading…
x
Reference in New Issue
Block a user