Skip to content

Commit

Permalink
Added many new features
Browse files Browse the repository at this point in the history
  • Loading branch information
Lyzev committed Apr 28, 2024
1 parent 8ca300c commit 5da6ffe
Show file tree
Hide file tree
Showing 39 changed files with 472 additions and 622 deletions.
51 changes: 30 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,128 +30,137 @@ by the use of this software. This project is intended for educational purposes o

<details>
<summary>Debug</summary>

Toggle the Debug mode.
<img src="debug.png" alt="Debug Mode Features">
</details>

<details>
<summary>Force Present</summary>

Forces the present to be the one you want.
</details>

<details>
<summary>Animal Arithmetic</summary>

Show the answer to the animal arithmetic.
</details>

<details>
<summary>Mystery Maze</summary>

Shows the path to the exit.
</details>

<details>
<summary>Mortar Mayhem</summary>

Show the answer to the mortar mayhem.
</details>

<details>
<summary>Batty Batter</summary>

Automatically hit the ball.
</details>

<details>
<summary>Spooky Spikes</summary>

Automatically crouch or jump when needed.
</details>

<details>
<summary>Rockin Rythm</summary>

Automatically hit the notes.
</details>

<details>
<summary>Pack And Pile</summary>

Automatically place boxes.
</details>

<details>
<summary>Treasure Hunt</summary>

Shows the path to the treasure.
</details>

<details>
<summary>Swift Shooters</summary>

Automatically shoot the good targets.
</details>

<details>
<summary>Bomber</summary>

Bombs are infinite.
</details>

<details>
<summary>Finder</summary>

Show the position of the other players.
</details>

<details>
<summary>Barn Brawl</summary>

God Mode, Infinite Shotgun (Press F), Burst Shotgun, ESP.
</details>

<details>
<summary>Presents</summary>

Automatically collect the best presents.
</details>

<details>
<summary>Selfish Stride</summary>

Show the target bridge.
</details>

<details>
<summary>Memory Menu</summary>

Show the target food.
</details>

<details>
<summary>Tanks</summary>

Rapid Fire.
</details>

<details>
<summary>Sidestep Slope</summary>

God Mode.
</details>

<details>
<summary>Speedy Spotlights</summary>

Show the position of the other players.
</details>

<details>
<summary>Graphical User Interface</summary>
<summary>Daring Dogfight</summary>
God Mode, Kill All, Burst Shot, ESP.
</details>

<details>
<summary>Elemental Mages</summary>
Instantly pick up crystals and disable camera shake.
</details>

<details>
<summary>Crown Capture</summary>
No Punch Interval, No Stun, Always Crown
</details>

<details>
<summary>Explosive Exchange</summary>
No Punch Interval, No Stun, Always Crown
</details>

<details>
<summary>AirJump</summary>
Allows you to jump in the air.
</details>

<details>
<summary>Speed</summary>
Allows you to change your speed.
</details>

<details>
<summary>Graphical User Interface</summary>
Toggle the GUI with Insert or RightShift.
</details>

Expand Down
4 changes: 3 additions & 1 deletion SchummelPartie/Loader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,10 @@ public override void OnUpdate()
MelonLogger.Msg($"[Loader] Initialized {m.Name}.");
});
MelonLogger.Msg("[Loader] Loaded Settings.");
MelonLogger.Msg("[Loader] Finished Initializing SchummelPartie in " + (DateTime.Now.Ticks - start) / TimeSpan.TicksPerMillisecond + "ms.");
MelonLogger.Msg("[Loader] Finished Initializing SchummelPartie in " +
(DateTime.Now.Ticks - start) / TimeSpan.TicksPerMillisecond + "ms.");
}

ModuleManager.OnUpdate();
}

