mirror of
https://github.com/Gurge44/EndlessHostRoles.git
synced 2026-10-20 01:46:25 +00:00
Add Urgent
This commit is contained in:
1 parent
d729506020
commit
79cb4ead48
8 files changed
+30
-27
No files matched your search
@@ -598,6 +598,7 @@ public enum CustomRoles
|
|||||||
Stressed,
|
Stressed,
|
||||||
Swift,
|
Swift,
|
||||||
Sunglasses,
|
Sunglasses,
|
||||||
|
Talkative,
|
||||||
Taskcounter,
|
Taskcounter,
|
||||||
TaskMaster,
|
TaskMaster,
|
||||||
Tiebreaker,
|
Tiebreaker,
|
||||||
|
|||||||
@@ -609,6 +609,7 @@ public enum CustomRoles
|
|||||||
Undead,
|
Undead,
|
||||||
Underdog,
|
Underdog,
|
||||||
Unlucky,
|
Unlucky,
|
||||||
|
Urgent,
|
||||||
Venom,
|
Venom,
|
||||||
Warden, // Ghost role
|
Warden, // Ghost role
|
||||||
Watcher,
|
Watcher,
|
||||||
|
|||||||
@@ -675,6 +675,7 @@ public class Main : BasePlugin
|
|||||||
{ CustomRoles.Listener, "#060270" },
|
{ CustomRoles.Listener, "#060270" },
|
||||||
{ CustomRoles.Unbound, "#DFC57B" },
|
{ CustomRoles.Unbound, "#DFC57B" },
|
||||||
{ CustomRoles.AntiTP, "#fcba03" },
|
{ CustomRoles.AntiTP, "#fcba03" },
|
||||||
|
{ CustomRoles.Urgent, "#D49255" },
|
||||||
{ CustomRoles.Talkative, "#6ADEDE" },
|
{ CustomRoles.Talkative, "#6ADEDE" },
|
||||||
{ CustomRoles.Blessed, "#7bfbff" },
|
{ CustomRoles.Blessed, "#7bfbff" },
|
||||||
{ CustomRoles.Hidden, "#E2EAF4" },
|
{ CustomRoles.Hidden, "#E2EAF4" },
|
||||||
|
|||||||
@@ -204,6 +204,9 @@ public class PlayerState(byte playerId)
|
|||||||
case CustomRoles.BananaMan when Main.IntroDestroyed && !SubRoles.Contains(CustomRoles.BananaMan):
|
case CustomRoles.BananaMan when Main.IntroDestroyed && !SubRoles.Contains(CustomRoles.BananaMan):
|
||||||
LateTask.New(() => Utils.RpcChangeSkin(Player, new()), 0.2f, log: false);
|
LateTask.New(() => Utils.RpcChangeSkin(Player, new()), 0.2f, log: false);
|
||||||
break;
|
break;
|
||||||
|
case CustomRoles.Urgent when !SubRoles.Contains(CustomRoles.Urgent):
|
||||||
|
Main.NumEmergencyMeetingsUsed[PlayerId]--;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (replaceAll)
|
if (replaceAll)
|
||||||
|
|||||||
@@ -319,6 +319,7 @@ internal static class ChangeRoleSettings
|
|||||||
Main.DefaultImpostorVision = Main.RealOptionsData.GetFloat(FloatOptionNames.ImpostorLightMod);
|
Main.DefaultImpostorVision = Main.RealOptionsData.GetFloat(FloatOptionNames.ImpostorLightMod);
|
||||||
|
|
||||||
Main.LastNotifyNames = [];
|
Main.LastNotifyNames = [];
|
||||||
|
Main.NumEmergencyMeetingsUsed = [];
|
||||||
|
|
||||||
CheckForEndVotingPatch.EjectionText = string.Empty;
|
CheckForEndVotingPatch.EjectionText = string.Empty;
|
||||||
|
|
||||||
@@ -331,41 +332,22 @@ internal static class ChangeRoleSettings
|
|||||||
|
|
||||||
Camouflage.BlockCamouflage = false;
|
Camouflage.BlockCamouflage = false;
|
||||||
Camouflage.Init();
|
Camouflage.Init();
|
||||||
|
|
||||||
Main.NumEmergencyMeetingsUsed = Main.EnumeratePlayerControls().ToDictionary(x => x.PlayerId, _ => 0);
|
|
||||||
|
|
||||||
if (AmongUsClient.Instance.AmHost)
|
|
||||||
{
|
|
||||||
string[] invalidColor = Main.EnumeratePlayerControls().Where(p => p.Data.DefaultOutfit.ColorId < 0 || Palette.PlayerColors.Length <= p.Data.DefaultOutfit.ColorId).Select(p => $"{p.name}").ToArray();
|
|
||||||
|
|
||||||
if (invalidColor.Length > 0)
|
|
||||||
{
|
|
||||||
string msg = GetString("Error.InvalidColor");
|
|
||||||
Logger.SendInGame(msg, Color.yellow);
|
|
||||||
msg += "\n" + string.Join(",", invalidColor);
|
|
||||||
Utils.SendMessage(msg, importance: MessageImportance.Low);
|
|
||||||
Logger.Error(msg, "CoStartGame");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
RoleResult = [];
|
RoleResult = [];
|
||||||
|
|
||||||
foreach (PlayerControl target in Main.EnumeratePlayerControls())
|
|
||||||
{
|
|
||||||
foreach (PlayerControl seer in Main.EnumeratePlayerControls())
|
|
||||||
{
|
|
||||||
(byte, byte) pair = (target.PlayerId, seer.PlayerId);
|
|
||||||
Main.LastNotifyNames[pair] = target.name;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach (PlayerControl pc in Main.EnumeratePlayerControls())
|
foreach (PlayerControl pc in Main.EnumeratePlayerControls())
|
||||||
{
|
{
|
||||||
|
foreach (PlayerControl seer in Main.EnumeratePlayerControls())
|
||||||
|
{
|
||||||
|
(byte, byte) pair = (pc.PlayerId, seer.PlayerId);
|
||||||
|
Main.LastNotifyNames[pair] = pc.name;
|
||||||
|
}
|
||||||
|
|
||||||
int colorId = pc.Data.DefaultOutfit.ColorId;
|
int colorId = pc.Data.DefaultOutfit.ColorId;
|
||||||
if (AmongUsClient.Instance.AmHost && Options.FormatNameMode.GetInt() == 1)
|
if (AmongUsClient.Instance.AmHost && Options.FormatNameMode.GetInt() == 1)
|
||||||
{
|
{
|
||||||
string colorName = Palette.GetColorName(colorId);
|
string colorName = Palette.GetColorName(colorId);
|
||||||
string formattedColorName = char.ToUpper(colorName[0]) + colorName.Substring(1).ToLower();
|
string formattedColorName = char.ToUpper(colorName[0]) + colorName[1..].ToLower();
|
||||||
pc.RpcSetName(formattedColorName);
|
pc.RpcSetName(formattedColorName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -378,6 +360,7 @@ internal static class ChangeRoleSettings
|
|||||||
MapNames.Fungle => Options.ExtraKillCooldownOnFungle.GetFloat(),
|
MapNames.Fungle => Options.ExtraKillCooldownOnFungle.GetFloat(),
|
||||||
_ => 0f
|
_ => 0f
|
||||||
};
|
};
|
||||||
|
Main.NumEmergencyMeetingsUsed[pc.PlayerId] = 0;
|
||||||
ReportDeadBodyPatch.CanReport[pc.PlayerId] = true;
|
ReportDeadBodyPatch.CanReport[pc.PlayerId] = true;
|
||||||
ReportDeadBodyPatch.WaitReport[pc.PlayerId] = [];
|
ReportDeadBodyPatch.WaitReport[pc.PlayerId] = [];
|
||||||
RoleResult[pc.PlayerId] = CustomRoles.NotAssigned;
|
RoleResult[pc.PlayerId] = CustomRoles.NotAssigned;
|
||||||
|
|||||||
@@ -3832,6 +3832,9 @@
|
|||||||
"TalkativeInfoLong": "(Add-ons):\\nAs the Talkative, if you send more messages in a meeting than the specified limit in the settings, you suicide.",
|
"TalkativeInfoLong": "(Add-ons):\\nAs the Talkative, if you send more messages in a meeting than the specified limit in the settings, you suicide.",
|
||||||
"Talkative.MaxMessagesPerMeeting": "Max Messages Per Meeting",
|
"Talkative.MaxMessagesPerMeeting": "Max Messages Per Meeting",
|
||||||
"Talkative.Died": "{0} talked too much and died.",
|
"Talkative.Died": "{0} talked too much and died.",
|
||||||
|
"Urgent": "Urgent",
|
||||||
|
"UrgentInfo": "You Have +1 Emergency Meeting",
|
||||||
|
"UrgentInfoLong": "(Add-ons):\\nAs the Urgent, you have an extra emergency meeting.",
|
||||||
"TaskMaster": "Task Master",
|
"TaskMaster": "Task Master",
|
||||||
"TaskMasterInfo": "Auto-Completes 1 Task After Every Meeting",
|
"TaskMasterInfo": "Auto-Completes 1 Task After Every Meeting",
|
||||||
"TaskMasterInfoLong": "(Add-ons):\\nAs the Task Master, you automatically complete 1 task after every meeting.",
|
"TaskMasterInfoLong": "(Add-ons):\\nAs the Task Master, you automatically complete 1 task after every meeting.",
|
||||||
|
|||||||
File renamed without changes.
@@ -0,0 +1,11 @@
|
|||||||
|
namespace EHR.Roles;
|
||||||
|
|
||||||
|
public class Urgent : IAddon
|
||||||
|
{
|
||||||
|
public AddonTypes Type => AddonTypes.Mixed;
|
||||||
|
|
||||||
|
public void SetupCustomOption()
|
||||||
|
{
|
||||||
|
Options.SetupAdtRoleOptions(658075, CustomRoles.Urgent, canSetNum: true, teamSpawnOptions: true);
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in new issue
Block a user