diff --git a/SCP-343/SCP_343.cs b/SCP-343/SCP_343.cs index 02c0556..057071d 100644 --- a/SCP-343/SCP_343.cs +++ b/SCP-343/SCP_343.cs @@ -10,7 +10,7 @@ namespace SCP_343 name = "SCP-343", description = "SCP-343 is a passive immortal D-Class Personnel. He spawns with one Flashlight and any weapon he picks up is morphed to prevent violence. He seeks to help out who he deems worthy.", id = "Mith.SCP-343", - version = "1.3.6", + version = "1.3.7", SmodMajor = 3, SmodMinor = 3, SmodRevision = 0 diff --git a/SCP-343/SCP_343Commands.cs b/SCP-343/SCP_343Commands.cs index 51fce42..ea88911 100644 --- a/SCP-343/SCP_343Commands.cs +++ b/SCP-343/SCP_343Commands.cs @@ -40,12 +40,21 @@ public string[] OnCall(ICommandSender sender, string[] args) { Playa.ChangeRole(Smod2.API.Role.CLASSD, true, true, true); Playa.GiveItem(ItemType.FLASHLIGHT); + if (EventLogic._343Config.SCP343_HP != -1) { Playa.SetHealth(EventLogic._343Config.SCP343_HP); } + + if (Playa.GetUserGroup().BadgeText == null) + { + SCP343.Active343AndBadgeDict.Add(Playa.SteamId, new SCP343.PlayerInfo("", "")); + } + else + { + SCP343.Active343AndBadgeDict.Add(Playa.SteamId, new SCP343.PlayerInfo(Playa.GetUserGroup().BadgeText, Playa.GetUserGroup().Color)); + } - SCP343.Active343AndBadgeDict.Add(Playa.SteamId, new SCP343.PlayerInfo(Playa.GetUserGroup().BadgeText, Playa.GetUserGroup().Color)); Playa.SetRank("red", "SCP-343"); return new string[] { "Made " + Playa.Name + " SCP343!" }; diff --git a/SCP-343/SCP_343EventLogic.cs b/SCP-343/SCP_343EventLogic.cs index d4126a9..f049694 100644 --- a/SCP-343/SCP_343EventLogic.cs +++ b/SCP-343/SCP_343EventLogic.cs @@ -55,7 +55,14 @@ public void OnRoundStart(RoundStartEvent ev) if (DClassList.Count > 0 && plugin.pluginManager.Server.GetPlayers().Count > 2) { Player TheChosenOne = DClassList[RNG.Next(DClassList.Count)]; - SCP343.Active343AndBadgeDict.Add(TheChosenOne.SteamId, new SCP343.PlayerInfo(TheChosenOne.GetUserGroup().BadgeText, TheChosenOne.GetUserGroup().Color)); + if(TheChosenOne.GetUserGroup().BadgeText == null) + { + SCP343.Active343AndBadgeDict.Add(TheChosenOne.SteamId, new SCP343.PlayerInfo("", "")); + } + else + { + SCP343.Active343AndBadgeDict.Add(TheChosenOne.SteamId, new SCP343.PlayerInfo(TheChosenOne.GetUserGroup().BadgeText, TheChosenOne.GetUserGroup().Color)); + } TheChosenOne.GiveItem(ItemType.FLASHLIGHT); if (_343Config.SCP343_HP != -1) {