Compare commits

..
20 Commits
Author SHA1 Message Date
XtraCube ac2201b3ef Merge branch 'dev' into android
# Conflicts:
#	MiraAPI/Patches/IntroCutscenePatches.cs
2025-09-28 21:03:29 -04:00
XtraCube 992df67e18 Merge branch 'dev' into android 2025-09-25 13:48:08 -04:00
XtraCube 67611471b8 match dev 2025-09-25 12:26:58 -04:00
XtraCube 5ddf48883c Merge branch 'dev' into android 2025-09-25 12:25:31 -04:00
XtraCube df8598db4d Merge branch 'master' into android 2025-09-24 09:41:40 -04:00
XtraCube 134e229523 Merge branch 'dev' into android 2025-09-21 19:50:19 -04:00
XtraCube cc1e89fd32 fix for Android 2025.9.9 2025-09-14 14:09:23 -04:00
XtraCube 8bec9efa5c Merge branch 'dev' into android
# Conflicts:
#	AmongUs.props
2025-09-14 14:08:04 -04:00
XtraCube 41c2a2b118 fix crashing in exilecontroller 2025-09-08 10:20:19 -04:00
XtraCube 7919b32023 fix asset loading issue 2025-08-17 17:09:29 -04:00
XtraCube 95bf1e1448 Merge branch 'master' into android 2025-08-17 16:55:55 -04:00
XtraCube e4adaf7ab4 fix merge issues 2025-08-17 16:02:14 -04:00
XtraCube 4027257b55 Merge branch 'dev' into android
# Conflicts:
#	MiraAPI/Patches/IntroCutscenePatches.cs
2025-08-17 16:01:46 -04:00
XtraCube 6c32c8bed9 Merge branch 'dev' into android 2025-06-30 20:47:26 -04:00
XtraCube 905cc9e335 fix marshalling warning 2025-06-30 20:20:26 -04:00
XtraCube 157aa65c2d update gamelibs 2025-06-30 20:09:17 -04:00
XtraCube 3693ee754a Merge branch 'dev' into 2025.5.20-android
# Conflicts:
#	MiraAPI/Resources/mirabundle-win.bundle
2025-06-30 20:03:08 -04:00
XtraCube 85431d3685 offset buttons for android 2025-05-22 22:38:51 -04:00
XtraCube 2ac6c55cf8 fix mira for new android 2025-05-22 20:29:11 -04:00
XtraCube db69446352 add android assetbundle 2025-05-22 15:07:05 -04:00
12 changed files with 33 additions and 57 deletions

No files matched your search

