Skip to content

Commit 1c71cbd

Browse files
v0.0.2
1 parent ee0d3a1 commit 1c71cbd

File tree

3 files changed

+28
-2
lines changed

3 files changed

+28
-2
lines changed

MCI/InstanceControl.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ public static int availableId()
1616
if (!clients.ContainsKey(i))
1717
if (PlayerControl.LocalPlayer.OwnerId != i) return i;
1818
return -1;
19-
//return PlayerControl.LocalPlayer.OwnerId;
2019
}
2120

2221

@@ -43,6 +42,10 @@ public static void SwitchTo(byte playerId)
4342

4443
DestroyableSingleton<HudManager>.Instance.SetHudActive(true);
4544

45+
//hacky "fix" for twix and det
46+
DestroyableSingleton<HudManager>.Instance.KillButton.transform.parent.GetComponentsInChildren<Transform>().ToList().ForEach((x) => { if (x.gameObject.name == "KillButton(Clone)") Object.Destroy(x.gameObject); });
47+
DestroyableSingleton<HudManager>.Instance.transform.GetComponentsInChildren<Transform>().ToList().ForEach((x) => { if (x.gameObject.name == "KillButton(Clone)") Object.Destroy(x.gameObject); });
48+
4649
PlayerControl.LocalPlayer.myLight = UnityEngine.Object.Instantiate<LightSource>(PlayerControl.LocalPlayer.LightPrefab);
4750
PlayerControl.LocalPlayer.myLight.transform.SetParent(PlayerControl.LocalPlayer.transform);
4851
PlayerControl.LocalPlayer.myLight.transform.localPosition = PlayerControl.LocalPlayer.Collider.offset;

MCI/Patches/KeyboardJoystick.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using HarmonyLib;
22
using UnityEngine;
3+
using System.Linq;
34

45
namespace MCI.Patches
56
{
@@ -12,19 +13,22 @@ public static void Postfix()
1213
if (Input.GetKeyDown(KeyCode.F5))
1314
{
1415
controllingFigure = PlayerControl.LocalPlayer.PlayerId;
16+
if (PlayerControl.AllPlayerControls.Count == 15) return; //remove this if your willing to suffer with the consequences.
1517
Utils.CleanUpLoad();
1618
Utils.CreatePlayerInstance("Robot");
1719
}
1820

1921
if (Input.GetKeyDown(KeyCode.F9))
2022
{
2123
controllingFigure++;
24+
controllingFigure = Mathf.Clamp(controllingFigure, 0, PlayerControl.AllPlayerControls.Count -1);
2225
InstanceControl.SwitchTo((byte)controllingFigure);
2326
}
2427

2528
if (Input.GetKeyDown(KeyCode.F10))
2629
{
2730
controllingFigure--;
31+
controllingFigure = Mathf.Clamp(controllingFigure, 0, PlayerControl.AllPlayerControls.Count -1);
2832
InstanceControl.SwitchTo((byte)controllingFigure);
2933
}
3034
}

README.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,34 @@ and in game press f9 to move up or f10 to move down through the id list.
1111
i've left it openended for any future features but i dont think i can see myself regularly maintaning this beyond bug fixes,
1212
but your welcome to pr and contribute
1313

14-
14+
(note this is older footage as i've now got a system in place to remove the extra buttons from tou)
1515
https://user-images.githubusercontent.com/38029594/182777865-2ec28bfb-4815-41f4-9936-4e4a2fc8b713.mp4
1616

1717
Relies on Reactor And Bepinex
1818

1919
| Among Us Version | Download |
2020
|----------|-------------|
21+
| v2022.6.21 & v2022.7.12 | [v0.0.2](https://github.com/MyDragonBreath/AmongUs.MultiClientInstancing/releases/tag/v0.0.2)
2122
| v2022.6.21 & v2022.7.12 | [v0.0.1](https://github.com/MyDragonBreath/AmongUs.MultiClientInstancing/releases/tag/v0.0.1)
2223

24+
<details>
25+
<summary> Changelog </summary>
26+
<details>
27+
<summary> v0.0.2 </summary>
28+
<ul>
29+
<li> Added clamps, and system to remove TOU buttons </li>
30+
<li> please save me twix has me locked in basement </li>
31+
</ul>
32+
</details>
33+
<details>
34+
<summary> v0.0.1 </summary>
35+
<ul>
36+
<li> Base systems for creating and switching between Playercontrols </li>
37+
</ul>
38+
</details>
39+
</details>
40+
41+
2342
#
2443
<p align="center">This mod is not affiliated with Among Us or Innersloth LLC, and the content contained therein is not endorsed or otherwise sponsored by Innersloth LLC. Portions of the materials contained herein are property of Innersloth LLC.</p>
2544
<p align="center">© Innersloth LLC.</p>

0 commit comments

Comments
 (0)