Skip to content

Instantly share code, notes, and snippets.

@XtraCube
Last active May 13, 2021 01:17
Show Gist options
  • Save XtraCube/40f3de23c7b2ab228e3f3ae8cd22293e to your computer and use it in GitHub Desktop.
Save XtraCube/40f3de23c7b2ab228e3f3ae8cd22293e to your computer and use it in GitHub Desktop.
tiny region API

Tiny Region API

This is a tiny region API for Among Us all in one line. Requires C# 9

Usage:

  1. Create a new file called C.cs
  2. paste the C.cs file from this gist into it
  3. in your plugin load method, use C.A("your region name", "your IP", {your port});
/*CC0*/using System.Linq;using S=ServerManager;[HarmonyLib.HarmonyPatch(typeof(S),"LoadServers")]class C{static System.Collections.Generic.List<IRegionInfo>R=S.DefaultRegions.ToList();static void Prefix()=>S.DefaultRegions=R.ToArray();public static void A(string N,string I,ushort P)=>R.Add(new DnsRegionInfo(I, N, (StringNames)1003, I, P).Duplicate());}
@Zarzok648GD
Copy link

Poggers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment