mirror of
https://github.com/Gurge44/EndlessHostRoles.git
synced 2026-11-19 13:16:56 +00:00
actually a ghost role
This commit is contained in:
1 parent
fdbe8dfa59
commit
e2f34157f2
6 files changed
+47
-6
No files matched your search
@@ -588,6 +588,7 @@ public enum CustomRoles
|
||||
Haste,
|
||||
Haunter, // Ghost role
|
||||
Hidden,
|
||||
Influencer, // SpiritGuide - Ghost role
|
||||
Insane,
|
||||
Introvert,
|
||||
Knighted,
|
||||
|
||||
@@ -785,6 +785,7 @@ public class Main : BaseUnityPlugin
|
||||
{ CustomRoles.Haunter, "#d1b1de" },
|
||||
{ CustomRoles.Bloodmoon, "#ff1313" },
|
||||
{ CustomRoles.GA, "#8cffff" },
|
||||
{ CustomRoles.Influencer, "#D8E3E6" },
|
||||
{ CustomRoles.Facilitator, CovenColor },
|
||||
{ CustomRoles.Shade, "#060270" },
|
||||
{ CustomRoles.MeetingAngel, "#a7e8b5" },
|
||||
|
||||
@@ -889,6 +889,7 @@ public static class LobbyViewSettingsPanePatch
|
||||
viewSettingsInfoPanelRoleVariant.transform.localPosition = new Vector3(xPos, yPos, -2f);
|
||||
|
||||
if (role.ToString().Contains("GuardianAngel")) role = CustomRoles.GA;
|
||||
if (role.ToString().Contains("Influencer")) role = CustomRoles.Influencer;
|
||||
|
||||
titleName = titleName.RemoveHtmlTags();
|
||||
|
||||
|
||||
@@ -2537,7 +2537,7 @@ static class PlayerControlRevivePatch
|
||||
var sender = CustomRpcSender.Create($"LIReviveSync:{__instance.GetRealName()}", SendOption.Reliable);
|
||||
var hasValue = sender.SyncGeneralOptions(__instance);
|
||||
sender.SendMessage(dispose: !hasValue);
|
||||
__instance.TP(FastVector2.TryGetClosest(__instance.Pos(), Main.EnumerateAlivePlayerControls().Without(__instance).Select(x => x.Pos()).Concat(ShipStatus.Instance.AllVents.Select(x => new Vector2(x.transform.position.x, x.transform.position.y + 0.3636f))), out Vector2 closest) ? closest : Vector2.zero);
|
||||
__instance.TP(FastVector2.TryGetClosest(__instance.Pos(), Main.CachedAlivePlayerControls().Without(__instance).Select(x => x.Pos()).Concat(ShipStatus.Instance.AllVents.Select(x => new Vector2(x.transform.position.x, x.transform.position.y + 0.3636f))), out Vector2 closest) ? closest : Vector2.zero);
|
||||
}
|
||||
}, 0.2f);
|
||||
}
|
||||
@@ -2560,17 +2560,21 @@ public static class PlayerControlCheckUseZiplinePatch
|
||||
{
|
||||
Logger.Info($"{__instance.GetNameWithRole()}, target: {target.GetNameWithRole()}, {(fromTop ? $"from Top, travel time: {ziplineBehaviour.downTravelTime}s" : $"from Bottom, travel time: {ziplineBehaviour.upTravelTime}s")}", "Zipline Use");
|
||||
|
||||
if (Options.CurrentGameMode == CustomGameMode.Deathrace) return true;
|
||||
CustomGameMode currentGameMode = Options.CurrentGameMode;
|
||||
if (currentGameMode == CustomGameMode.Deathrace) return true;
|
||||
|
||||
if (AmongUsClient.Instance.AmHost)
|
||||
{
|
||||
if (Options.DisableZiplineFromTop.GetBool() && fromTop) return false;
|
||||
if (Options.DisableZiplineFromUnder.GetBool() && !fromTop) return false;
|
||||
|
||||
if (__instance.Is(CustomRoleTypes.Coven) && Options.DisableZiplineForCoven.GetBool()) return false;
|
||||
if (__instance.IsImpostor() && Options.DisableZiplineForImps.GetBool()) return false;
|
||||
if (__instance.GetCustomRole().IsNeutral() && Options.DisableZiplineForNeutrals.GetBool()) return false;
|
||||
if (__instance.IsCrewmate() && Options.DisableZiplineForCrew.GetBool()) return false;
|
||||
if (currentGameMode == CustomGameMode.Standard)
|
||||
{
|
||||
if (__instance.Is(CustomRoleTypes.Coven) && Options.DisableZiplineForCoven.GetBool()) return false;
|
||||
if (__instance.IsImpostor() && Options.DisableZiplineForImps.GetBool()) return false;
|
||||
if (__instance.GetCustomRole().IsNeutral() && Options.DisableZiplineForNeutrals.GetBool()) return false;
|
||||
if (__instance.IsCrewmate() && Options.DisableZiplineForCrew.GetBool()) return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
@@ -639,6 +639,9 @@
|
||||
"SpiritGuideEHR": "Influencer",
|
||||
"SpiritGuideEHRInfo": "Send messages to living Crewmates.",
|
||||
"SpiritGuideEHRInfoLong": "(Crewmate Ghost):\\nSend messages to living Crewmates.",
|
||||
"Influencer": "Influencer",
|
||||
"InfluencerInfo": "Send messages to living Crewmates.",
|
||||
"InfluencerInfoLong": "(Crewmate Ghost):\\nSend messages to living Crewmates.",
|
||||
"SpiritGuideCooldown": "Message Cooldown",
|
||||
"Detour": "Detour",
|
||||
"DetourInfo": "Pass Kills Onto Nearest Player",
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
using AmongUs.GameOptions;
|
||||
|
||||
namespace EHR.Roles;
|
||||
|
||||
public class Influencer : IGhostRole
|
||||
{
|
||||
private static OptionItem CD;
|
||||
|
||||
public Team Team => Team.Crewmate;
|
||||
public RoleTypes RoleTypes => RoleTypes.SpiritGuide;
|
||||
public int Cooldown => CD.GetInt();
|
||||
|
||||
public void SetupCustomOption()
|
||||
{
|
||||
Options.SetupRoleOptions(647000, TabGroup.OtherRoles, CustomRoles.Influencer);
|
||||
|
||||
CD = new IntegerOptionItem(647002, "SpiritGuideCooldown", new(0, 120, 1), 30, TabGroup.OtherRoles)
|
||||
.SetParent(Options.CustomRoleSpawnChances[CustomRoles.Influencer])
|
||||
.SetValueFormat(OptionFormat.Seconds);
|
||||
}
|
||||
|
||||
public void OnProtect(PlayerControl pc, PlayerControl target)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void OnAssign(PlayerControl pc)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user