Expand Down
58 changes: 30 additions & 28 deletions SchummelPartie/SchummelPartie.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
<HintPath>..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\Pummel Party\MelonLoader\net6\MelonLoader.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json">
<HintPath>..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\Pummel Party\PummelParty_Data\Managed\Newtonsoft.Json.dll</HintPath>
<HintPath>..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\Pummel Party\PummelParty_Data\Managed\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System"/>
<Reference Include="System.Core"/>
Expand Down Expand Up @@ -350,39 +350,41 @@
<Compile Include="module\Module.cs"/>
<Compile Include="module\ModuleManager.cs"/>
<Compile Include="module\modules\ModuleAnimalArithmetic.cs"/>
<Compile Include="module\modules\ModuleBarnBrawl.cs" />
<Compile Include="module\modules\ModuleBattyBatter.cs" />
<Compile Include="module\modules\ModuleBomber.cs" />
<Compile Include="module\modules\ModuleCrownCapture.cs" />
<Compile Include="module\modules\ModuleDaringDogfight.cs" />
<Compile Include="module\modules\ModuleElementalMages.cs" />
<Compile Include="module\modules\ModuleExplosiveExchange.cs" />
<Compile Include="module\modules\ModuleFinder.cs" />
<Compile Include="module\modules\ModuleBarnBrawl.cs"/>
<Compile Include="module\modules\ModuleBattyBatter.cs"/>
<Compile Include="module\modules\ModuleBomber.cs"/>
<Compile Include="module\modules\ModuleCrownCapture.cs"/>
<Compile Include="module\modules\ModuleDaringDogfight.cs"/>
<Compile Include="module\modules\ModuleElementalMages.cs"/>
<Compile Include="module\modules\ModuleExplosiveExchange.cs"/>
<Compile Include="module\modules\ModuleFinder.cs"/>
<Compile Include="module\modules\ModuleAirJump.cs"/>
<Compile Include="module\modules\ModuleGUI.cs"/>
<Compile Include="module\modules\ModuleDebug.cs"/>
<Compile Include="module\modules\ModuleForcePresent.cs"/>
<Compile Include="module\modules\ModuleMemoryMenu.cs" />
<Compile Include="module\modules\ModuleMemoryMenu.cs"/>
<Compile Include="module\modules\ModuleMortarMayhem.cs"/>
<Compile Include="module\modules\ModuleMysteryMaze.cs"/>
<Compile Include="module\modules\ModulePackAndPile.cs" />
<Compile Include="module\modules\ModulePresents.cs" />
<Compile Include="module\modules\ModuleRythm.cs" />
<Compile Include="module\modules\ModuleSpeedySpotlights.cs" />
<Compile Include="module\modules\ModuleSelfishStride.cs" />
<Compile Include="module\modules\ModuleSidestepSlope.cs" />
<Compile Include="module\modules\ModuleSpookySpikes.cs" />
<Compile Include="module\modules\ModuleSwiftShooters.cs" />
<Compile Include="module\modules\ModuleTanks.cs" />
<Compile Include="module\modules\ModuleTreasureHunt.cs" />
<Compile Include="module\modules\ModulePackAndPile.cs"/>
<Compile Include="module\modules\ModulePresents.cs"/>
<Compile Include="module\modules\ModuleRythm.cs"/>
<Compile Include="module\modules\ModuleSpeed.cs"/>
<Compile Include="module\modules\ModuleSpeedySpotlights.cs"/>
<Compile Include="module\modules\ModuleSelfishStride.cs"/>
<Compile Include="module\modules\ModuleSidestepSlope.cs"/>
<Compile Include="module\modules\ModuleSpookySpikes.cs"/>
<Compile Include="module\modules\ModuleSwiftShooters.cs"/>
<Compile Include="module\modules\ModuleTanks.cs"/>
<Compile Include="module\modules\ModuleTreasureHunt.cs"/>
<Compile Include="Properties\AssemblyInfo.cs"/>
<Compile Include="render\Render.cs" />
<Compile Include="setting\ISetting.cs" />
<Compile Include="setting\Setting.cs" />
<Compile Include="setting\SettingManager.cs" />
<Compile Include="setting\settings\SettingDropDown.cs" />
<Compile Include="setting\settings\SettingSlider.cs" />
<Compile Include="setting\settings\SettingSwitch.cs" />
<Compile Include="setting\settings\SettingTextField.cs" />
<Compile Include="render\Render.cs"/>
<Compile Include="setting\ISetting.cs"/>
<Compile Include="setting\Setting.cs"/>
<Compile Include="setting\SettingManager.cs"/>
<Compile Include="setting\settings\SettingDropDown.cs"/>
<Compile Include="setting\settings\SettingSlider.cs"/>
<Compile Include="setting\settings\SettingSwitch.cs"/>
<Compile Include="setting\settings\SettingTextField.cs"/>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets"/>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Expand Down
16 changes: 3 additions & 13 deletions SchummelPartie/module/Module.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@ namespace SchummelPartie.module;

