From: Eisbison Date: Sat, 6 Nov 2021 17:08:38 +0000 (+0100) Subject: Version 2.9.1 X-Git-Url: https://git.deb.at/?a=commitdiff_plain;h=f60d07052856ef8abf7db21819fddce70d141ef9;p=rhonda%2Ftheotherroles.git Version 2.9.1 --- diff --git a/README.md b/README.md index e1eaace..ff1e28e 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,7 @@ The [Role Assignment](#role-assignment) sections explains how the roles are bein # Releases | Among Us - Version| Mod Version | Link | |----------|-------------|-----------------| +| 2021.6.30s| v2.9.1| [Download](https://github.com/Eisbison/TheOtherRoles/releases/download/v2.9.1/TheOtherRoles.zip) | 2021.6.30s| v2.9.0| [Download](https://github.com/Eisbison/TheOtherRoles/releases/download/v2.9.0/TheOtherRoles.zip) | 2021.6.30s| v2.8.1| [Download](https://github.com/Eisbison/TheOtherRoles/releases/download/v2.8.1/TheOtherRoles.zip) | 2021.6.30s| v2.8.0| [Download](https://github.com/Eisbison/TheOtherRoles/releases/download/v2.8.0/TheOtherRoles.zip) @@ -77,6 +78,14 @@ The [Role Assignment](#role-assignment) sections explains how the roles are bein
Click to show the Changelog +**Version 2.9.1** +- Fixed a bug where [Camouflager](#camouflager) & [Morphling](#morphling) caused performance issues +- Fixed a bug where [Medium](#medium) did not exlude the Evil [Mini](#mini) +- [Vulture](#vulture) "Number Of Corpses Needed To Be Eaten" max value extended to 10 +- Added Vulture Option: "Show Arrows Pointing Towards The Corpes" +- Removed Medium Question: "What is your name?" (name of the soul is added after each question) + + **Version 2.9.0** - **New Role:** [Medium](#medium) - **New Role:** [Vulture](#vulture) @@ -418,6 +427,7 @@ docker run -d -p 22023:22023/udp --env IMPOSTOR_AntiCheat__Enabled=false --env I [TownOfUs](https://github.com/slushiegoose/Town-Of-Us) - Idea for the Swapper, Shifter, Arsonist and a similar Mayor role come from **Slushiegoose**\ [Ottomated](https://twitter.com/ottomated_) - Idea for the Morphling, Snitch and Camouflager role come from **Ottomated**\ [Crowded-Mod](https://github.com/CrowdedMods/CrowdedMod) - Our implementation for 10+ player lobbies is inspired by the one from the **Crowded Mod Team**\ +[Goose-Goose-Duck](https://store.steampowered.com/app/1568590/Goose_Goose_Duck) - Idea for the Vulture role come from **Slushygoose** # Settings The mod adds a few new settings to Among Us (in addition to the role settings): @@ -1155,7 +1165,7 @@ Created by [Mallöris](https://github.com/Mallaris)\ \ The medium is a crewmate who can ask the souls of dead players for information. Like the Seer, it sees the places where the players have died (after the next meeting) and can question them. It then gets random information about the soul or the killer in the chat. The souls only stay for one round, i.e. until the next meeting. Depending on the options, the souls can only be questioned once and then disappear. -Questions: What is your name? +Questions: What is your Role? What is your killer's color type? When did you die? @@ -1164,7 +1174,7 @@ What is your killers role? (mini exluded) ### Game Options | Name | Description |----------|:-------------:| -| Bait Spawn Chance | - +| Medium Spawn Chance | - | Medium Cooldown | - | Medium Duration | The time it takes to question a soul | Medium Each Soul Can Only Be Questioned Once | If set to true, souls can only be questioned once and then disappear @@ -1177,7 +1187,7 @@ Created by [Mallöris](https://github.com/Mallaris)\ \ The Vulture does not have any tasks, he has to win the game as a solo.\ The Vulture is a neutral role that must eat a specified number of corpses (depending on the options) in order to win.\ -When a player dies, the Vulture gets an arrow pointing to the corpse. +Depending on the options, when a player dies, the Vulture gets an arrow pointing to the corpse. ### Game Options | Name | Description | @@ -1186,6 +1196,7 @@ When a player dies, the Vulture gets an arrow pointing to the corpse. | Vulture Countdown | - | Number Of Corpses Needed To Be Eaten | Corpes needed to be eaten to win the game | Vulture Can Use Vents | - +| Show Arrows Pointing Towards The Corpes | - ----------------------- # Source code diff --git a/TheOtherRoles/Buttons.cs b/TheOtherRoles/Buttons.cs index 9f6520c..f51b10f 100644 --- a/TheOtherRoles/Buttons.cs +++ b/TheOtherRoles/Buttons.cs @@ -859,15 +859,16 @@ namespace TheOtherRoles if (Medium.target == null || Medium.target.player == null) return; string msg = ""; - int randomNumber = Medium.target.player.PlayerId == Mini.mini?.PlayerId ? TheOtherRoles.rnd.Next(4) : TheOtherRoles.rnd.Next(5); + int randomNumber = Medium.target.killerIfExisting?.PlayerId == Mini.mini?.PlayerId ? TheOtherRoles.rnd.Next(3) : TheOtherRoles.rnd.Next(4); string typeOfColor = Helpers.isLighterColor(Medium.target.killerIfExisting.Data.ColorId) ? "lighter" : "darker"; float timeSinceDeath = ((float)(Medium.meetingStartTime - Medium.target.timeOfDeath).TotalMilliseconds); - - if (randomNumber == 0) msg = "What is your Name? My name is " + Medium.target.player.Data.PlayerName; - else if (randomNumber == 1) msg = "What is your role? My role is " + RoleInfo.GetRole(Medium.target.player); - else if (randomNumber == 2) msg = "What is your killer`s color type? My killer is a " + typeOfColor + " color"; - else if (randomNumber == 3) msg = "When did you die? I have died " + Math.Round(timeSinceDeath / 1000) + "s before meeting started"; - else msg = "What is your killer`s role? My killer is " + RoleInfo.GetRole(Medium.target.killerIfExisting); //exlude mini + string name = " (" + Medium.target.player.Data.PlayerName + ")"; + + + if (randomNumber == 0) msg = "What is your role? My role is " + RoleInfo.GetRole(Medium.target.player) + name; + else if (randomNumber == 1) msg = "What is your killer`s color type? My killer is a " + typeOfColor + " color" + name; + else if (randomNumber == 2) msg = "When did you die? I have died " + Math.Round(timeSinceDeath / 1000) + "s before meeting started" + name; + else msg = "What is your killer`s role? My killer is " + RoleInfo.GetRole(Medium.target.killerIfExisting) + name; //exlude mini DestroyableSingleton.Instance.Chat.AddChat(PlayerControl.LocalPlayer, $"{msg}"); diff --git a/TheOtherRoles/CustomOptions.cs b/TheOtherRoles/CustomOptions.cs index 7813a0d..13e0ecc 100644 --- a/TheOtherRoles/CustomOptions.cs +++ b/TheOtherRoles/CustomOptions.cs @@ -172,6 +172,7 @@ namespace TheOtherRoles { public static CustomOption vultureCooldown; public static CustomOption vultureNumberToWin; public static CustomOption vultureCanUseVents; + public static CustomOption vultureShowArrows; public static CustomOption mediumSpawnRate; public static CustomOption mediumCooldown; @@ -283,8 +284,9 @@ namespace TheOtherRoles { vultureSpawnRate = CustomOption.Create(340, cs(Vulture.color, "Vulture"), rates, null, true); vultureCooldown = CustomOption.Create(341, "Vulture Cooldown", 15f, 10f, 60f, 2.5f, vultureSpawnRate); - vultureNumberToWin = CustomOption.Create(342, "Number Of Corpses Needed To Be Eaten", 4f, 0f, 5f, 1f, vultureSpawnRate); + vultureNumberToWin = CustomOption.Create(342, "Number Of Corpses Needed To Be Eaten", 4f, 0f, 10f, 1f, vultureSpawnRate); vultureCanUseVents = CustomOption.Create(343, "Vulture Can Use Vents", true, vultureSpawnRate); + vultureShowArrows = CustomOption.Create(344, "Show Arrows Pointing Towards The Corpes", true, vultureSpawnRate); shifterSpawnRate = CustomOption.Create(70, cs(Shifter.color, "Shifter"), rates, null, true); shifterShiftsModifiers = CustomOption.Create(71, "Shifter Shifts Modifiers", false, shifterSpawnRate); diff --git a/TheOtherRoles/Helpers.cs b/TheOtherRoles/Helpers.cs index 52c2a2f..198ca2c 100644 --- a/TheOtherRoles/Helpers.cs +++ b/TheOtherRoles/Helpers.cs @@ -78,29 +78,6 @@ namespace TheOtherRoles { return res; } - public static void setSkinWithAnim(PlayerPhysics playerPhysics, uint SkinId) { - SkinData nextSkin = DestroyableSingleton.Instance.AllSkins[(int)SkinId]; - AnimationClip clip = null; - var spriteAnim = playerPhysics.Skin.animator; - var anim = spriteAnim.m_animator; - var skinLayer = playerPhysics.Skin; - - var currentPhysicsAnim = playerPhysics.Animator.GetCurrentAnimation(); - if (currentPhysicsAnim == playerPhysics.RunAnim) clip = nextSkin.RunAnim; - else if (currentPhysicsAnim == playerPhysics.SpawnAnim) clip = nextSkin.SpawnAnim; - else if (currentPhysicsAnim == playerPhysics.EnterVentAnim) clip = nextSkin.EnterVentAnim; - else if (currentPhysicsAnim == playerPhysics.ExitVentAnim) clip = nextSkin.ExitVentAnim; - else if (currentPhysicsAnim == playerPhysics.IdleAnim) clip = nextSkin.IdleAnim; - else clip = nextSkin.IdleAnim; - - float progress = playerPhysics.Animator.m_animator.GetCurrentAnimatorStateInfo(0).normalizedTime; - skinLayer.skin = nextSkin; - - spriteAnim.Play(clip, 1f); - anim.Play("a", 0, progress % 1); - anim.Update(0f); - } - public static bool handleMurderAttempt(PlayerControl target, bool isMeetingStart = false) { // Block impostor shielded kill if (Medic.shielded != null && Medic.shielded == target) { @@ -248,5 +225,51 @@ namespace TheOtherRoles { } return result; } + + public static bool hidePlayerName(PlayerControl source, PlayerControl target) { + if (!MapOptions.hidePlayerNames) return false; // All names are visible + else if (source == null || target == null) return true; + else if (source == target) return false; // Player sees his own name + else if (source.Data.IsImpostor && (target.Data.IsImpostor || target == Spy.spy)) return false; // Members of team Impostors see the names of Impostors/Spies + else if ((source == Lovers.lover1 || source == Lovers.lover2) && (target == Lovers.lover1 || target == Lovers.lover2)) return false; // Members of team Lovers see the names of each other + else if ((source == Jackal.jackal || source == Sidekick.sidekick) && (target == Jackal.jackal || target == Sidekick.sidekick || target == Jackal.fakeSidekick)) return false; // Members of team Jackal see the names of each other + return true; + } + + public static void setDefaultLook(this PlayerControl target) { + target.setLook(target.Data.PlayerName, target.Data.ColorId, target.Data.HatId, target.Data.SkinId, target.Data.PetId); + } + + public static void setLook(this PlayerControl target, String playerName, int colorId, uint hatId, uint skinId, uint petId) { + target.nameText.text = hidePlayerName(PlayerControl.LocalPlayer, target) ? "" : playerName; + target.myRend.material.SetColor("_BackColor", Palette.ShadowColors[colorId]); + target.myRend.material.SetColor("_BodyColor", Palette.PlayerColors[colorId]); + target.HatRenderer.SetHat(hatId, colorId); + target.nameText.transform.localPosition = new Vector3(0f, ((hatId == 0U) ? 0.7f : 1.05f) * 2f, -0.5f); + + SkinData nextSkin = DestroyableSingleton.Instance.AllSkins[(int)skinId]; + PlayerPhysics playerPhysics = target.MyPhysics; + AnimationClip clip = null; + var spriteAnim = playerPhysics.Skin.animator; + var currentPhysicsAnim = playerPhysics.Animator.GetCurrentAnimation(); + if (currentPhysicsAnim == playerPhysics.RunAnim) clip = nextSkin.RunAnim; + else if (currentPhysicsAnim == playerPhysics.SpawnAnim) clip = nextSkin.SpawnAnim; + else if (currentPhysicsAnim == playerPhysics.EnterVentAnim) clip = nextSkin.EnterVentAnim; + else if (currentPhysicsAnim == playerPhysics.ExitVentAnim) clip = nextSkin.ExitVentAnim; + else if (currentPhysicsAnim == playerPhysics.IdleAnim) clip = nextSkin.IdleAnim; + else clip = nextSkin.IdleAnim; + float progress = playerPhysics.Animator.m_animator.GetCurrentAnimatorStateInfo(0).normalizedTime; + playerPhysics.Skin.skin = nextSkin; + spriteAnim.Play(clip, 1f); + spriteAnim.m_animator.Play("a", 0, progress % 1); + spriteAnim.m_animator.Update(0f); + + if (target.CurrentPet) UnityEngine.Object.Destroy(target.CurrentPet.gameObject); + target.CurrentPet = UnityEngine.Object.Instantiate(DestroyableSingleton.Instance.AllPets[(int)petId]); + target.CurrentPet.transform.position = target.transform.position; + target.CurrentPet.Source = target; + target.CurrentPet.Visible = target.Visible; + PlayerControl.SetPlayerMaterialColors(colorId, target.CurrentPet.rend); + } } } diff --git a/TheOtherRoles/Main.cs b/TheOtherRoles/Main.cs index 10129cc..3104002 100644 --- a/TheOtherRoles/Main.cs +++ b/TheOtherRoles/Main.cs @@ -21,7 +21,7 @@ namespace TheOtherRoles public class TheOtherRolesPlugin : BasePlugin { public const string Id = "me.eisbison.theotherroles"; - public const string VersionString = "2.9.0"; + public const string VersionString = "2.9.1"; public static System.Version Version = System.Version.Parse(VersionString); public Harmony Harmony { get; } = new Harmony(Id); diff --git a/TheOtherRoles/Patches/PlayerControlPatch.cs b/TheOtherRoles/Patches/PlayerControlPatch.cs index ea66773..b1fddf9 100644 --- a/TheOtherRoles/Patches/PlayerControlPatch.cs +++ b/TheOtherRoles/Patches/PlayerControlPatch.cs @@ -559,7 +559,7 @@ namespace TheOtherRoles.Patches { } } static void vultureUpdate() { - if (Vulture.vulture == null || PlayerControl.LocalPlayer != Vulture.vulture || Vulture.localArrows == null) return; + if (Vulture.vulture == null || PlayerControl.LocalPlayer != Vulture.vulture || Vulture.localArrows == null || !Vulture.showArrows) return; if (Vulture.vulture.Data.IsDead) { foreach (Arrow arrow in Vulture.localArrows) UnityEngine.Object.Destroy(arrow.arrow); Vulture.localArrows = new List(); @@ -602,6 +602,27 @@ namespace TheOtherRoles.Patches { Medium.target = target; } + static void morphlingAndCamouflagerUpdate() { + float oldCamouflageTimer = Camouflager.camouflageTimer; + float oldMorphTimer = Morphling.morphTimer; + Camouflager.camouflageTimer = Mathf.Max(0f, Camouflager.camouflageTimer - Time.fixedDeltaTime); + Morphling.morphTimer = Mathf.Max(0f, Morphling.morphTimer - Time.fixedDeltaTime); + + + // Camouflage reset and set Morphling look if necessary + if (oldCamouflageTimer > 0f && Camouflager.camouflageTimer <= 0f) { + Camouflager.resetCamouflage(); + if (Morphling.morphTimer > 0f && Morphling.morphling != null && Morphling.morphTarget != null) { + PlayerControl target = Morphling.morphTarget; + Morphling.morphling.setLook(target.Data.PlayerName, target.Data.ColorId, target.Data.HatId, target.Data.SkinId, target.Data.PetId); + } + } + + // Morphling reset (only if camouflage is inactive) + if (Camouflager.camouflageTimer <= 0f && oldMorphTimer > 0f && Morphling.morphTimer <= 0f && Morphling.morphling != null) + Morphling.resetMorph(); + } + public static void Postfix(PlayerControl __instance) { if (AmongUsClient.Instance.GameState != InnerNet.InnerNetClient.GameStates.Started) return; @@ -665,6 +686,8 @@ namespace TheOtherRoles.Patches { vultureUpdate(); // Medium mediumSetTarget(); + // Morphling and Camouflager + morphlingAndCamouflagerUpdate(); } } } diff --git a/TheOtherRoles/Patches/UpdatePatch.cs b/TheOtherRoles/Patches/UpdatePatch.cs index a2803b5..3872f27 100644 --- a/TheOtherRoles/Patches/UpdatePatch.cs +++ b/TheOtherRoles/Patches/UpdatePatch.cs @@ -12,21 +12,11 @@ namespace TheOtherRoles.Patches { [HarmonyPatch(typeof(HudManager), nameof(HudManager.Update))] class HudManagerUpdatePatch { - public static bool hidePlayerName(PlayerControl source, PlayerControl target) { - if (!MapOptions.hidePlayerNames) return false; // All names are visible - else if (source == null || target == null) return true; - else if (source == target) return false; // Player sees his own name - else if (source.Data.IsImpostor && (target.Data.IsImpostor || target == Spy.spy)) return false; // Members of team Impostors see the names of Impostors/Spies - else if ((source == Lovers.lover1 || source == Lovers.lover2) && (target == Lovers.lover1 || target == Lovers.lover2)) return false; // Members of team Lovers see the names of each other - else if ((source == Jackal.jackal || source == Sidekick.sidekick) && (target == Jackal.jackal || target == Sidekick.sidekick || target == Jackal.fakeSidekick)) return false; // Members of team Jackal see the names of each other - return true; - } - static void resetNameTagsAndColors() { Dictionary playersById = Helpers.allPlayersById(); foreach (PlayerControl player in PlayerControl.AllPlayerControls) { - player.nameText.text = hidePlayerName(PlayerControl.LocalPlayer, player) ? "" : player.Data.PlayerName; + player.nameText.text = Helpers.hidePlayerName(PlayerControl.LocalPlayer, player) ? "" : player.Data.PlayerName; if (PlayerControl.LocalPlayer.Data.IsImpostor && player.Data.IsImpostor) { player.nameText.color = Palette.ImpostorRed; } else { @@ -189,74 +179,6 @@ namespace TheOtherRoles.Patches { Trickster.lightsOutTimer -= Time.deltaTime; } - static void camouflageAndMorphActions() { - float oldCamouflageTimer = Camouflager.camouflageTimer; - float oldMorphTimer = Morphling.morphTimer; - - Camouflager.camouflageTimer -= Time.deltaTime; - Morphling.morphTimer -= Time.deltaTime; - - // Morphling player size not done here - - // Set morphling morphed look - if (Morphling.morphTimer > 0f && Camouflager.camouflageTimer <= 0f) { - if (Morphling.morphling != null && Morphling.morphTarget != null) { - Morphling.morphling.nameText.text = hidePlayerName(PlayerControl.LocalPlayer, Morphling.morphling) ? "" : Morphling.morphTarget.Data.PlayerName; - Morphling.morphling.myRend.material.SetColor("_BackColor", Palette.ShadowColors[Morphling.morphTarget.Data.ColorId]); - Morphling.morphling.myRend.material.SetColor("_BodyColor", Palette.PlayerColors[Morphling.morphTarget.Data.ColorId]); - Morphling.morphling.HatRenderer.SetHat(Morphling.morphTarget.Data.HatId, Morphling.morphTarget.Data.ColorId); - Morphling.morphling.nameText.transform.localPosition = new Vector3(0f, ((Morphling.morphTarget.Data.HatId == 0U) ? 0.7f : 1.05f) * 2f, -0.5f); - - if (Morphling.morphling.MyPhysics.Skin.skin.ProdId != DestroyableSingleton.Instance.AllSkins[(int)Morphling.morphTarget.Data.SkinId].ProdId) { - Helpers.setSkinWithAnim(Morphling.morphling.MyPhysics, Morphling.morphTarget.Data.SkinId); - } - if (Morphling.morphling.CurrentPet == null || Morphling.morphling.CurrentPet.ProdId != DestroyableSingleton.Instance.AllPets[(int)Morphling.morphTarget.Data.PetId].ProdId) { - if (Morphling.morphling.CurrentPet) UnityEngine.Object.Destroy(Morphling.morphling.CurrentPet.gameObject); - Morphling.morphling.CurrentPet = UnityEngine.Object.Instantiate(DestroyableSingleton.Instance.AllPets[(int)Morphling.morphTarget.Data.PetId]); - Morphling.morphling.CurrentPet.transform.position = Morphling.morphling.transform.position; - Morphling.morphling.CurrentPet.Source = Morphling.morphling; - Morphling.morphling.CurrentPet.Visible = Morphling.morphling.Visible; - PlayerControl.SetPlayerMaterialColors(Morphling.morphTarget.Data.ColorId, Morphling.morphling.CurrentPet.rend); - } else if (Morphling.morphling.CurrentPet) { - PlayerControl.SetPlayerMaterialColors(Morphling.morphTarget.Data.ColorId, Morphling.morphling.CurrentPet.rend); - } - } - } - - // Set camouflaged look (overrides morphling morphed look if existent) - if (Camouflager.camouflageTimer > 0f) { - foreach (PlayerControl p in PlayerControl.AllPlayerControls) { - p.nameText.text = ""; - p.myRend.material.SetColor("_BackColor", Palette.PlayerColors[6]); - p.myRend.material.SetColor("_BodyColor", Palette.PlayerColors[6]); - p.HatRenderer.SetHat(0, 0); - Helpers.setSkinWithAnim(p.MyPhysics, 0); - bool spawnPet = false; - if (p.CurrentPet == null) spawnPet = true; - else if (p.CurrentPet.ProdId != DestroyableSingleton.Instance.AllPets[0].ProdId) { - UnityEngine.Object.Destroy(p.CurrentPet.gameObject); - spawnPet = true; - } - - if (spawnPet) { - p.CurrentPet = UnityEngine.Object.Instantiate(DestroyableSingleton.Instance.AllPets[0]); - p.CurrentPet.transform.position = p.transform.position; - p.CurrentPet.Source = p; - } - } - } - - // Everyone but morphling reset - if (oldCamouflageTimer > 0f && Camouflager.camouflageTimer <= 0f) { - Camouflager.resetCamouflage(); - } - - // Morphling reset - if ((oldMorphTimer > 0f || oldCamouflageTimer > 0f) && Camouflager.camouflageTimer <= 0f && Morphling.morphTimer <= 0f && Morphling.morphling != null) { - Morphling.resetMorph(); - } - } - public static void miniUpdate() { if (Mini.mini == null || Camouflager.camouflageTimer > 0f) return; @@ -308,8 +230,6 @@ namespace TheOtherRoles.Patches { updateImpostorKillButton(__instance); // Timer updates timerUpdate(); - // Camouflager and Morphling - camouflageAndMorphActions(); // Mini miniUpdate(); } diff --git a/TheOtherRoles/RPC.cs b/TheOtherRoles/RPC.cs index 2d974fb..3469019 100644 --- a/TheOtherRoles/RPC.cs +++ b/TheOtherRoles/RPC.cs @@ -460,12 +460,16 @@ namespace TheOtherRoles Morphling.morphTimer = Morphling.duration; Morphling.morphTarget = target; + if (Camouflager.camouflageTimer <= 0f) + Morphling.morphling.setLook(target.Data.PlayerName, target.Data.ColorId, target.Data.HatId, target.Data.SkinId, target.Data.PetId); } public static void camouflagerCamouflage() { if (Camouflager.camouflager == null) return; Camouflager.camouflageTimer = Camouflager.duration; + foreach (PlayerControl player in PlayerControl.AllPlayerControls) + player.setLook("", 6, 0, 0, 0); } public static void vampireSetBitten(byte targetId, byte reset) { diff --git a/TheOtherRoles/TheOtherRoles.cs b/TheOtherRoles/TheOtherRoles.cs index 400e249..2313fdb 100644 --- a/TheOtherRoles/TheOtherRoles.cs +++ b/TheOtherRoles/TheOtherRoles.cs @@ -411,12 +411,7 @@ namespace TheOtherRoles morphTarget = null; morphTimer = 0f; if (morphling == null) return; - morphling.SetName(morphling.Data.PlayerName); - morphling.SetHat(morphling.Data.HatId, (int)morphling.Data.ColorId); - Helpers.setSkinWithAnim(morphling.MyPhysics, morphling.Data.SkinId); - morphling.SetPet(morphling.Data.PetId); - morphling.CurrentPet.Visible = morphling.Visible; - morphling.SetColor(morphling.Data.ColorId); + morphling.setDefaultLook(); } public static void clearAndReload() { @@ -460,17 +455,8 @@ namespace TheOtherRoles public static void resetCamouflage() { camouflageTimer = 0f; - foreach (PlayerControl p in PlayerControl.AllPlayerControls) { - if (p == null) continue; - if (Morphling.morphling == null || Morphling.morphling != p) { - p.SetName(p.Data.PlayerName); - p.SetHat(p.Data.HatId, (int)p.Data.ColorId); - Helpers.setSkinWithAnim(p.MyPhysics, p.Data.SkinId); - p.SetPet(p.Data.PetId); - p.CurrentPet.Visible = p.Visible; - p.SetColor(p.Data.ColorId); - } - } + foreach (PlayerControl p in PlayerControl.AllPlayerControls) + p.setDefaultLook(); } public static void clearAndReload() { @@ -1041,7 +1027,8 @@ namespace TheOtherRoles public static int vultureNumberToWin = 4; public static int eatenBodies = 0; public static bool triggerVultureWin = false; - public static bool canUseVents = false; + public static bool canUseVents = true; + public static bool showArrows = true; private static Sprite buttonSprite; public static Sprite getButtonSprite() { if (buttonSprite) return buttonSprite; @@ -1056,6 +1043,7 @@ namespace TheOtherRoles cooldown = CustomOptionHolder.vultureCooldown.getFloat(); triggerVultureWin = false; canUseVents = CustomOptionHolder.vultureCanUseVents.getBool(); + showArrows = CustomOptionHolder.vultureShowArrows.getBool(); if (localArrows != null) { foreach (Arrow arrow in localArrows) if (arrow?.arrow != null) diff --git a/TheOtherRoles/TheOtherRoles.csproj b/TheOtherRoles/TheOtherRoles.csproj index 87a6e86..0cebdf5 100644 --- a/TheOtherRoles/TheOtherRoles.csproj +++ b/TheOtherRoles/TheOtherRoles.csproj @@ -1,7 +1,7 @@ netstandard2.1 - 2.9.0 + 2.9.1 TheOtherRoles Eisbison