+2 -2
View File
@@ -2,12 +2,12 @@
<ItemGroup>
<PackageReference Include="Reactor" Version="2.3.1" />
<PackageReference Include="BepInEx.Unity.IL2CPP" Version="6.0.0-be.735" Private="false" ExcludeAssets="runtime;native" />
<PackageReference Include="AmongUs.GameLibs.Steam" Version="2025.9.9" PrivateAssets="all" />
<PackageReference Include="AmongUs.GameLibs.Android" Version="2025.9.9" PrivateAssets="all" />
<PackageReference Include="BepInEx.AutoPlugin" Version="1.1.0" PrivateAssets="all" />
<PackageReference Include="BepInEx.IL2CPP.MSBuild" Version="2.1.0-rc.1" PrivateAssets="all" ExcludeAssets="runtime" />
</ItemGroup>
<Target Name="Copy" AfterTargets="Build" Condition="'$(AmongUs)' != ''">
<Copy SourceFiles="$(TargetPath)" DestinationFolder="$(AmongUs)/BepInEx/plugins/" UseSymboliclinksIfPossible="true" />
</Target>
+1 -1
View File
@@ -8,7 +8,7 @@
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
<VersionPrefix>0.3.2</VersionPrefix>
<VersionPrefix>0.3.1</VersionPrefix>
<VersionSuffix>dev</VersionSuffix>
<Authors>All Of Us, XtraCube, Angxl</Authors>
+4 -21
View File
@@ -1,5 +1,4 @@
using System;
using System.Collections;
using System.Collections;
using System.Linq;
using AmongUs.Data;
using AmongUs.GameOptions;
@@ -9,10 +8,8 @@ using MiraAPI.Events;
using MiraAPI.Events.Vanilla.Gameplay;
using Reactor.Networking.Attributes;
using Reactor.Networking.Rpc;
using Reactor.Utilities;
using Reactor.Utilities.Extensions;
using UnityEngine;
using Object = UnityEngine.Object;
namespace MiraAPI.Networking;
@@ -172,14 +169,7 @@ public static class CustomMurderRpc
if (showKillAnim)
{
try
{
HudManager.Instance.KillOverlay.ShowKillAnimation(source.Data, data);
}
catch (Exception e)
{
Logger<MiraApiPlugin>.Error($"Error with kill animation: {e.ToString()}");
}
HudManager.Instance.KillOverlay.ShowKillAnimation(source.Data, data);
}
target.cosmetics.SetNameMask(false);
@@ -212,7 +202,7 @@ public static class CustomMurderRpc
bool teleportMurderer = true)
{
var cam = Camera.main?.GetComponent<FollowerCamera>();
var isParticipant = source.AmOwner || target.AmOwner;
var isParticipant = PlayerControl.LocalPlayer == source || PlayerControl.LocalPlayer == target;
var sourcePhys = source.MyPhysics;
if (teleportMurderer)
@@ -232,7 +222,7 @@ public static class CustomMurderRpc
if (createDeadBody)
{
deadBody = Object.Instantiate(GameManager.Instance.GetDeadBody(source.Data.Role));
deadBody = Object.Instantiate(GameManager.Instance.deadBodyPrefab[0]);
deadBody.enabled = false;
deadBody.ParentId = target.PlayerId;
deadBody.bodyRenderers.ToList().ForEach(target.SetPlayerMaterialColors);
@@ -243,13 +233,6 @@ public static class CustomMurderRpc
deadBody.transform.position = vector;
}
source.Data.Role.KillAnimSpecialSetup(deadBody, source, target);
target.Data.Role.KillAnimSpecialSetup(deadBody, source, target);
// no idea if this causes bugs, but innersloth is brain-dead
// I HATE INNERSCUFF I HATE INNERSCUFF I HATE INNERSCUFF I HATE INNERSCUFF I HATE INNERSCUFF I HATE INNERSCUFF
PlayerControl.LocalPlayer.Data.Role.KillAnimSpecialSetup(deadBody, source, target);
if (isParticipant)
{
if (cam != null)
+9
View File
@@ -7,6 +7,15 @@ namespace MiraAPI.Patches.Events;
internal static class EndGamePatches
{
[HarmonyPatch(typeof(GameManager), nameof(GameManager.Awake))]
public static class GameManagerAwakePatch
{
public static void Postfix(GameManager __instance)
{
__instance.enabled = true;
}
}
[HarmonyPatch(typeof(GameManager), nameof(GameManager.RpcEndGame))]
public static class GameManagerRpcEndGamePatch
{
+9 -13
View File
@@ -73,21 +73,17 @@ public static class HudManagerPatches
gridArrange.Alignment = GridArrange.StartAlign.Right;
aspectPosition.Alignment = AspectPosition.EdgeAlignments.LeftBottom;
if (Constants.GetPlatformType() is Platforms.Android or Platforms.IPhone)
var fakeButton = Object.Instantiate(__instance.AbilityButton, BottomLeft.transform);
foreach (var renderer in fakeButton.GetComponentsInChildren<Renderer>())
{
var fakeButton = Object.Instantiate(__instance.AbilityButton, BottomLeft.transform);
foreach (var renderer in fakeButton.GetComponentsInChildren<Renderer>())
{
renderer.enabled = false;
}
fakeButton.buttonLabelText.Destroy();
fakeButton.cooldownTimerText.Destroy();
fakeButton.usesRemainingText.Destroy();
fakeButton.GetComponent<PassiveButton>().Destroy();
fakeButton.ToggleVisible(true);
fakeButton.Destroy();
renderer.enabled = false;
}
fakeButton.buttonLabelText.Destroy();
fakeButton.cooldownTimerText.Destroy();
fakeButton.usesRemainingText.Destroy();
fakeButton.GetComponent<PassiveButton>().Destroy();
fakeButton.ToggleVisible(true);
fakeButton.Destroy();
foreach (var button in CustomButtonManager.CustomButtons)
{
@@ -344,7 +344,7 @@ public static class LobbyViewPanePatches
}
viewSettingsInfoPanelRoleVariant.SetInfo(
roleBehaviour.GetRoleName(),
roleBehaviour.NiceName,
numPerGame,
chancePerGame,
61,
@@ -473,7 +473,9 @@ public static class RoleSettingMenuPatches
RolePositions[GameSettingMenuPatches.SelectedModIdx] = __instance.scrollBar.Inner.localPosition;
__instance.roleDescriptionText.text = customRole.RoleLongDescription;
__instance.roleTitleText.text = role.GetRoleName();
__instance.roleTitleText.text = TranslationController.Instance.GetString(
role.StringName,
new Il2CppReferenceArray<Il2CppSystem.Object>(0));
var imgBg = __instance.AdvancedRolesSettings.transform.FindChild("Imagebackground");
var labelBg = __instance.AdvancedRolesSettings.transform.FindChild("InfoLabelBackground");
@@ -577,7 +579,6 @@ public static class RoleSettingMenuPatches
roleOptionSetting.transform.localPosition = new Vector3(-0.1f, ScrollerNum, -2f);
roleOptionSetting.SetRole(GameOptionsManager.Instance.CurrentGameOptions.RoleOptions, role, 20);
roleOptionSetting.titleText.text = role.GetRoleName();
roleOptionSetting.labelSprite.color = customRole.OptionsMenuColor;
roleOptionSetting.OnValueChanged = new Action<OptionBehaviour>(ValueChanged);
roleOptionSetting.SetClickMask(__instance.ButtonClickMask);
+2 -3
View File
@@ -1,12 +1,11 @@
using HarmonyLib;
using MiraAPI.Roles;
using MiraAPI.Utilities;
using UnityEngine;
namespace MiraAPI.Patches.Roles;
/// <summary>
/// Patches the haunt menu to show the actual role name rather than team.
/// Patches the haunt menu to show the actual role name rather then team.
/// </summary>
[HarmonyPatch(typeof(HauntMenuMinigame), nameof(HauntMenuMinigame.SetHauntTarget))]
// SetFilterText was INLINED
@@ -23,7 +22,7 @@ public static class HauntMenuMinigamePatch
var role = __instance.HauntTarget.Data.Role;
var color = role is ICustomRole custom ? custom.RoleColor : role.TeamColor;
__instance.FilterText.text = role.GetRoleName();
__instance.FilterText.text = role.NiceName;
__instance.FilterText.color = color;
}
}
-10
View File
@@ -4,7 +4,6 @@ using System.Linq;
using AmongUs.GameOptions;
using Il2CppInterop.Runtime;
using Il2CppInterop.Runtime.Injection;
using Il2CppInterop.Runtime.InteropTypes.Arrays;
using MiraAPI.Networking;
using MiraAPI.PluginLoading;
using MiraAPI.Utilities;
@@ -54,9 +53,6 @@ public static class CustomRoleManager
internal static readonly Dictionary<ushort, RoleBehaviour> CustomRoles = [];
internal static readonly Dictionary<Type, ushort> RoleIds = [];
private static Il2CppSystem.Collections.Generic.List<BaseGameSetting>? _emptySettings;
private static Il2CppReferenceArray<OverlayKillAnimation>? _emptyKillAnimations;
private static ushort _roleId = 100;
private static ushort GetNextRoleId()
@@ -137,12 +133,6 @@ public static class CustomRoleManager
roleBehaviour.MaxCount = customRole.Configuration.MaxRoleCount;
roleBehaviour.RoleScreenshot = customRole.Configuration.OptionsScreenshot?.LoadAsset();
_emptySettings ??= new(0);
_emptyKillAnimations ??= new(0);
roleBehaviour.AllGameSettings = _emptySettings;
roleBehaviour.CustomKillAnimations = _emptyKillAnimations;
if (customRole.Configuration.Icon != null)
{
var asset = customRole.Configuration.Icon.LoadAsset();
+1 -4
View File
@@ -19,10 +19,7 @@ public static class SpriteTools
/// <exception cref="ArgumentException">Thrown when the resource cannot be found in the specified assembly.</exception>
public static Texture2D LoadTextureFromResourcePath(string resourcePath, Assembly assembly)
{
var tex = new Texture2D(1, 1, TextureFormat.ARGB32, false)
{
wrapMode = TextureWrapMode.Clamp,
};
var tex = new Texture2D(1, 1, TextureFormat.ARGB32, false);
var myStream = assembly.GetManifestResourceStream(resourcePath);
if (myStream != null)
{
+1
View File
@@ -6,5 +6,6 @@
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
<add key="Reactor" value="https://nuget.reactor.gg/v3/index.json" />
<add key="Samboy063" value="https://nuget.samboy.dev/v3/index.json" />
<add key="Local" value="packages/" />
</packageSources>
</configuration>
Binary file not shown.