public abstract class Module
{
protected readonly GUIStyle Style;

public readonly string Description;
public readonly string Name;
protected readonly GUIStyle Style;
public SettingSwitch EnabledSetting;

protected Module(string name, string description)
Expand All @@ -33,10 +32,7 @@ protected Module(string name, string description)
MelonLogger.Msg($"[Module Manager] {Name} loaded.");
}

public bool Enabled
{
get => (bool)EnabledSetting.GetValue();
}
public bool Enabled => (bool)EnabledSetting.GetValue();

public void Toggle()
{
Expand Down Expand Up @@ -74,14 +70,13 @@ public virtual void OnSettings(UWindow window)
}
}


public abstract class Minigame : Module
{
public readonly UWindow Window;

protected Minigame(string name, string description) : base(name, description)
{
Window = UWindow.Begin(name, startX: 0, startY: 0, startWidth: 360, startHeight: 400, dynamicHeight: true);
Window = UWindow.Begin(name, 0, 0, 360, startHeight: 400, dynamicHeight: true);
Window.Label($"<i>{Description}</i>");
Window.Separator();
Window.IsDrawing = false;
Expand All @@ -100,20 +95,15 @@ public override void OnSettings(UWindow window)

public abstract class ModuleMinigame<T> : Minigame
{

protected ModuleMinigame(string name, string description) : base(name, description)
{
}

public override void OnGUI()
{
if (GameManager.Minigame != null && GameManager.Minigame is T)
{
Window.IsDrawing = ModuleGUI.Instance.Enabled;
}
else
{
Window.IsDrawing = false;
}
}
}
8 changes: 5 additions & 3 deletions SchummelPartie/module/ModuleManager.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using System.Collections.Generic;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MelonLoader;
Expand Down Expand Up @@ -38,6 +37,8 @@ public static void Init()
Modules.Add(new ModuleElementalMages());
Modules.Add(new ModuleCrownCapture());
Modules.Add(new ModuleExplosiveExchange());
Modules.Add(new ModuleAirJump());
Modules.Add(new ModuleSpeed());
Modules.Add(new ModuleGUI());
// Code to generate markdown for the modules
// StringBuilder markdown = new StringBuilder();
Expand Down Expand Up @@ -67,13 +68,14 @@ public static void OnSettings(UWindow window)
{
foreach (var module in Modules)
{
Type moduleType = module.GetType();
var moduleType = module.GetType();
while (moduleType != null)
{
if (moduleType.IsGenericType && moduleType.GetGenericTypeDefinition() == typeof(ModuleMinigame<>))
break;
moduleType = moduleType.BaseType;
}

if (moduleType != null)
continue;
module.OnSettings(window);
Expand Down
29 changes: 29 additions & 0 deletions SchummelPartie/module/modules/ModuleAirJump.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
using System.Linq;
using System.Reflection;
using SchummelPartie.setting.settings;

namespace SchummelPartie.module.modules;

public class ModuleAirJump : Module
{
public SettingSlider MaxJumps;

public ModuleAirJump() : base("AirJump", "Allows you to jump in the air.")
{
MaxJumps = new SettingSlider(Name, "Max Jumps", 2, 9999, 9999);
}

public override void OnUpdate()
{
base.OnUpdate();
if (Enabled)
if (GameManager.Minigame != null && GameManager.Minigame.Playable && GameManager.Minigame.players != null &&
GameManager.Minigame.players.Count > 0 &&
GameManager.Minigame.players.FirstOrDefault(p => p.IsMe()) is Movement movement)
{
var characterMover = (CharacterMover)typeof(Movement)
.GetField("m_characterMover", BindingFlags.NonPublic | BindingFlags.Instance).GetValue(movement);
if (characterMover != null) characterMover.maxJumps = (int)(float)MaxJumps.GetValue();
}
}
}
Loading

0 comments on commit 5da6ffe

Please sign in to comment.