5 Commits
Author SHA1 Message Date
Brybry b780e398d2 Update Readme + small cleanup 2021-02-06 19:01:35 +01:00
Brybry 3342ea1ae3 Merge branch 'main' of https://github.com/Brybry16/BetterPolus into dev 2021-02-06 18:48:01 +01:00
Brybry 1be27b03d9 Bump to version 1.1
Fixed Crewmates being able to access ChartCourse Task from outside.
Moved Temperature (cold) task to the 'Death Valley' (Outside, between
Comms & O2).
Moved Vitals where Temperature (cold) was originally.
2021-02-06 18:44:02 +01:00
Brybry16 564403818a Update README.md 2021-02-06 15:09:34 +01:00
Brybry16 370c17c040 Added v1.0.0 download links to README 2021-02-02 04:23:38 +01:00
5 changed files with 137 additions and 109 deletions

No files matched your search

+1 -1
View File
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework>
<Version>1.0.0</Version>
<Version>1.1</Version>
<GameVersion>2020.12.9s</GameVersion>
<Mappings>NuclearPowered/Mappings:0.1.0-alpha.2</Mappings>
+4 -2
View File
@@ -14,12 +14,14 @@ namespace BetterPolus
public const string Id = "ch.brybry.betterpolus";
public Harmony Harmony { get; } = new Harmony(Id);
public static ManualLogSource Logger;
public static ManualLogSource log;
public override void Load()
{
Logger = Log;
log = Log;
log.LogMessage("BetterPolus Mod loaded");
Harmony.PatchAll();
}
+111 -91
View File
@@ -9,17 +9,20 @@ namespace BetterPolus
{
// Positions
public static readonly Vector3 DvdScreenNewPos = new Vector3(26.635f, -15.92f, 1f);
public static readonly Vector3 VitalsNewPos = new Vector3(30.255f, -6.66f, 1f);
public static readonly Vector3 VitalsNewPos = new Vector3(31.275f, -6.45f, 1f);
public static readonly Vector3 WifiNewPos = new Vector3(15.975f, 0.084f, 1f);
public static readonly Vector3 NavNewPos = new Vector3(11.07f, -15.298f, -0.015f);
public static readonly Vector3 TempColdNewPos = new Vector3(7.772f, -17.103f, -0.017f);
// Scales
public const float DvdScreenNewScale = 0.75f;
public const float VitalsNewScale = 1.05f;
// Checks
public static bool IsObjectsFetched;
public static bool IsAdjustmentsDone;
public static bool IsObjectsFetched;
public static bool IsRoomsFetched;
public static bool IsVentsFetched;
// Tasks Tweak
@@ -28,7 +31,6 @@ namespace BetterPolus
// Vitals Tweak
public static SystemConsole Vitals;
public static GameObject WeatherMap;
public static GameObject DvdScreenOffice;
// Vents Tweak
@@ -36,6 +38,15 @@ namespace BetterPolus
public static Vent ElectricalVent;
public static Vent ScienceBuildingVent;
public static Vent StorageVent;
// TempCold Tweak
public static Console TempCold;
// Rooms
public static GameObject Comms;
public static GameObject DropShip;
public static GameObject Outside;
public static GameObject Science;
[HarmonyPatch(typeof(ShipStatus), nameof(ShipStatus.Begin))]
public static class ShipStatusBeginPatch
@@ -73,7 +84,7 @@ namespace BetterPolus
}
}
public static void ApplyChanges(ShipStatus instance)
private static void ApplyChanges(ShipStatus instance)
{
if (instance.Type == ShipStatus.MapType.Pb)
{
@@ -82,10 +93,26 @@ namespace BetterPolus
}
}
public static void FindPolusObjects()
{
FindVents();
FindRooms();
FindObjects();
}
public static void AdjustPolus()
{
MoveVitals();
SwitchNavWifi();
if (IsObjectsFetched && IsRoomsFetched)
{
MoveVitals();
SwitchNavWifi();
MoveTempCold();
}
else
{
BetterPolusPlugin.log.LogError("Couldn't move elements as not all of them have been fetched.");
}
AdjustVents();
IsAdjustmentsDone = true;
@@ -97,8 +124,6 @@ namespace BetterPolus
public static void FindVents()
{
BetterPolusPlugin.Logger.LogMessage("Fetching Vent Objects");
var ventsList = Object.FindObjectsOfType<Vent>().ToList();
if (ElectricBuildingVent == null)
@@ -125,64 +150,70 @@ namespace BetterPolus
StorageVent != null;
}
public static void FindPolusObjects()
public static void FindRooms()
{
if (Comms == null)
{
Comms = Object.FindObjectsOfType<GameObject>().ToList().Find(o => o.name == "Comms");
}
if (DropShip == null)
{
DropShip = Object.FindObjectsOfType<GameObject>().ToList().Find(o => o.name == "Dropship");
}
FindVents();
// if (Comms == null)
// {
// Comms = Object.FindObjectsOfType<GameObject>().ToList().Find(o => o.name == "Comms");
// }
//
// if (DropShip == null)
// {
// DropShip = Object.FindObjectsOfType<GameObject>().ToList().Find(o => o.name == "Dropship");
// }
if (Outside == null)
{
Outside = Object.FindObjectsOfType<GameObject>().ToList().Find(o => o.name == "Outside");
}
if (Science == null)
{
Science = Object.FindObjectsOfType<GameObject>().ToList().Find(o => o.name == "Science");
}
IsRoomsFetched = Comms != null && DropShip != null && Outside != null && Science != null;
}
public static void FindObjects()
{
if (WifiConsole == null)
{
BetterPolusPlugin.Logger.LogMessage("Fetching WifiConsole Object");
WifiConsole = Object.FindObjectsOfType<Console>().ToList()
.Find(console => console.name == "panel_wifi");
}
if (NavConsole == null)
{
BetterPolusPlugin.Logger.LogMessage("Fetching NavConsole Object");
NavConsole = Object.FindObjectsOfType<Console>().ToList()
.Find(console => console.name == "panel_nav");
}
if (Vitals == null)
{
BetterPolusPlugin.Logger.LogMessage("Fetching Vitals Object");
Vitals = Object.FindObjectsOfType<SystemConsole>().ToList()
.Find(console => console.name == "panel_vitals");
}
if (WeatherMap == null)
{
BetterPolusPlugin.Logger.LogMessage("Fetching WeatherMap Object");
WeatherMap = Object.FindObjectsOfType<GameObject>().ToList()
.Find(o => o.name == "Weathermap0001");
}
if (DvdScreenOffice == null)
{
BetterPolusPlugin.Logger.LogMessage("Fetching DvdScreenAdmin Object");
GameObject DvdScreenAdmin = Object.FindObjectsOfType<GameObject>().ToList()
.Find(o => o.name == "dvdscreen");
if (DvdScreenAdmin != null)
{
BetterPolusPlugin.Logger.LogMessage("Creating DvdScreenOffice Object");
DvdScreenOffice = Object.Instantiate(DvdScreenAdmin);
}
}
IsObjectsFetched = WifiConsole != null && NavConsole != null && Vitals != null && WeatherMap != null &&
DvdScreenOffice != null;
if (TempCold == null)
{
TempCold = Object.FindObjectsOfType<Console>().ToList()
.Find(console => console.name == "panel_tempcold");
}
IsObjectsFetched = WifiConsole != null && NavConsole != null && Vitals != null &&
DvdScreenOffice != null && TempCold != null;
}
// -------------------
@@ -193,8 +224,6 @@ namespace BetterPolus
{
if (IsVentsFetched)
{
BetterPolusPlugin.Logger.LogMessage("Adjusting Vents");
ElectricBuildingVent.Left = ElectricalVent;
ElectricalVent.Center = ElectricBuildingVent;
@@ -203,75 +232,66 @@ namespace BetterPolus
}
else
{
BetterPolusPlugin.Logger.LogError("Couldn't adjust Vents as not all objects have been fetched.");
BetterPolusPlugin.log.LogError("Couldn't adjust Vents as not all objects have been fetched.");
}
}
public static void MoveTempCold()
{
if (TempCold.transform.position != TempColdNewPos)
{
Transform tempColdTransform = TempCold.transform;
tempColdTransform.parent = Outside.transform;
tempColdTransform.position = TempColdNewPos;
// Fixes collider being too high
BoxCollider2D collider = TempCold.GetComponent<BoxCollider2D>();
collider.isTrigger = false;
collider.size += new Vector2(0f, -0.3f);
}
}
public static void SwitchNavWifi()
{
if (IsObjectsFetched)
if (WifiConsole.transform.position != WifiNewPos)
{
if (WifiConsole.transform.position != WifiNewPos)
{
BetterPolusPlugin.Logger.LogMessage("Moving Wifi to Dropship");
Transform wifiTransform = WifiConsole.transform;
wifiTransform.position = WifiNewPos;
WifiConsole.Room = SystemTypes.Dropship;
}
if (NavConsole.transform.position != NavNewPos)
{
BetterPolusPlugin.Logger.LogMessage("Moving Nav to Comms");
Transform navTransform = NavConsole.transform;
navTransform.position = NavNewPos;
NavConsole.Room = SystemTypes.Comms;
}
Transform wifiTransform = WifiConsole.transform;
wifiTransform.parent = DropShip.transform;
wifiTransform.position = WifiNewPos;
}
else
if (NavConsole.transform.position != NavNewPos)
{
BetterPolusPlugin.Logger.LogError("Couldn't Switch Nav & Wifi as not all objects have been fetched.");
Transform navTransform = NavConsole.transform;
navTransform.parent = Comms.transform;
navTransform.position = NavNewPos;
// Prevents crewmate being able to do the task from outside
NavConsole.checkWalls = true;
}
}
public static void MoveVitals()
{
if (IsObjectsFetched)
if (Vitals.transform.position != VitalsNewPos)
{
if (Vitals.transform.position != VitalsNewPos)
{
// Vitals
BetterPolusPlugin.Logger.LogMessage("Moving Vitals to Laboratory");
Transform vitalsTransform = Vitals.gameObject.transform;
vitalsTransform.position = VitalsNewPos;
var localScale = vitalsTransform.localScale;
localScale =
new Vector3(VitalsNewScale, localScale.y, localScale.z);
vitalsTransform.localScale = localScale;
}
if (WeatherMap.active)
{
// WeatherMap
BetterPolusPlugin.Logger.LogMessage("Deactivating WeatherMap");
WeatherMap.SetActive(false);
}
if (DvdScreenOffice.transform.position != DvdScreenNewPos)
{
// DvdScreen
BetterPolusPlugin.Logger.LogMessage("Moving DvdScreenOffice");
Transform dvdScreenTransform = DvdScreenOffice.transform;
dvdScreenTransform.position = DvdScreenNewPos;
var localScale = dvdScreenTransform.localScale;
localScale =
new Vector3(DvdScreenNewScale, localScale.y,
localScale.z);
dvdScreenTransform.localScale = localScale;
}
// Vitals
Transform vitalsTransform = Vitals.gameObject.transform;
vitalsTransform.parent = Science.transform;
vitalsTransform.position = VitalsNewPos;
}
else
if (DvdScreenOffice.transform.position != DvdScreenNewPos)
{
BetterPolusPlugin.Logger.LogError("Couldn't move Vitals as not all objects have been fetched.");
// DvdScreen
Transform dvdScreenTransform = DvdScreenOffice.transform;
dvdScreenTransform.position = DvdScreenNewPos;
var localScale = dvdScreenTransform.localScale;
localScale =
new Vector3(DvdScreenNewScale, localScale.y,
localScale.z);
dvdScreenTransform.localScale = localScale;
}
}
}
+2 -1
View File
@@ -9,13 +9,14 @@ namespace BetterPolus
{
[HarmonyPostfix]
[HarmonyPatch]
[HarmonyPriority(Priority.First)]
public static void Postfix(VersionShower __instance)
{
var reactorVS = GameObject.Find("ReactorVersion");
GameObject.Destroy(reactorVS);
TextRenderer text = __instance.text;
text.Text += "\nLoaded [5E4CA6FF]BetterPolus []Mod by Brybry";
text.Text += "\nLoaded [5E4CA6FF]BetterPolus v1.1-R []by Brybry";
}
}
}
+19 -14
View File
@@ -5,6 +5,7 @@ An Among Us mod that tweaks Polus, allowing a more balanced experience.
- **Vitals** have been moved to **Laboratory**.
- The **Reboot Wifi task** is now located in the **Dropship**.
- The **Chart Course** task is now located in **Comms**.
- The **Temperature (cold)** task is now located **Outside (Between O2 & Comms)**.
- The **Vents** near both Reactor Pods are **not linked to each other** anymore.
- The Vent on **top of Electrical** is linked to the Vent on **top of Security**.
- The Vent **outside of Laboratory** is linked to the Vent **inside Storage**.
@@ -39,11 +40,19 @@ There are two ways to install the mod :
## Releases
| Among Us Version | Mod Version | All-in-one pack | DLL file |
| ---------------- | ----------- | :-------------: | :------: |
| v2020.12.9s | Ver. 1.0.0 | **[Download]()** | **[Download]()** |
| v2020.12.9s | Ver. 1.1 | **[Download](https://github.com/Brybry16/BetterPolus/releases/download/v1.1/BetterPolus_All-in-one-Pack-1.1.zip)** | **[Download](https://github.com/Brybry16/BetterPolus/releases/download/v1.1/BetterPolus-2020.12.9s.dll)** |
| v2020.12.9s | Ver. 1.0 | **[Download](https://github.com/Brybry16/BetterPolus/releases/download/v1.0.0/BetterPolus_All-in-one-Pack.zip)** | **[Download](https://github.com/Brybry16/BetterPolus/releases/download/v1.0.0/BetterPolus-2020.12.9s.dll)** |
### Changelog
<details>
<summary>Version 1.0.0</summary>
<summary>Version 1.1</summary>
<ul>
<li>Fixed Crewmates being able to access Chart Course Task from outside of Comms.</li>
<li>Moved Temperature (cold) task to the 'Death Valley' (Outside, between Comms & O2).</li>
<li>Moved Vitals where Temperature (cold) was originally (in Laboratory).</li>
</ul>
<summary>Version 1.0</summary>
<ul>
<li>Vitals have been moved to Laboratory.</li>
<li>The Reboot Wifi task is now located in the Dropship.</li>
@@ -73,27 +82,23 @@ There are two ways to install the mod :
```
## Q&A
**How do I know if BetterPolus is correctly installed?**
**How do I know if BetterPolus is correctly installed?**<br>
Just check that there is a line saying that BetterPolus has been loaded in the top left of the main menu.
**Does this works with (Better-)CrewLink (Proximity Chat)?**
**Does this works with (Better-)CrewLink (Proximity Chat)?**<br>
Of course!
**Do I risk anything if I play on official Servers?**
**Do I risk anything if I play on official Servers?**<br>
There is currently no permaban system for the game so it's safe to play on official servers. However, I still recommend you to host your own custom server to be safe. For more information, you can check these repositories :
- **[Impostor/Impostor](https://github.com/Impostor/Impostor):** A custom server that allows you to create your own plugins.
- **[NuclearPowered/Impostor](https://github.com/NuclearPowered/Impostor):** Impostor but maintained by the team behind Reactor. <ins>Use this if you want to play with plugins that need Reactor's Custom RPC API or Modded Handshake.</ins>
**Can you use BetterPolus with Woodi's Sheriff Mod?**
Unfortunately, Reactor doesn't support Woodi's Sheriff Mod at the time being.
**How can I get started at Among Us Modding?**
**Can you use BetterPolus with Woodi's Sheriff Mod?**<br>
Reactor doesn't support Woodi's Sheriff Mod. **However**, you can use [**Reactor-Sheriff**](https://github.com/Brybry16/Reactor-Sheriff) which is an adapted version of Woodi's Sheriff Mod that can run with and BetterPolus.
**How can I get started at Among Us Modding?**<br>
Look at the **[Reactor documentation](https://docs.reactor.gg/)** to get started, and join **[Reactor's Discord](https://discord.gg/Zcmsb9UGuq)** to get more help from the community.
## Licensing
BetterPolus is licenced under the **[MIT License](LICENSE)**. While you don't have to credit me if you use or modify this mod, it's greatly appreciated!
BetterPolus is distrbuted under the **[MIT License](LICENSE)**. While you don't have to credit me if you use or modify this mod, it's greatly appreciated!<br>
[BepInEx](https://github.com/BepInEx/BepInEx) is distributed under the **LGPL-2.1 License**.