Skip to content
This repository has been archived by the owner on Aug 31, 2024. It is now read-only.

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
the-real-techiee committed Aug 24, 2024
1 parent 241c666 commit d9039f6
Show file tree
Hide file tree
Showing 18 changed files with 6,009 additions and 0 deletions.
44 changes: 44 additions & 0 deletions LevelSpoofer/LevelSpoofer.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
using AmongUs.Data;
using HarmonyLib;
using BepInEx;
using BepInEx.Unity.IL2CPP;
using BepInEx.Configuration;

[BepInPlugin("com.levelspoofer.techiee", "Level Spoofer", "1.0")]
public class LevelSpooferPlugin : BasePlugin
{
public Harmony Harmony { get; } = new Harmony("Level Spoofer");
public static ConfigEntry<string> LevelSpoofer;
public override void Load()
{
LevelSpoofer = Config.Bind("LevelSpoofing",
"SpoofingValue",
"",
"Spoofed Levels are temporary levels that stay until the mod is inactive. Levels with it's value within 0 and 4294967295 are allowed. Decimal values won't work.");

Harmony.PatchAll();
}
}

namespace LevelSpoofing
{
[HarmonyPatch(typeof(EOSManager), nameof(EOSManager.Update))]
public static class EOSManager_Update
{
public static void Prefix()
{
ModManager.Instance.ShowModStamp();
}
public static uint levelvalue;
public static void Postfix()
{
if (!string.IsNullOrEmpty(LevelSpooferPlugin.LevelSpoofer.Value) &&
uint.TryParse(LevelSpooferPlugin.LevelSpoofer.Value, out levelvalue) &&
levelvalue != DataManager.Player.Stats.Level)
{
DataManager.Player.stats.level = levelvalue - 1;
DataManager.Player.Save();
}
}
}
}
20 changes: 20 additions & 0 deletions LevelSpoofer/LevelSpoofer.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<LangVersion>latest</LangVersion>
<DebugType>embedded</DebugType>

<VersionPrefix>1.0.0</VersionPrefix>
<VersionSuffix>latest</VersionSuffix>
<Description>Level Spoofer for the game, Among Us</Description>
<Authors>Techiee</Authors>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="BepInEx.Unity.IL2CPP" Version="6.0.0-be.662" Private="false" ExcludeAssets="runtime;native" />
<PackageReference Include="AmongUs.GameLibs.Steam" Version="2024.8.13" PrivateAssets="all" />

<PackageReference Include="BepInEx.AutoPlugin" Version="1.1.0" PrivateAssets="all" />
<PackageReference Include="BepInEx.IL2CPP.MSBuild" Version="2.0.1" PrivateAssets="all" ExcludeAssets="runtime" />
</ItemGroup>
</Project>
Loading

0 comments on commit d9039f6

Please sign in to comment.