Skip to content

Commit

Permalink
Update v4.3.3
Browse files Browse the repository at this point in the history
  • Loading branch information
gendelo3 committed Jul 16, 2023
1 parent a77e6bd commit 607b4c3
Show file tree
Hide file tree
Showing 24 changed files with 551 additions and 322 deletions.
24 changes: 17 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,16 @@ The [Role Assignment](#role-assignment) sections explains how the roles are bein
# Releases
| Among Us - Version| Mod Version | Link |
|----------|-------------|-----------------|
| 2023.07.12s| v4.3.3| [Download](https://github.com/Eisbison/TheOtherRoles/releases/download/v4.3.3/TheOtherRoles.zip)
| 2023.03.28s| v4.3.2| [Download](https://github.com/Eisbison/TheOtherRoles/releases/download/v4.3.2/TheOtherRoles.zip)
| 2023.03.28s| v4.3.1| [Download](https://github.com/Eisbison/TheOtherRoles/releases/download/v4.3.1/TheOtherRoles.zip)
| 2023.02.28s| v4.3.0| [Download](https://github.com/Eisbison/TheOtherRoles/releases/download/v4.3.0/TheOtherRoles.zip)
| 2022.12.14s| v4.2.1| [Download](https://github.com/Eisbison/TheOtherRoles/releases/download/v4.2.1/TheOtherRoles.zip)
<details>
<summary>Click to show older versions</summary>

| Among Us - Version| Mod Version | Link |
|----------|-------------|-----------------|
| 2023.03.28s| v4.3.1| [Download](https://github.com/Eisbison/TheOtherRoles/releases/download/v4.3.1/TheOtherRoles.zip)
| 2023.02.28s| v4.3.0| [Download](https://github.com/Eisbison/TheOtherRoles/releases/download/v4.3.0/TheOtherRoles.zip)
| 2022.12.14s| v4.2.1| [Download](https://github.com/Eisbison/TheOtherRoles/releases/download/v4.2.1/TheOtherRoles.zip)
| 2022.10.25s| v4.2.0| [Download](https://github.com/Eisbison/TheOtherRoles/releases/download/v4.2.0/TheOtherRoles.zip)
| 2022.9.20s| v4.1.7| [Download](https://github.com/Eisbison/TheOtherRoles/releases/download/v4.1.7/TheOtherRoles.zip)
| 2022.6.21s| v4.1.6| [Download](https://github.com/Eisbison/TheOtherRoles/releases/download/v4.1.6/TheOtherRoles.zip)
Expand Down Expand Up @@ -123,6 +124,15 @@ The [Role Assignment](#role-assignment) sections explains how the roles are bein
<details>
<summary>Click to show the Changelog</summary>

**Version 4.3.3**
- Updated to Among Us version 2023.07.12
- Fixed an issue where the swap icon of a swapper guesser would be in front of the witch icon on a spelled player
- Fixed an issue where haunting was impossible in vanilla Hide'n'Seek
- Fixed an issue where the settings for the Trapper would not appear in the in-game settings shower
- Fixed a bug where the Arsonists win would show "killed by" on dead players in the summary screen
- Fixed a bug where placing a garlic would convert a random player into a horse for the rest of the round
- Changed the Eraser Guesser: Jackal and Sidekick are no longer guessable after being fake-"erased"

**Version 4.3.2**
- Added new option to Thief: Can Guess To Steal Role
- Added new option to Guesser Mode: Force Thief Guesser
Expand Down Expand Up @@ -777,6 +787,7 @@ docker run -d -p 22023:22023/udp --env IMPOSTOR_AntiCheatEnabled=false --env IMP
[Ottomated](https://twitter.com/ottomated_) - Idea for the Morphling, Snitch and Camouflager role came from **Ottomated**\
[Crowded-Mod](https://github.com/CrowdedMods/CrowdedMod) - Our implementation for 10+ player lobbies were 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 came from **Slushiegoose**\
[TheEpicRoles](https://github.com/LaicosVK/TheEpicRoles) - Idea for the first kill shield (partly) and the tabbed option menu (fully + some code), by **LaicosVK** **DasMonschta** **Nova**\
[Ninja](#ninja), [Thief](#thief), [Lawyer](#lawyer) / [Pursuer](#pursuer), [Deputy](#deputy), [Portalmaker](#portalmaker), [Guesser Modifier](#guesser-modifier) - Idea: [K3ndo](https://github.com/K3ndoo) ; Developed by [Gendelo](https://github.com/gendelo3) & [Mallöris](https://github.com/Mallaris)

# Settings
Expand Down Expand Up @@ -1352,8 +1363,7 @@ If the Thief tries to kill any non-killing role (Crewmate or Neutral), they die
**NOTE**
- If the option "Thief Can Kill Sheriff" is On, the Thief has tasks which will ONLY begin to count, if they kill
the Sheriff. While the Thief hasn't fired, their tasks do not count towards the taskwin.
- If the option "Thief Can Kill Sheriff" is Off, the Thief will not have tasks.

- If the option "Thief Can Kill Sheriff" is Off, the Thief will not have tasks.
- If the Thief kills the witch, already witched players stay witched (except for the Thief).
- If the Thief can guess to steal the role, guessing the witch will either save all targets or none of the targets (depending on the setting for Witch: Voting The Witch Saves All The Targets)

Expand Down Expand Up @@ -2008,8 +2018,8 @@ Players can additionally have a modifier, if enabled (e.g. Medic Guesser Mini).
| Number of Crew Guessers | -
| Number of Neutral Guessers | -
| Number of Impostor Guessers | -
| Force Jackal Guesser | If set to "On", the first neutral role who will be Guesser is the Jackal.
| Force Thief Guesser | If set to "On", the first (or second if Force Jackal Guesser) neutral role who will be Guesser is the Thief.
| Force Jackal Guesser | If set to "On", the first neutral role who will be Guesser is the Jackal.
| Force Thief Guesser | If set to "On", the first (or second if Force Jackal Guesser) neutral role who will be Guesser is the Thief.
| Guessers Can Have A Modifier | -
| Guesser Number Of Shots | -
| Guesser Can Shoot Multiple Times Per Meeting | -
Expand Down
2 changes: 1 addition & 1 deletion TheOtherRoles/Buttons.cs
Original file line number Diff line number Diff line change
Expand Up @@ -836,7 +836,6 @@ public static void createButtonsPostfix(HudManager __instance) {

garlicButton = new CustomButton(
() => {
Utilities.EventUtility.StartEvent(EventUtility.EventTypes.Animation);
Vampire.localPlacedGarlic = true;
var pos = CachedPlayer.LocalPlayer.transform.position;
byte[] buff = new byte[sizeof(float) * 2];
Expand Down Expand Up @@ -1262,6 +1261,7 @@ public static void createButtonsPostfix(HudManager __instance) {
if (GameOptionsManager.Instance.currentNormalGameOptions.MapId != 1) {
if (SecurityGuard.minigame == null) {
byte mapId = GameOptionsManager.Instance.currentNormalGameOptions.MapId;
UnityEngine.Object.FindObjectsOfType<SystemConsole>().ToList().ForEach(x => TheOtherRolesPlugin.Logger.LogMessage($"{x.name} {x.GetType()}, {x.MinigamePrefab.TaskType}"));
var e = UnityEngine.Object.FindObjectsOfType<SystemConsole>().FirstOrDefault(x => x.gameObject.name.Contains("Surv_Panel") || x.name.Contains("Cam"));
if (mapId == 0 || mapId == 3) e = UnityEngine.Object.FindObjectsOfType<SystemConsole>().FirstOrDefault(x => x.gameObject.name.Contains("SurvConsole"));
else if (mapId == 4) e = UnityEngine.Object.FindObjectsOfType<SystemConsole>().FirstOrDefault(x => x.gameObject.name.Contains("task_cams"));
Expand Down
3 changes: 2 additions & 1 deletion TheOtherRoles/GameHistory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ public enum CustomDeathReason {
LawyerSuicide,
LoverSuicide, // not necessary
WitchExile,
Bomb
Bomb,
Arson,
};

public PlayerControl player;
Expand Down
15 changes: 7 additions & 8 deletions TheOtherRoles/Helpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
using TheOtherRoles.CustomGameModes;
using Reactor.Utilities.Extensions;
using AmongUs.GameOptions;
using Innersloth.Assets;

namespace TheOtherRoles {

Expand Down Expand Up @@ -288,7 +289,10 @@ public static void setLook(this PlayerControl target, String playerName, int col
target.RawSetHat(hatId, colorId);
target.RawSetName(hidePlayerName(CachedPlayer.LocalPlayer.PlayerControl, target) ? "" : playerName);

SkinViewData nextSkin = FastDestroyableSingleton<HatManager>.Instance.GetSkinById(skinId).viewData.viewData;

SkinViewData nextSkin = null;
try { nextSkin = ShipStatus.Instance.CosmeticsCache.GetSkin(skinId); } catch { return; };

PlayerPhysics playerPhysics = target.MyPhysics;
AnimationClip clip = null;
var spriteAnim = playerPhysics.myPlayer.cosmetics.skin.animator;
Expand All @@ -309,12 +313,7 @@ public static void setLook(this PlayerControl target, String playerName, int col
spriteAnim.m_animator.Play("a", 0, progress % 1);
spriteAnim.m_animator.Update(0f);

if (target.cosmetics.currentPet) UnityEngine.Object.Destroy(target.cosmetics.currentPet.gameObject);
target.cosmetics.currentPet = UnityEngine.Object.Instantiate<PetBehaviour>(FastDestroyableSingleton<HatManager>.Instance.GetPetById(petId).viewData.viewData);
target.cosmetics.currentPet.transform.position = target.transform.position;
target.cosmetics.currentPet.Source = target;
target.cosmetics.currentPet.Visible = target.Visible;
target.SetPlayerMaterialColors(target.cosmetics.currentPet.rend);
target.RawSetPet(petId, colorId);

if (enforceNightVisionUpdate) Patches.SurveillanceMinigamePatch.enforceNightVision(target);
Chameleon.update(); // so that morphling and camo wont make the chameleons visible
Expand Down Expand Up @@ -514,7 +513,7 @@ public static void toggleZoom(bool reset=false) {
HudManagerStartPatch.zoomOutButton.Sprite = zoomOutStatus ? Helpers.loadSpriteFromResources("TheOtherRoles.Resources.PlusButton.png", 75f) : Helpers.loadSpriteFromResources("TheOtherRoles.Resources.MinusButton.png", 150f);
HudManagerStartPatch.zoomOutButton.PositionOffset = zoomOutStatus ? new Vector3(0f, 3f, 0) : new Vector3(0.4f, 2.8f, 0);
}
ResolutionManager.ResolutionChanged.Invoke((float)Screen.width / Screen.height); // This will move button positions to the correct position.
ResolutionManager.ResolutionChanged.Invoke((float)Screen.width / Screen.height, Screen.width, Screen.height, Screen.fullScreen); // This will move button positions to the correct position.
}

public static async Task checkBeta() {
Expand Down
8 changes: 3 additions & 5 deletions TheOtherRoles/Main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ namespace TheOtherRoles
public class TheOtherRolesPlugin : BasePlugin
{
public const string Id = "me.eisbison.theotherroles";
public const string VersionString = "4.3.2";
public const string VersionString = "4.3.3";
public static uint betaDays = 0; // amount of days for the build to be usable (0 for infinite!)

public static Version Version = Version.Parse(VersionString);
Expand Down Expand Up @@ -112,18 +112,16 @@ public override void Load() {

DebugMode = Config.Bind("Custom", "Enable Debug Mode", "false");
Harmony.PatchAll();

CustomOptionHolder.Load();
CustomColors.Load();

if (BepInExUpdater.UpdateRequired)
{
AddComponent<BepInExUpdater>();
return;
}

EventUtility.Load();

SubmergedCompatibility.Initialize();
AddComponent<ModUpdateBehaviour>();
Modules.MainMenuPatch.addSceneChangeCallbacks();
Expand Down Expand Up @@ -205,4 +203,4 @@ public static string RandomString(int length)
.Select(s => s[random.Next(s.Length)]).ToArray());
}
}
}
}
4 changes: 2 additions & 2 deletions TheOtherRoles/Modules/BepInExUpdater.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ namespace TheOtherRoles.Modules;

public class BepInExUpdater : MonoBehaviour
{
public const string RequiredBepInExVersion = "6.0.0-be.664+0b23557c1355913983f3540797fa22c43a02247d";
public const string BepInExDownloadURL = "https://builds.bepinex.dev/projects/bepinex_be/664/BepInEx-Unity.IL2CPP-win-x86-6.0.0-be.664%2B0b23557.zip";
public const string RequiredBepInExVersion = "6.0.0-be.670+42a6727370c2b9356fc043ea601410540a8b4042";
public const string BepInExDownloadURL = "https://builds.bepinex.dev/projects/bepinex_be/670/BepInEx-Unity.IL2CPP-win-x86-6.0.0-be.670%2B42a6727.zip";
public static bool UpdateRequired => Paths.BepInExVersion.ToString() != RequiredBepInExVersion;

public void Awake()
Expand Down
6 changes: 3 additions & 3 deletions TheOtherRoles/Modules/ChatCommands.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public static class ChatCommands {
[HarmonyPatch(typeof(ChatController), nameof(ChatController.SendChat))]
private static class SendChatPatch {
static bool Prefix(ChatController __instance) {
string text = __instance.TextArea.text;
string text = __instance.freeChatField.Text;
bool handled = false;
if (AmongUsClient.Instance.GameState != InnerNet.InnerNetClient.GameStates.Started) {
if (text.ToLower().StartsWith("/kick ")) {
Expand Down Expand Up @@ -65,8 +65,8 @@ static bool Prefix(ChatController __instance) {
}

if (handled) {
__instance.TextArea.Clear();
__instance.quickChatMenu.ResetGlyphs();
__instance.freeChatField.Clear();
__instance.quickChatMenu.Clear();
}
return !handled;
}
Expand Down
Loading

0 comments on commit 607b4c3

Please sign in to comment.