Skip to content

Commit

Permalink
Update v1.0.7.7
Browse files Browse the repository at this point in the history
  • Loading branch information
mxyx0412 committed Sep 16, 2024
1 parent d0b246e commit 785df67
Show file tree
Hide file tree
Showing 14 changed files with 51 additions and 35 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

| 游戏版本 | 模组版本 | 发布日期 | 链接 |
| ------------------- | -------- | --------- | ------------------------------------------------------------ |
| 2024.3.5 ~ 2024.6.4 | v1.0.7.7 | 2024.9.16 | [下载](https://github.com/mxyx-club/TheOtherUs-Edited/releases/download/v1.0.7.7/TheOtherUs.zip) |
| 2024.3.5 ~ 2024.6.4 | v1.0.7.6 | 2024.9.14 | [下载](https://github.com/mxyx-club/TheOtherUs-Edited/releases/download/v1.0.7.6/TheOtherUs.zip) |
| 2024.3.5 ~ 2024.6.4 | v1.0.7.2 | 2024.9.6 | [下载](https://github.com/mxyx-club/TheOtherUs-Edited/releases/download/v1.0.7.2/TheOtherUs.zip) |
| 2024.3.5 ~ 2024.6.4 | v1.0.6.6 | 2024.8.14 | [下载](https://github.com/mxyx-club/TheOtherUs-Edited/releases/download/v1.0.6.6/TheOtherUs.zip) |
Expand All @@ -33,6 +34,15 @@

## 更新日志


### v1.0.7.7:

- #### Bug修复与其它优化:

- 修复部分中立职业会跟随好人获胜
- 炸弹狂:限制击杀RPC发送者,避免被炸弹炸死时会击多次
- 设陷师:修复陷阱报错问题,修复陷阱激活前没有透明效果

### v1.0.7.6:

- #### 新增内容:
Expand Down
Binary file modified Strings.xlsx
Binary file not shown.
5 changes: 3 additions & 2 deletions TheOtherRoles.sln
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@ Global
Sunday|Any CPU = Sunday|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{11FBC798-BAF5-4EE5-9511-BE6DB0592F99}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{11FBC798-BAF5-4EE5-9511-BE6DB0592F99}.Debug|Any CPU.Build.0 = Debug|Any CPU
{11FBC798-BAF5-4EE5-9511-BE6DB0592F99}.Debug|Any CPU.ActiveCfg = Release|Any CPU
{11FBC798-BAF5-4EE5-9511-BE6DB0592F99}.Debug|Any CPU.Build.0 = Release|Any CPU
{11FBC798-BAF5-4EE5-9511-BE6DB0592F99}.mxyx-club|Any CPU.ActiveCfg = mxyx-club|Any CPU
{11FBC798-BAF5-4EE5-9511-BE6DB0592F99}.mxyx-club|Any CPU.Build.0 = mxyx-club|Any CPU
{11FBC798-BAF5-4EE5-9511-BE6DB0592F99}.Release|Any CPU.ActiveCfg = Release|Any CPU
{11FBC798-BAF5-4EE5-9511-BE6DB0592F99}.Release|Any CPU.Build.0 = Release|Any CPU
{11FBC798-BAF5-4EE5-9511-BE6DB0592F99}.Sunday|Any CPU.ActiveCfg = Sunday|Any CPU
Expand Down
13 changes: 3 additions & 10 deletions TheOtherRoles/Helper/Helpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -720,8 +720,7 @@ public static void refreshRoleDescription(PlayerControl player)
var currentText = textTask.Text;

if (taskTexts.Contains(currentText))
taskTexts.Remove(
currentText); // TextTask for this RoleInfo does not have to be added, as it already exists
taskTexts.Remove(currentText); // TextTask for this RoleInfo does not have to be added, as it already exists
else toRemove.Add(t); // TextTask does not have a corresponding RoleInfo and will hence be deleted
}

Expand All @@ -744,14 +743,8 @@ public static void refreshRoleDescription(PlayerControl player)

internal static string getRoleString(RoleInfo roleInfo)
{
if (roleInfo.Name == "Jackal")
{
var getSidekickText = Jackal.canCreateSidekick ? " and recruit a Sidekick" : "";
return cs(roleInfo.color, $"{roleInfo.Name}: Kill everyone{getSidekickText}");
}

if (roleInfo.Name == "Invert")
return cs(roleInfo.color, $"{roleInfo.Name}: {roleInfo.ShortDescription} ({Invert.meetings})");
if (roleInfo.roleId == RoleId.Invert)
return cs(roleInfo.color, $"{roleInfo.Name}: {roleInfo.ShortDescription} \n(还有 {Invert.meetings} 次会议醒酒)");

return cs(roleInfo.color, $"{roleInfo.Name}: {roleInfo.ShortDescription}");
}
Expand Down
4 changes: 2 additions & 2 deletions TheOtherRoles/Main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,20 +88,20 @@ public override void Load()
Port = Config.Bind("Custom", "Custom Server Port", (ushort)22023);
defaultRegions = ServerManager.DefaultRegions;

Harmony.PatchAll();
UpdateRegions();
CrowdedPlayer.Start();
Harmony.PatchAll();

CustomHatManager.LoadHats();
CustomColors.Load();
CustomOptionHolder.Load();
ModOption.reloadPluginOptions();
AssetLoader.LoadAudioAssets();
if (ToggleCursor.Value) enableCursor(true);

SubmergedCompatibility.Initialize();
MainMenuPatch.addSceneChangeCallbacks();
AddToKillDistanceSetting.addKillDistance();
ModOption.reloadPluginOptions();
ModInputManager.Load();
Info($"\n---------------\n Loading TheOtherUs completed!\n TheOtherUs-Edited v{VersionString}\n---------------");
}
Expand Down
5 changes: 3 additions & 2 deletions TheOtherRoles/Modules/CustomHats/CustomHatManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,16 @@ public static class CustomHatManager
public const string InnerslothPackageName = "Innersloth Hats";
public const string DeveloperPackageName = "Developer Hats";

internal static readonly Tuple<string, string, string> Repository = new("TheOtherRolesAU", "TheOtherHats", "master");
/*internal static readonly Tuple<string, string, string> Repository = new("TheOtherRolesAU", "TheOtherHats", "master");
internal static string RepositoryUrl
{
get
{
var (owner, repository, branch) = Repository;
return $"https://raw.githubusercontent.com/{owner}/{repository}/{branch}".GithubUrl();
}
}
}*/
internal static string RepositoryUrl => "https://hats.mxyx.club/40437";
internal static readonly string ManifestFileName = "CustomHats.json";

internal static string CustomSkinsDirectory => Path.Combine(Path.GetDirectoryName(Application.dataPath)!, ResourcesDirectory);
Expand Down
28 changes: 16 additions & 12 deletions TheOtherRoles/Objects/Trap.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ public class Trap
private static int instanceCounter;

private static ResourceSprite trapSprite = new("Trapper_Trap_Ingame.png", 300);
private readonly Arrow arrow = new(Color.blue);
private readonly int neededCount;
public readonly int instanceId;
private Arrow arrow = new(Color.blue);
private int neededCount = Trapper.trapCountToReveal;
public int instanceId;
public bool revealed;
public readonly GameObject trap;
public GameObject trap;
public List<PlayerControl> trappedPlayer = new();
public bool triggerable;
private int usedCount;
Expand All @@ -31,7 +31,7 @@ public Trap(Vector2 p)
{
trap = new GameObject("Trap") { layer = 11 };
trap.AddSubmergedComponent(SubmergedCompatibility.Classes.ElevatorMover);
var position = new Vector3(p.x, p.y, (p.y / 1000) + 0.001f); // just behind player
var position = new Vector3(p.x, p.y, p.y / 1000 + 0.001f); // just behind player
trap.transform.position = position;
neededCount = Trapper.trapCountToReveal;

Expand All @@ -46,8 +46,11 @@ public Trap(Vector2 p)
arrow.arrow.SetActive(false);
FastDestroyableSingleton<HudManager>.Instance.StartCoroutine(Effects.Lerp(5, new Action<float>(x =>
{
if ((int)x == 1) triggerable = true;
trapRenderer.color = Color.white;
if (x == 1f)
{
triggerable = true;
trapRenderer.color = Color.white;
}
})));
}

Expand Down Expand Up @@ -128,15 +131,16 @@ public static void Update()
if (trap.revealed || !trap.triggerable || trap.trappedPlayer.Contains(player.PlayerControl)) continue;
if (player.PlayerControl.inVent || !player.PlayerControl.CanMove) continue;
var distance = Vector2.Distance(trap.trap.transform.position, player.PlayerControl.GetTruePosition());
if (!(distance <= ud) || !(distance < closestDistance)) continue;
closestDistance = distance;
target = trap;
if (distance <= ud && distance < closestDistance)
{
closestDistance = distance;
target = trap;
}
}

if (target != null && player.PlayerId != Trapper.trapper.PlayerId && !player.Data.IsDead)
{
var writer = AmongUsClient.Instance.StartRpcImmediately(CachedPlayer.LocalPlayer.PlayerControl.NetId,
(byte)CustomRPC.TriggerTrap, SendOption.Reliable);
(byte)CustomRPC.TriggerTrap, SendOption.Reliable, -1);
writer.Write(player.PlayerId);
writer.Write(target.instanceId);
AmongUsClient.Instance.FinishRpcImmediately(writer);
Expand Down
2 changes: 1 addition & 1 deletion TheOtherRoles/Patches/ClientOptionsPatch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ IEnumerator getEnumerator()
nebulaButton.Content = nebulaTab;
GameObject textObj = nebulaButton.transform.FindChild("Text_TMP").gameObject;
textObj.GetComponent<TextTranslatorTMP>().enabled = false;
textObj.GetComponent<TMP_Text>().text = "TOR";
textObj.GetComponent<TMP_Text>().text = "Ä£×éÉèÖÃ";

tabs.Add(Object.Instantiate(tabs[1], null));
TabGroup keyBindingTabButton = tabs[^1];
Expand Down
2 changes: 2 additions & 0 deletions TheOtherRoles/Patches/EndGamePatch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,8 @@ public static void Postfix(AmongUsClient __instance, [HarmonyArgument(0)] ref En

notWinners.AddRange(Pavlovsdogs.pavlovsdogs.Where(p => p != null));
notWinners.AddRange(Jackal.formerJackals.Where(p => p != null));
notWinners.AddRange(Pursuer.pursuer.Where(p => p != null));
notWinners.AddRange(Survivor.survivor.Where(p => p != null));
if (Akujo.honmeiCannotFollowWin && Akujo.honmei != null) notWinners.Add(Akujo.honmei);

var winnersToRemove = new List<WinningPlayerData>();
Expand Down
7 changes: 4 additions & 3 deletions TheOtherRoles/Patches/RoleAssignmentPatch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ internal class RoleOptionsDataGetNumPerGamePatch
{
public static void Postfix(ref int __result)
{
if (GameOptionsManager.Instance.CurrentGameOptions.GameMode == GameModes.Normal) __result = 0; // Deactivate Vanilla Roles if the mod roles are active
// Deactivate Vanilla Roles if the mod roles are active
if (GameOptionsManager.Instance.CurrentGameOptions.GameMode == GameModes.Normal) __result = 0;
}
}

Expand Down Expand Up @@ -93,9 +94,9 @@ private static void assignRoles()
public static RoleAssignmentData getRoleAssignmentData()
{
// Get the players that we want to assign the roles to. Crewmate and Neutral roles are assigned to natural crewmates. Impostor roles to impostors.
var crewmates = PlayerControl.AllPlayerControls.ToArray().ToList().OrderBy(x => Guid.NewGuid()).ToList();
var crewmates = PlayerControl.AllPlayerControls.ToList().OrderBy(x => Guid.NewGuid()).ToList();
crewmates.RemoveAll(x => x.Data.Role.IsImpostor);
var impostors = PlayerControl.AllPlayerControls.ToArray().ToList().OrderBy(x => Guid.NewGuid()).ToList();
var impostors = PlayerControl.AllPlayerControls.ToList().OrderBy(x => Guid.NewGuid()).ToList();
impostors.RemoveAll(x => !x.Data.Role.IsImpostor);

var neutralMin = CustomOptionHolder.neutralRolesCountMin.getSelection();
Expand Down
3 changes: 2 additions & 1 deletion TheOtherRoles/RPC.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2452,7 +2452,8 @@ public static void giveBomb(byte playerId, bool bomb = false)
if (p == 1f && Bomber.bombActive)
{
// Perform kill if possible and reset bitten (regardless whether the kill was successful or not)
checkMurderAttemptAndKill(Bomber.bomber, Bomber.hasBombPlayer, false, false, true, true);
if (Bomber.bomber.IsAlive() && CachedPlayer.LocalPlayer.PlayerControl == Bomber.bomber)
checkMurderAttemptAndKill(Bomber.bomber, Bomber.hasBombPlayer, false, false, true, true);
Bomber.hasBombPlayer = null;
Bomber.bombActive = false;
Bomber.hasAlerted = false;
Expand Down
3 changes: 3 additions & 0 deletions TheOtherRoles/Resources/stringData.json
Original file line number Diff line number Diff line change
Expand Up @@ -4017,6 +4017,9 @@
"SurvivorFullDesc": {
"13": "存活到游戏结束即可跟随其它阵营胜利\n以房间设置为准,幸存者可能拥有防弹衣和空包弹技能。\n防弹衣在开启期间,无法被击杀,杀手击杀时会进入较短的冷却。\n空包弹可以给带刀职业的下一刀击杀无效。"
},
"PartTimerFullDesc": {
"13": "打工仔可以在行动阶段选择一位玩家打工,胜利条件和打工对象一致。\n若在打工仔存活时,打工对象死亡,打工仔可以寻找一名其他玩家打工。\n若打工仔一段时间内没有选择玩家打工,打工仔会穷死。\n打工仔死亡后,打工对象不会再发生变化,仍然可以跟随打工对象获胜。"
},
"AmnisiacFullDesc": {
"13": "失忆者能知晓尸体的位置,\n通过找到尸体并回忆获得尸体的职业。"
},
Expand Down
2 changes: 1 addition & 1 deletion TheOtherRoles/Roles/Neutral/Lawyer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@ public static void clearAndReload(bool clearTarget = true)
lawyerKnowsRole = CustomOptionHolder.lawyerKnowsRole.getBool();
targetCanBeJester = CustomOptionHolder.lawyerTargetCanBeJester.getBool();
stolenWin = CustomOptionHolder.lawyerStolenWin.getBool();
canCallEmergency = CustomOptionHolder.jesterCanCallEmergency.getBool();
canCallEmergency = CustomOptionHolder.lawyerCanCallEmergency.getBool();
}
}
2 changes: 1 addition & 1 deletion TheOtherRoles/TheOtherRoles.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<Version>1.0.7.6</Version>
<Version>1.0.7.7</Version>
<AssemblyName>TheOtherUs</AssemblyName>
<Authors>mxyx-club</Authors>
<LangVersion>latest</LangVersion>
Expand Down

0 comments on commit 785df67

Please sign in to comment.