mirror of
https://github.com/Gurge44/EndlessHostRoles.git
synced 2026-10-20 01:46:25 +00:00
fix
This commit is contained in:
1 parent
1842559bdc
commit
7a4fa42b26
7 files changed
+19
-15
No files matched your search
@@ -361,6 +361,7 @@ public enum CustomRoles
|
||||
|
||||
// Coven
|
||||
|
||||
RegularCoven,
|
||||
CovenLeader,
|
||||
SpellCaster,
|
||||
PotionMaster,
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@
|
||||
<Description>EHR</Description>
|
||||
<Authors>Gurge44</Authors>
|
||||
<langVersion>preview</langVersion>
|
||||
<AmongUs>C:\Program Files\Epic Games\AmongUs</AmongUs>
|
||||
<AmongUs>D:\AmongUs</AmongUs>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<Optimize>True</Optimize>
|
||||
<AssemblyName>$(MSBuildProjectName)</AssemblyName>
|
||||
|
||||
@@ -33,7 +33,7 @@ internal static class GhostRolesManager
|
||||
|
||||
IGhostRole instance = CreateGhostRoleInstance(suitableRole);
|
||||
pc.RpcSetCustomRole(suitableRole);
|
||||
pc.RpcSetRole(RoleTypes.GuardianAngel);
|
||||
pc.RpcSetRoleDesync(RoleTypes.GuardianAngel, pc.GetClientId());
|
||||
instance.OnAssign(pc);
|
||||
Main.ResetCamPlayerList.Add(pc.PlayerId);
|
||||
AssignedGhostRoles[pc.PlayerId] = (suitableRole, instance);
|
||||
@@ -67,7 +67,7 @@ internal static class GhostRolesManager
|
||||
var text = $"{Translator.GetString("GotGhostRoleNotify")}\n<size=80%>{info.Message}</size>";
|
||||
var notifyText = $"{Translator.GetString("GotGhostRoleNotify")}\n<size=80%>{info.Split}</size>";
|
||||
Utils.SendMessage(title: text, sendTo: pc.PlayerId, text: "\n");
|
||||
pc.Notify(notifyText, 5 + (5 * text.Count(x => x == '\n')));
|
||||
pc.Notify(notifyText, 10 + (5 * text.Count(x => x == '\n')));
|
||||
return;
|
||||
|
||||
(string Split, string Message) GetMessage(string baseMessage)
|
||||
|
||||
+11
-10
@@ -49,15 +49,6 @@ public static class Options
|
||||
Tasks
|
||||
}
|
||||
|
||||
[SuppressMessage("ReSharper", "UnusedMember.Local")]
|
||||
enum ModLanguages
|
||||
{
|
||||
UseGameLanguage,
|
||||
Hungarian,
|
||||
Polish,
|
||||
Indonesian
|
||||
}
|
||||
|
||||
public static Dictionary<TabGroup, OptionItem[]> GroupedOptions = [];
|
||||
public static Dictionary<AddonTypes, List<CustomRoles>> GroupedAddons = [];
|
||||
|
||||
@@ -1428,10 +1419,11 @@ public static class Options
|
||||
|
||||
PostLobbyCodeToEHRWebsite = new BooleanOptionItem(19422, "PostLobbyCodeToEHRDiscordServer", true, TabGroup.SystemSettings)
|
||||
.SetHeader(true);
|
||||
|
||||
|
||||
StoreCompletedAchievementsOnEHRDatabase = new BooleanOptionItem(19423, "StoreCompletedAchievementsOnEHRDatabase", true, TabGroup.SystemSettings);
|
||||
|
||||
RoleAssigningAlgorithm = new StringOptionItem(19409, "RoleAssigningAlgorithm", RoleAssigningAlgorithms, 4, TabGroup.SystemSettings, true)
|
||||
.SetHeader(true)
|
||||
.RegisterUpdateValueEvent((_, args) => IRandom.SetInstanceById(args.CurrentValue));
|
||||
|
||||
KPDCamouflageMode = new StringOptionItem(19500, "KPDCamouflageMode", CamouflageMode, 0, TabGroup.SystemSettings)
|
||||
@@ -2687,6 +2679,15 @@ public static class Options
|
||||
.SetColor(Color.yellow);
|
||||
}
|
||||
|
||||
[SuppressMessage("ReSharper", "UnusedMember.Local")]
|
||||
enum ModLanguages
|
||||
{
|
||||
UseGameLanguage,
|
||||
Hungarian,
|
||||
Polish,
|
||||
Indonesian
|
||||
}
|
||||
|
||||
public class OverrideTasksData
|
||||
{
|
||||
public static readonly Dictionary<CustomRoles, OverrideTasksData> AllData = [];
|
||||
|
||||
@@ -86,7 +86,8 @@ internal static class ControllerManagerUpdatePatch
|
||||
|
||||
if (!AmongUsClient.Instance.AmHost) return;
|
||||
|
||||
if (KeysDown(KeyCode.Return, KeyCode.C, KeyCode.LeftShift)) HudManager.Instance.Chat.SetVisible(true);
|
||||
if (KeysDown(KeyCode.Return, KeyCode.C, KeyCode.LeftShift))
|
||||
HudManager.Instance.Chat.SetVisible(true);
|
||||
|
||||
if (KeysDown(KeyCode.Return, KeyCode.L, KeyCode.LeftShift) && GameStates.IsInGame)
|
||||
{
|
||||
|
||||
@@ -4379,6 +4379,7 @@
|
||||
"NKWC.XKills": "Kill X Players",
|
||||
"NoteKiller.NumPlayersToKill": "Number of Players to Kill (X =)",
|
||||
"NoteKiller.OthersSelfSuffix": "<size=70%>There's a {0} in the game. Your real name is <#00ffa5>{1}</color></size>",
|
||||
"NoteKiller.OthersSelfSuffixShort": "<size=70%>Real Name: <#00ffa5>{0}</color></size>",
|
||||
"DeathNoteCommand.CanNotGuess": "You've already tried to guess someone's real name and failed, so you can't guess again until the next meeting.",
|
||||
"DeathNoteCommand.WrongName": "You've entered the wrong name.",
|
||||
"DeathNoteCommand.PlayerNotFoundOrDead": "The player with this name was not found or is already dead.",
|
||||
|
||||
@@ -207,7 +207,7 @@ public class NoteKiller : RoleBase
|
||||
public override string GetSuffix(PlayerControl seer, PlayerControl target, bool hud = false, bool meeting = false)
|
||||
{
|
||||
if (seer.PlayerId == target.PlayerId && CustomRoles.NoteKiller.RoleExist() && seer.PlayerId != NoteKillerID && !meeting && RealNames.TryGetValue(seer.PlayerId, out var ownName))
|
||||
return string.Format(Translator.GetString("NoteKiller.OthersSelfSuffix"), CustomRoles.NoteKiller.ToColoredString(), ownName);
|
||||
return MeetingStates.FirstMeeting ? string.Format(Translator.GetString("NoteKiller.OthersSelfSuffix"), CustomRoles.NoteKiller.ToColoredString(), ownName) : string.Format(Translator.GetString("NoteKiller.OthersSelfSuffixShort"), ownName);
|
||||
|
||||
if (seer.PlayerId != NoteKillerID || meeting || ShowClueEndTimeStamp == 0 || ShownClues.Count == 0) return string.Empty;
|
||||
if (ShownClues.TryGetValue(target.PlayerId, out var clue)) return clue;
|
||||
|
||||
Reference in new issue
Block a user