mirror of
https://github.com/Gurge44/EndlessHostRoles.git
synced 2026-10-19 15:51:58 +00:00
Add GM color (#441)
* Update Utils.cs * Update Utils.cs * Update QuizMaster.cs * Update ChatCommandPatch.cs * Update ChatCommandPatch.cs * Update CameraMan.cs * Update Convener.cs * Update Convener.cs * Update OptionShower.cs * Update Utils.cs
This commit is contained in:
1 parent
5eb5cb31fe
commit
15141867de
6 files changed
+14
-5
No files matched your search
@@ -60,7 +60,7 @@ public static class OptionShower
|
||||
{
|
||||
if (Options.CurrentGameMode == CustomGameMode.Standard)
|
||||
{
|
||||
sb.Append($"<color={Utils.GetRoleColorCode(CustomRoles.GM)}>{Utils.GetRoleName(CustomRoles.GM)}:</color> {(Main.GM.Value ? GetString("RoleRate") : GetString("RoleOff"))}\n\n");
|
||||
sb.Append($"<color={Utils.GetRoleColorCode(CustomRoles.GM)}>{Utils.GetRoleName(CustomRoles.GM)}</color>: {(Main.GM.Value ? GetString("RoleRate") : GetString("RoleOff"))}\n\n");
|
||||
sb.Append(GetString("ActiveRolesList")).Append('\n');
|
||||
var count = 4;
|
||||
|
||||
@@ -156,4 +156,5 @@ public static class OptionShower
|
||||
if (opt.Value.GetBool()) ShowChildren(opt.Value, ref sb, color, deep + 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
+1
-1
@@ -1395,7 +1395,7 @@ public static class Utils
|
||||
}
|
||||
|
||||
StringBuilder sb = new("<size=80%>");
|
||||
sb.Append($"{GetRoleName(CustomRoles.GM)}: {(Main.GM.Value ? GetString("RoleRate") : GetString("RoleOff"))}");
|
||||
sb.Append($"<color={GetRoleColorCode(CustomRoles.GM)}>{GetRoleName(CustomRoles.GM)}</color>: {(Main.GM.Value ? GetString("RoleRate") : GetString("RoleOff"))}");
|
||||
|
||||
Dictionary<TabGroup, List<string>> roles = new()
|
||||
{
|
||||
|
||||
@@ -659,6 +659,7 @@ internal static class ChatCommands
|
||||
if (realKiller != targetId)
|
||||
{
|
||||
rb.Notified = false;
|
||||
RPC.PlaySoundRPC(player.PlayerId, Sounds.SabotageSound);
|
||||
Utils.SendMessage("\n", player.PlayerId, GetString("Retributionist.Fail"));
|
||||
}
|
||||
else
|
||||
@@ -1276,6 +1277,7 @@ internal static class ChatCommands
|
||||
if (deadPlayer == 0 && (!NoteKiller.RealNames.TryGetValue(0, out string name) || name != guess))
|
||||
{
|
||||
NoteKiller.CanGuess = false;
|
||||
RPC.PlaySoundRPC(player.PlayerId, Sounds.SabotageSound);
|
||||
Utils.SendMessage(GetString("DeathNoteCommand.WrongName"), player.PlayerId);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using AmongUs.GameOptions;
|
||||
using EHR.Modules;
|
||||
|
||||
namespace EHR.Crewmate;
|
||||
|
||||
@@ -94,6 +95,7 @@ public class CameraMan : RoleBase
|
||||
LateTask.New(() =>
|
||||
{
|
||||
BasePos = pc.Pos();
|
||||
pc.RPCPlayCustomSound("teleport");
|
||||
if (pc.TP(CameraPosition)) IsTeleported = true;
|
||||
}, 2f, "CameraMan Teleport");
|
||||
}
|
||||
@@ -110,6 +112,7 @@ public class CameraMan : RoleBase
|
||||
pc.RpcRemoveAbilityUse();
|
||||
|
||||
BasePos = pc.Pos();
|
||||
pc.RPCPlayCustomSound("teleport");
|
||||
if (pc.TP(CameraPosition)) IsTeleported = true;
|
||||
}
|
||||
else
|
||||
@@ -133,4 +136,4 @@ public class CameraMan : RoleBase
|
||||
{
|
||||
return !IsThisRole(pc) || pc.Is(CustomRoles.Nimble) || pc.GetClosestVent()?.Id == ventId;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
using AmongUs.GameOptions;
|
||||
using EHR.Modules;
|
||||
|
||||
namespace EHR.Crewmate;
|
||||
|
||||
@@ -65,6 +66,7 @@ internal class Convener : RoleBase
|
||||
{
|
||||
if (pc == null || pc.GetAbilityUseLimit() < 1f) return;
|
||||
|
||||
pc.RPCPlayCustomSound("Teleport");
|
||||
LateTask.New(() => Main.AllAlivePlayerControls.MassTP(pc.Pos(), log: true), isPet ? 0.5f : 2f, "Convener TP");
|
||||
pc.RpcRemoveAbilityUse();
|
||||
}
|
||||
@@ -73,4 +75,4 @@ internal class Convener : RoleBase
|
||||
{
|
||||
return !IsThisRole(pc) || pc.Is(CustomRoles.Nimble) || pc.GetClosestVent()?.Id == ventId;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -285,6 +285,7 @@ internal class QuizMaster : RoleBase
|
||||
|
||||
MessagesToSend[Target] = sample;
|
||||
|
||||
RPC.PlaySoundRPC(Target, Sounds.TaskUpdateSound);
|
||||
Logger.Info($"Question for {Utils.GetPlayerById(Target)?.GetNameWithRole()}: {msgTitle} - Choices: {string.Join('/', CurrentQuestion.Answers)} - Correct Answer: {CurrentQuestion.Answers[CurrentQuestion.CorrectAnswerIndex]}", "QuizMaster");
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user