mirror of
https://github.com/Gurge44/EndlessHostRoles.git
synced 2026-10-20 01:46:25 +00:00
Rename Roles (#452)
* Update CustomRoles.cs * Update Flash.cs * Update Main.cs * Update CustomRolesHelper.cs * Update ExtendedPlayerControl.cs * Update PlayerGameOptionsSender.cs * Update GameState.cs * Update GuessManager.cs * Update HudPatch.cs * Update CustomRoleSelector.cs * Update OptionHolder.cs * Update en_US.json * Update IntroPatch.cs * Update en_US.json
This commit is contained in:
1 parent
22387ab850
commit
4e9d9b65b0
13 files changed
+43
-42
No files matched your search
+3
-3
@@ -428,7 +428,7 @@ public enum CustomRoles
|
||||
Wyrd,
|
||||
|
||||
// Solo Kombat
|
||||
SoloPVP_Player,
|
||||
Challenger,
|
||||
|
||||
// FFA
|
||||
Killer,
|
||||
@@ -536,7 +536,7 @@ public enum CustomRoles
|
||||
Examiner,
|
||||
Facilitator, // Ghost role
|
||||
Finder,
|
||||
Flashman,
|
||||
Flash,
|
||||
Fragile,
|
||||
Fool,
|
||||
Giant,
|
||||
@@ -603,4 +603,4 @@ public enum CustomRoles
|
||||
Watcher,
|
||||
Workhorse,
|
||||
Youtuber
|
||||
}
|
||||
}
|
||||
@@ -690,7 +690,7 @@ public class Main : BasePlugin
|
||||
{ CustomRoles.Stained, "#e6bf91" },
|
||||
{ CustomRoles.Clumsy, "#b8b8b8" },
|
||||
{ CustomRoles.Mischievous, "#30221c" },
|
||||
{ CustomRoles.Flashman, "#ff8400" },
|
||||
{ CustomRoles.Flash, "#ff8400" },
|
||||
{ CustomRoles.Haste, "#f0ec22" },
|
||||
{ CustomRoles.Busy, "#32a852" },
|
||||
{ CustomRoles.Sleep, "#000000" },
|
||||
@@ -754,7 +754,7 @@ public class Main : BasePlugin
|
||||
{ CustomRoles.Underdog, "#ff1919" },
|
||||
|
||||
// Solo PVP
|
||||
{ CustomRoles.SoloPVP_Player, "#f55252" },
|
||||
{ CustomRoles.Challenger, "#f55252" },
|
||||
// FFA
|
||||
{ CustomRoles.Killer, "#00ffff" },
|
||||
// Stop And Go
|
||||
|
||||
@@ -23,7 +23,7 @@ internal static class CustomRoleSelector
|
||||
|
||||
public static readonly Dictionary<CustomGameMode, CustomRoles> GameModeRoles = new()
|
||||
{
|
||||
{ CustomGameMode.SoloPVP, CustomRoles.SoloPVP_Player },
|
||||
{ CustomGameMode.SoloPVP, CustomRoles.Challenger },
|
||||
{ CustomGameMode.FFA, CustomRoles.Killer },
|
||||
{ CustomGameMode.StopAndGo, CustomRoles.Tasker },
|
||||
{ CustomGameMode.HotPotato, CustomRoles.Potato },
|
||||
|
||||
@@ -60,7 +60,7 @@ internal static class CustomRolesHelper
|
||||
public static bool IsForOtherGameMode(this CustomRoles role)
|
||||
{
|
||||
return CustomHnS.AllHnSRoles.Contains(role) || role is
|
||||
CustomRoles.SoloPVP_Player or
|
||||
CustomRoles.Challenger or
|
||||
CustomRoles.Killer or
|
||||
CustomRoles.Tasker or
|
||||
CustomRoles.Potato or
|
||||
@@ -460,7 +460,7 @@ internal static class CustomRolesHelper
|
||||
return role switch
|
||||
{
|
||||
// Solo PVP
|
||||
CustomRoles.SoloPVP_Player => RoleTypes.Impostor,
|
||||
CustomRoles.Challenger => RoleTypes.Impostor,
|
||||
// FFA
|
||||
CustomRoles.Killer => RoleTypes.Impostor,
|
||||
// Capture The Flag
|
||||
@@ -975,7 +975,7 @@ internal static class CustomRolesHelper
|
||||
return role is
|
||||
CustomRoles.KOTZPlayer or
|
||||
CustomRoles.CTFPlayer or
|
||||
CustomRoles.SoloPVP_Player or
|
||||
CustomRoles.Challenger or
|
||||
CustomRoles.BedWarsPlayer or
|
||||
CustomRoles.Weatherman or
|
||||
CustomRoles.Altruist or
|
||||
@@ -1155,7 +1155,7 @@ internal static class CustomRolesHelper
|
||||
CustomRoles.Torch when !pc.IsCrewmate() || pc.Is(CustomRoles.Bewilder) || pc.Is(CustomRoles.Sunglasses) || pc.Is(CustomRoles.GuardianAngelEHR) => false,
|
||||
CustomRoles.Bewilder when pc.Is(CustomRoles.Torch) || pc.Is(CustomRoles.GuardianAngelEHR) || pc.Is(CustomRoles.Sunglasses) => false,
|
||||
CustomRoles.Dynamo when pc.Is(CustomRoles.Spurt) || pc.GetCustomRole() is CustomRoles.Tank or CustomRoles.Ankylosaurus => false,
|
||||
CustomRoles.Spurt when pc.GetCustomSubRoles().Any(x => x is CustomRoles.Dynamo or CustomRoles.Swiftclaw or CustomRoles.Giant or CustomRoles.Flashman) || pc.Is(CustomRoles.Ankylosaurus) => false,
|
||||
CustomRoles.Spurt when pc.GetCustomSubRoles().Any(x => x is CustomRoles.Dynamo or CustomRoles.Swiftclaw or CustomRoles.Giant or CustomRoles.Flash) || pc.Is(CustomRoles.Ankylosaurus) => false,
|
||||
CustomRoles.Sunglasses when pc.Is(CustomRoles.Torch) || pc.Is(CustomRoles.GuardianAngelEHR) || pc.Is(CustomRoles.Bewilder) => false,
|
||||
CustomRoles.Guesser when pc.GetCustomRole() is CustomRoles.EvilGuesser or CustomRoles.NiceGuesser or CustomRoles.Doomsayer or CustomRoles.CopyCat => false,
|
||||
CustomRoles.Madmate when !pc.CanBeMadmate() || pc.Is(CustomRoles.Egoist) || pc.Is(CustomRoles.Rascal) => false,
|
||||
@@ -1164,8 +1164,8 @@ internal static class CustomRolesHelper
|
||||
CustomRoles.Egoist when !pc.IsImpostor() => false,
|
||||
CustomRoles.Damocles when pc.GetCustomRole() is CustomRoles.Bomber or CustomRoles.Nuker or CustomRoles.Mercenary or CustomRoles.Cantankerous => false,
|
||||
CustomRoles.Damocles when pc.GetRoleTypes() is not (RoleTypes.Impostor or RoleTypes.Phantom or RoleTypes.Shapeshifter or RoleTypes.Viper) => false,
|
||||
CustomRoles.Flashman when pc.Is(CustomRoles.Swiftclaw) || pc.Is(CustomRoles.Giant) || pc.Is(CustomRoles.Spurt) || pc.GetCustomRole() is CustomRoles.Tank or CustomRoles.Zombie => false,
|
||||
CustomRoles.Giant when pc.Is(CustomRoles.Flashman) || pc.Is(CustomRoles.Spurt) || pc.Is(CustomRoles.RoomRusher) => false,
|
||||
CustomRoles.Flash when pc.Is(CustomRoles.Swiftclaw) || pc.Is(CustomRoles.Giant) || pc.Is(CustomRoles.Spurt) || pc.GetCustomRole() is CustomRoles.Tank or CustomRoles.Zombie => false,
|
||||
CustomRoles.Giant when pc.Is(CustomRoles.Flash) || pc.Is(CustomRoles.Spurt) || pc.Is(CustomRoles.RoomRusher) => false,
|
||||
CustomRoles.Necroview when pc.Is(CustomRoles.Visionary) => false,
|
||||
CustomRoles.Mimic when pc.Is(CustomRoles.Nemesis) => false,
|
||||
CustomRoles.Rascal when !pc.IsCrewmate() => false,
|
||||
@@ -1216,7 +1216,7 @@ internal static class CustomRolesHelper
|
||||
CustomRoles.Haste when pc.GetRoleTypes() is not (RoleTypes.Impostor or RoleTypes.Phantom or RoleTypes.Shapeshifter or RoleTypes.Viper) || !pc.CanUseImpostorVentButton() || pc.Is(CustomRoles.Glitch) => false,
|
||||
CustomRoles.Diseased when pc.Is(CustomRoles.Antidote) => false,
|
||||
CustomRoles.Antidote when pc.Is(CustomRoles.Diseased) => false,
|
||||
CustomRoles.Flashman or CustomRoles.Giant when pc.GetCustomRole() is CustomRoles.Swooper or CustomRoles.Wraith or CustomRoles.Chameleon or CustomRoles.Alchemist or CustomRoles.Ankylosaurus => false,
|
||||
CustomRoles.Flash or CustomRoles.Giant when pc.GetCustomRole() is CustomRoles.Swooper or CustomRoles.Wraith or CustomRoles.Chameleon or CustomRoles.Alchemist or CustomRoles.Ankylosaurus => false,
|
||||
CustomRoles.Bait when pc.Is(CustomRoles.Disregarded) => false,
|
||||
CustomRoles.Busy when !pc.GetTaskState().HasTasks => false,
|
||||
CustomRoles.Truant when pc.Is(CustomRoles.SoulHunter) => false,
|
||||
|
||||
@@ -1404,7 +1404,7 @@ internal static class ExtendedPlayerControl
|
||||
return pc.GetCustomRole() switch
|
||||
{
|
||||
// Solo PVP
|
||||
CustomRoles.SoloPVP_Player => pc.SoloAlive(),
|
||||
CustomRoles.Challenger => pc.SoloAlive(),
|
||||
// FFA
|
||||
CustomRoles.Killer => pc.IsAlive(),
|
||||
// Stop And Go
|
||||
@@ -1755,7 +1755,7 @@ internal static class ExtendedPlayerControl
|
||||
|
||||
Main.AllPlayerKillCooldown[player.PlayerId] = player.GetCustomRole() switch
|
||||
{
|
||||
CustomRoles.SoloPVP_Player => SoloPVP.SoloPVP_ATKCooldown.GetFloat(),
|
||||
CustomRoles.Challenger => SoloPVP.SoloPVP_ATKCooldown.GetFloat(),
|
||||
CustomRoles.Killer => FreeForAll.FFAKcd.GetFloat(),
|
||||
CustomRoles.Runner => Speedrun.KCD,
|
||||
CustomRoles.CTFPlayer => CaptureTheFlag.KCD,
|
||||
|
||||
@@ -263,9 +263,9 @@ public sealed class PlayerGameOptionsSender(PlayerControl player) : GameOptionsS
|
||||
opt.SetBool(BoolOptionNames.AnonymousVotes, false);
|
||||
break;
|
||||
}
|
||||
case CustomRoles.Flashman:
|
||||
case CustomRoles.Flash:
|
||||
{
|
||||
Main.AllPlayerSpeed[player.PlayerId] = Options.FlashmanSpeed.GetFloat();
|
||||
Main.AllPlayerSpeed[player.PlayerId] = Options.FlashSpeed.GetFloat();
|
||||
break;
|
||||
}
|
||||
case CustomRoles.Giant:
|
||||
@@ -660,4 +660,5 @@ public sealed class PlayerGameOptionsSender(PlayerControl player) : GameOptionsS
|
||||
{
|
||||
return base.AmValid() && player != null && player.Data != null && !player.Data.Disconnected && Main.RealOptionsData != null;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -337,7 +337,7 @@ public class PlayerState(byte playerId)
|
||||
{
|
||||
SubRoles.Remove(role);
|
||||
|
||||
if (role is CustomRoles.Flashman or CustomRoles.Dynamo or CustomRoles.Spurt)
|
||||
if (role is CustomRoles.Flash or CustomRoles.Dynamo or CustomRoles.Spurt)
|
||||
{
|
||||
Main.AllPlayerSpeed[PlayerId] = Main.RealOptionsData.GetFloat(FloatOptionNames.PlayerSpeedMod);
|
||||
PlayerGameOptionsSender.SetDirty(PlayerId);
|
||||
@@ -597,4 +597,5 @@ public static class MeetingStates
|
||||
public static bool IsExistDeadBody => DeadBodies.Length > 0;
|
||||
|
||||
public static NetworkedPlayerInfo ReportTarget { get; set; }
|
||||
}
|
||||
|
||||
}
|
||||
@@ -335,7 +335,7 @@ public static class GuessManager
|
||||
case CustomRoles.Goose when !Goose.CanBeGuessed.GetBool():
|
||||
case CustomRoles.BananaMan:
|
||||
case CustomRoles.Disco:
|
||||
case CustomRoles.Flashman:
|
||||
case CustomRoles.Flash:
|
||||
case CustomRoles.Giant:
|
||||
case CustomRoles.Glow:
|
||||
case CustomRoles.LastImpostor:
|
||||
@@ -1044,7 +1044,7 @@ public static class GuessManager
|
||||
CustomRoles.BananaMan or
|
||||
CustomRoles.Car or
|
||||
CustomRoles.Disco or
|
||||
CustomRoles.Flashman or
|
||||
CustomRoles.Flash or
|
||||
CustomRoles.Giant or
|
||||
CustomRoles.LastImpostor or
|
||||
CustomRoles.NotAssigned or
|
||||
@@ -1651,4 +1651,3 @@ public static class GuessManager
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -826,7 +826,7 @@ public static class Options
|
||||
public static OptionItem PresidentCanBeMadmate;
|
||||
|
||||
public static OptionItem MadSnitchTasks;
|
||||
public static OptionItem FlashmanSpeed;
|
||||
public static OptionItem FlashSpeed;
|
||||
public static OptionItem GiantSpeed;
|
||||
public static OptionItem ImpEgoistVisibalToAllies;
|
||||
public static OptionItem VotesPerKill;
|
||||
|
||||
+2
-2
@@ -237,7 +237,7 @@ internal static class HudManagerPatch
|
||||
case CustomRoles.Medic:
|
||||
usedButton?.OverrideText(GetString("MedicalerButtonText"));
|
||||
break;
|
||||
case CustomRoles.SoloPVP_Player:
|
||||
case CustomRoles.Challenger:
|
||||
case CustomRoles.BedWarsPlayer:
|
||||
__instance.KillButton?.OverrideText(GetString("DemonButtonText"));
|
||||
break;
|
||||
@@ -660,7 +660,7 @@ internal static class SetHudActivePatch
|
||||
__instance.ImpostorVentButton?.ToggleVisible(false);
|
||||
break;
|
||||
|
||||
case CustomRoles.SoloPVP_Player:
|
||||
case CustomRoles.Challenger:
|
||||
__instance.SabotageButton?.ToggleVisible(false);
|
||||
__instance.AbilityButton?.ToggleVisible(false);
|
||||
__instance.ReportButton?.ToggleVisible(false);
|
||||
|
||||
@@ -875,11 +875,11 @@ internal static class BeginCrewmatePatch
|
||||
{
|
||||
case CustomGameMode.SoloPVP:
|
||||
{
|
||||
__instance.TeamTitle.text = GetString("SoloPVP_Player");
|
||||
__instance.TeamTitle.text = GetString("Challenger");
|
||||
__instance.TeamTitle.color = __instance.BackgroundBar.material.color = new Color32(245, 82, 82, byte.MaxValue);
|
||||
PlayerControl.LocalPlayer.Data.Role.IntroSound = DestroyableSingleton<HnSImpostorScreamSfx>.Instance.HnSOtherImpostorTransformSfx;
|
||||
__instance.ImpostorText.gameObject.SetActive(true);
|
||||
__instance.ImpostorText.text = GetString("SoloPVP_PlayerInfo");
|
||||
__instance.ImpostorText.text = GetString("ChallengerInfo");
|
||||
break;
|
||||
}
|
||||
case CustomGameMode.FFA:
|
||||
|
||||
@@ -346,7 +346,7 @@
|
||||
"Stained": "Stained",
|
||||
"Clumsy": "Clumsy",
|
||||
"Mischievous": "Mischievous",
|
||||
"Flashman": "Flash",
|
||||
"Flash": "Flash",
|
||||
"Undead": "Undead",
|
||||
"Busy": "Busy",
|
||||
"Truant": "Truant",
|
||||
@@ -404,7 +404,7 @@
|
||||
"Prefix.Stained": "Stained",
|
||||
"Prefix.Clumsy": "Clumsy",
|
||||
"Prefix.Mischievous": "Mischievous",
|
||||
"Prefix.Flashman": "Flash",
|
||||
"Prefix.Flash": "Flash",
|
||||
"Prefix.Undead": "Undead",
|
||||
"Prefix.Busy": "Busy",
|
||||
"Prefix.Truant": "Truant",
|
||||
@@ -577,7 +577,7 @@
|
||||
"ExecutionerInfo": "Get your target voted out",
|
||||
"LawyerInfo": "Help your target win!",
|
||||
"VectorInfo": "Jump in, jump out, win!",
|
||||
"JackalInfo": "Murder everyone",
|
||||
"JackalInfo": "Convert & Murder Everyone",
|
||||
"GodInfo": "Everything is under your control",
|
||||
"InnocentInfo": "Get someone ejected by making them kill you",
|
||||
"PelicanInfo": "Eat all players",
|
||||
@@ -621,7 +621,7 @@
|
||||
"NtrInfo": "Everyone sees you as their Lover",
|
||||
"WatcherInfo": "You see vote colors",
|
||||
"LastImpostorInfo": "Lower kill cooldown",
|
||||
"FlashmanInfo": "You're faster",
|
||||
"FlashInfo": "You're faster",
|
||||
"GiantInfo": "You're slower",
|
||||
"TruantInfo": "You freeze after meetings for some time",
|
||||
"TorchInfo": "You have a higher vision!",
|
||||
@@ -853,7 +853,7 @@
|
||||
"StainedInfoLong": "(Add-ons):\\nYour killer gets a violet name for 3 seconds.",
|
||||
"ClumsyInfoLong": "(Add-ons):\\nWhile walking, you have a small chance of tripping, meaning you freeze for a few seconds.",
|
||||
"MischievousInfoLong": "(Add-ons):\\nYou can sabotage.",
|
||||
"FlashmanInfoLong": "(Add-ons):\\nThe Flash is faster by default.",
|
||||
"FlashInfoLong": "(Add-ons):\\nThe Flash is faster by default.",
|
||||
"GiantInfoLong": "(Add-ons):\\nThe Giant is slower by default.",
|
||||
"BusyInfoLong": "(Add-ons):\\nYou have more tasks.",
|
||||
"DiscoInfoLong": "(Add-ons):\\nYou change your skin color every few seconds.",
|
||||
@@ -1499,7 +1499,7 @@
|
||||
"BewilderVision": "<color=#c894f5>Bewilder</color> Vision",
|
||||
"JesterVision": "<color=#ec62a5>Jester</color> Vision",
|
||||
"LawyerVision": "<color=#008080>Lawyer</color> Vision",
|
||||
"FlashmanSpeed": "<color=#ff8400>Flash</color> Speed",
|
||||
"FlashSpeed": "<color=#ff8400>Flash</color> Speed",
|
||||
"GiantSpeed": "<color=#32a852>Giant</color> Speed",
|
||||
"NeutralsKnowEachOther": "<color=#ffab1b>Neutrals</color> know each other",
|
||||
"LoverDieConsequence": "Consequence for Second <color=#ff9ace>Lover</color>, When First One Dies",
|
||||
@@ -4500,7 +4500,7 @@
|
||||
"MagicianBombExlodesIn": "Bomb explodes in {0}s",
|
||||
"MagicianCardUsed": "Card used",
|
||||
"Necromancer": "Necromancer",
|
||||
"NecromancerInfo": "Recruit Everyone",
|
||||
"NecromancerInfo": "Recruit Everyone to the Undead",
|
||||
"NecromancerInfoLong": "(Neutrals):\\nThe Necromancer is the main recruiter for the Undead faction. The first person it kills will become a Deathknight. With the help of the Deathknight, they must work together to convert others to the Undead. If the Necromancer were to die, The Deathknight would turn into Necromancer.",
|
||||
"Deathknight": "Deathknight",
|
||||
"DeathknightInfo": "Help the Necromancer Recruit",
|
||||
@@ -4924,8 +4924,8 @@
|
||||
"SoloPVP": "SOLO PVP",
|
||||
"ModeSoloPVP": "Gamemode: Solo PVP",
|
||||
"ModeDescribe.SoloPVP": "In the Solo PVP game mode, everyone has HP and can use their kill button to cause damage on other players. When a player's health reaches 0, they 'die' and respawn after a few seconds. The player(s) with the highest number of kills win(s) at the end of the game.",
|
||||
"SoloPVP_Player": "SOLO PVP",
|
||||
"SoloPVP_PlayerInfo": "DEFEAT OPPONENTS TO WIN",
|
||||
"Challenger": "SOLO PVP",
|
||||
"ChallengerInfo": "DEFEAT OPPONENTS TO WIN",
|
||||
"SoloPVP_GameTime": "Game duration",
|
||||
"SoloPVP_HPMax": "Default HP",
|
||||
"SoloPVP_ATK": "Default Attack",
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
namespace EHR.AddOns.Common;
|
||||
|
||||
internal class Flashman : IAddon
|
||||
internal class Flash : IAddon
|
||||
{
|
||||
public AddonTypes Type => AddonTypes.Helpful;
|
||||
|
||||
public void SetupCustomOption()
|
||||
{
|
||||
Options.SetupAdtRoleOptions(18700, CustomRoles.Flashman, canSetNum: true, tab: TabGroup.Addons, teamSpawnOptions: true);
|
||||
Options.SetupAdtRoleOptions(18700, CustomRoles.Flash, canSetNum: true, tab: TabGroup.Addons, teamSpawnOptions: true);
|
||||
|
||||
Options.FlashmanSpeed = new FloatOptionItem(18708, "FlashmanSpeed", new(0.25f, 3f, 0.05f), 2.5f, TabGroup.Addons)
|
||||
.SetParent(Options.CustomRoleSpawnChances[CustomRoles.Flashman])
|
||||
Options.FlashSpeed = new FloatOptionItem(18708, "FlashSpeed", new(0.25f, 3f, 0.05f), 2.5f, TabGroup.Addons)
|
||||
.SetParent(Options.CustomRoleSpawnChances[CustomRoles.Flash])
|
||||
.SetValueFormat(OptionFormat.Multiplier);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user