Skip to content

Commit 0ca35e1

Browse files
committed
Add meadow gamemode support and rewrite description
1 parent 5dc56ce commit 0ca35e1

8 files changed

+108
-68
lines changed

PlayerHooks.cs

+8
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
using MoreSlugcats;
77
using System.Collections.Generic;
88
using System.Linq;
9+
using HarmonyLib;
10+
using RainMeadow;
911
using RWCustom;
1012
using UnityEngine.Serialization;
1113

@@ -55,6 +57,12 @@ private void PlayerHooks()
5557

5658
// Allows grabbing other players
5759
IL.Player.Grabability += Player_AppendPupCheckGrabability;
60+
61+
HarmonyInstance = new Harmony(PluginInfo.PluginGUID);
62+
if (rainMeadowEnabled)
63+
{
64+
HarmonyInstance.PatchAll(typeof(MeadowPlayerControllerPatches));
65+
}
5866
}
5967

6068
private void Player_MovementUpdate(On.Player.orig_MovementUpdate orig, Player self, bool eu)

PluginInfo.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
internal static class PluginInfo {
22
public const string PluginGUID = "amione.Pupifier";
33
public const string PluginName = "Pupifier";
4-
public const string PluginVersion = "2.0.5";
4+
public const string PluginVersion = "2.0.6";
55
}

Pupifier.cs

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
using System.Security.Permissions;
33
using BepInEx;
44
using System.Reflection;
5+
using HarmonyLib;
56
using UnityEngine;
67
using UnityEngine.Serialization;
78

@@ -18,6 +19,7 @@ namespace Pupifier
1819
public partial class Pupifier : BaseUnityPlugin
1920
{
2021
public static Pupifier Instance;
22+
public static Harmony HarmonyInstance;
2123
public static PupifierOptions Options;
2224
public static PlayerData PlayerData;
2325
[FormerlySerializedAs("RainMeadowEnabled")] public bool rainMeadowEnabled;

Pupifier.csproj

+33-20
Original file line numberDiff line numberDiff line change
@@ -3,33 +3,46 @@
33
<TargetFramework>net48</TargetFramework>
44
<AssemblyName>amione.Pupifier</AssemblyName>
55
<Product>Pupifier</Product>
6-
<ProductDescription>Lets you become a slugpup in Rain World with a push of a button (dynamic in-game transform), with meadow support. This mod was made specifically for meadow but works for non-meadow as well
7-
8-
Known issues
9-
10-
- Meadow issues (not related to my mod):
11-
grabbing players and breaking if you go thru a pipe, piggybacking desync
12-
- Meadow Gamemode: Not working; henpemaz has coded it so that pups are not allowed in the meadow gamemode
13-
14-
Features
15-
16-
- Transform into a slugpup dynamically, also works in Meadow
17-
- Change your stats based on slugpup relativity
18-
- Works with modded slugcats as well
19-
20-
Credits
21-
6+
<ProductDescription>[h2]Lets you become a slugpup in Rain World with a push of a button[/h2]
7+
This mod was made specifically for meadow but works for non-meadow as well
8+
9+
[hr][/hr]
10+
[h3]Known issues[/h3]
11+
[list]
12+
[*]Meadow issues (not related to my mod): grabbing players and breaking if you go thru a pipe, piggybacking desync (toggle grabbability in settings)
13+
[*]Meadow Gamemode: Not working; henpemaz has coded it so that pups are not allowed in the meadow gamemode, enable locally in toggles settings
14+
[/list]
15+
16+
[hr][/hr]
17+
[h3]Features[/h3]
18+
[list]
19+
[*] Transform into a slugpup dynamically, with a hotkey, even when in-game
20+
[*] Change your stats based on slugpup relativity
21+
[*] Supports controller input as a hotkey to change
22+
[*] Supports Rain Meadow
23+
[*] Supports Modded Slugcats
24+
[/list]
25+
26+
[hr][/hr]
27+
[h3]Q&amp;A[/h3]
28+
[list]
29+
[*] Does this mod change gameplay? Yes, and a ton, you will behave almost like a slugpup, with some changes, for example, it's all relative so if you pick rivulet you will be faster than a normal slugpup
30+
[*] Is it only cosmetic? No, you could try to make it, I haven't tested much but there is a toggle in the stats settings to turn off changing stats, that way you will still be small but no stats will be changed
31+
[*] What is configurable? Every stat you have as a player, along with holding double spears as spearmaster or holding 2 items no matter what or not letting people grab you
32+
[/list]
33+
34+
[hr][/hr]
35+
[h3]Credits[/h3]
2236
- amione - Creator
2337
- youbitchoc - For helping in development
2438
- henpemaz - For Rain Meadow
2539
- Maxi Mol - For Mouse Drag code
2640
- LDani, simichan1227 - For testing the s**t out of my mod (It was kinda encouraging)
2741

28-
Report Issues on github please! https://github.com/xamionex/Pupifier/issues/new
29-
Steam doesn't give me notifications for comments on my own mods for some reason,
30-
so I might not see your comment because I need to literally go to the mod page to see it, and I'm not doing that every day.
42+
[hr][/hr]
43+
[h3]Report Issues on github please! https://github.com/xamionex/Pupifier/issues/new[/h3]
3144
</ProductDescription>
32-
<ModVersion>2.0.5</ModVersion>
45+
<ModVersion>2.0.6</ModVersion>
3346
<Version>2.0.8</Version>
3447
<LangVersion>10.0</LangVersion>
3548
<Nullable>enable</Nullable>

Pupifier/modinfo.json

+29-16
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,47 @@
11
{
22
"id": "amione.Pupifier",
33
"name": "Pupifier",
4-
"version": "2.0.5",
4+
"version": "2.0.6",
55
"target_game_version": "v1.9.15",
66
"authors": "amione - Creator, youbitchoc - For helping in development, henpemaz - For Rain Meadow, Maxi Mol - For Mouse Drag code, LDani, simichan1227 - For testing the s**t out of my mod (It was kinda encouraging)",
7-
"description": "Lets you become a slugpup in Rain World with a push of a button (dynamic in-game transform), with meadow support. This mod was made specifically for meadow but works for non-meadow as well
7+
"description": "[h2]Lets you become a slugpup in Rain World with a push of a button[/h2]
8+
This mod was made specifically for meadow but works for non-meadow as well
89

9-
Known issues
10+
[hr][/hr]
11+
[h3]Known issues[/h3]
12+
[list]
13+
[*]Meadow issues (not related to my mod): grabbing players and breaking if you go thru a pipe, piggybacking desync (toggle grabbability in settings)
14+
[*]Meadow Gamemode: Not working; henpemaz has coded it so that pups are not allowed in the meadow gamemode, enable locally in toggles settings
15+
[/list]
1016

11-
- Meadow issues (not related to my mod):
12-
grabbing players and breaking if you go thru a pipe, piggybacking desync
13-
- Meadow Gamemode: Not working; henpemaz has coded it so that pups are not allowed in the meadow gamemode
14-
15-
Features
17+
[hr][/hr]
18+
[h3]Features[/h3]
19+
[list]
20+
[*] Transform into a slugpup dynamically, with a hotkey, even when in-game
21+
[*] Change your stats based on slugpup relativity
22+
[*] Supports controller input as a hotkey to change
23+
[*] Supports Rain Meadow
24+
[*] Supports Modded Slugcats
25+
[/list]
1626

17-
- Transform into a slugpup dynamically, also works in Meadow
18-
- Change your stats based on slugpup relativity
19-
- Works with modded slugcats as well
20-
21-
Credits
27+
[hr][/hr]
28+
[h3]Q&A[/h3]
29+
[list]
30+
[*] Does this mod change gameplay? Yes, and a ton, you will behave almost like a slugpup, with some changes, for example, it's all relative so if you pick rivulet you will be faster than a normal slugpup
31+
[*] Is it only cosmetic? No, you could try to make it, I haven't tested much but there is a toggle in the stats settings to turn off changing stats, that way you will still be small but no stats will be changed
32+
[*] What is configurable? Every stat you have as a player, along with holding double spears as spearmaster or holding 2 items no matter what or not letting people grab you
33+
[/list]
2234

35+
[hr][/hr]
36+
[h3]Credits[/h3]
2337
- amione - Creator
2438
- youbitchoc - For helping in development
2539
- henpemaz - For Rain Meadow
2640
- Maxi Mol - For Mouse Drag code
2741
- LDani, simichan1227 - For testing the s**t out of my mod (It was kinda encouraging)
2842

29-
Report Issues on github please! https://github.com/xamionex/Pupifier/issues/new
30-
Steam doesn't give me notifications for comments on my own mods for some reason,
31-
so I might not see your comment because I need to literally go to the mod page to see it, and I'm not doing that every day.
43+
[hr][/hr]
44+
[h3]Report Issues on github please! https://github.com/xamionex/Pupifier/issues/new[/h3]
3245
",
3346
"requirements": ["moreslugcats"],
3447
"requirements_names": [],

PupifierOptions.cs

+3
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ public partial class PupifierOptions : OptionInterface
3333
public readonly Configurable<bool> ManualPupChange;
3434
public readonly Configurable<bool> LoggingPupEnabled;
3535
public readonly Configurable<bool> LoggingStatusEnabled;
36+
public readonly Configurable<bool> EnableInMeadowGamemode;
3637

3738
public PupifierOptions()
3839
{
@@ -59,6 +60,7 @@ public PupifierOptions()
5960
// Toggles tab
6061
LoggingPupEnabled = config.Bind(nameof(LoggingPupEnabled), true, new ConfigurableInfo("If enabled, console will log pup changes", null, "", "Enable logging for pup change"));
6162
LoggingStatusEnabled = config.Bind(nameof(LoggingStatusEnabled), false, new ConfigurableInfo("If enabled, console will log stats upon changes", null, "", "Enable logging for stats when changing"));
63+
EnableInMeadowGamemode = config.Bind(nameof(EnableInMeadowGamemode), false, new ConfigurableInfo("If enabled, you will locally be a pup in the meadow gamemode, since you are blocked in the meadow gamemode from being a pup, it will only show locally, and for anyone else that has the mod", null, "", "Enable in MeadowGamemode (read desc)"));
6264
DisableBeingGrabbed = config.Bind(nameof(DisableBeingGrabbed), false, new ConfigurableInfo("If enabled, you can't be grabbed", null, "", "Disable being Grabbed"));
6365
UseBothHands = config.Bind(nameof(UseBothHands), false, new ConfigurableInfo("If enabled, you can use both hands as a pup", null, "", "Enable using both hands"));
6466
SpearmasterTwoHanded = config.Bind(nameof(SpearmasterTwoHanded), true, new ConfigurableInfo("If enabled, you can use both hands for spears as spearmaster", null, "", "Spearmaster can hold 2 spears"));
@@ -138,6 +140,7 @@ public override void Initialize()
138140
sepr = 30f;
139141
AddCheckbox(LoggingPupEnabled, new Vector2(x, y -= sepr), softGray, softGray, softGray);
140142
AddCheckbox(LoggingStatusEnabled, new Vector2(x, y -= sepr), softGray, softGray, softGray);
143+
AddCheckbox(EnableInMeadowGamemode, new Vector2(x, y -= sepr), softYellow, softYellow, softYellow);
141144
AddCheckbox(DisableBeingGrabbed, new Vector2(x, y -= sepr), softYellow, softYellow, softYellow);
142145
AddCheckbox(UseBothHands, new Vector2(x, y -= sepr), softYellow, softYellow, softYellow);
143146
AddCheckbox(SpearmasterTwoHanded, new Vector2(x, y -= sepr), softYellow, softYellow, softYellow);

RainMeadowCompatibility.cs

+14
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
using System;
22
using System.Collections.Generic;
33
using System.Linq;
4+
using HarmonyLib;
45
using RainMeadow;
56

67
#pragma warning disable CS8625 // Cannot convert null literal to non-nullable reference type.
@@ -9,6 +10,18 @@
910

1011
namespace Pupifier
1112
{
13+
[HarmonyPatch(typeof(MeadowPlayerController))]
14+
public static class MeadowPlayerControllerPatches
15+
{
16+
[HarmonyPatch("Player_Update")]
17+
[HarmonyPostfix]
18+
private static void Postfix_Player_Update(Player self, bool eu)
19+
{
20+
if (!Pupifier.Options.EnableInMeadowGamemode.Value) return;
21+
self.playerState.isPup = Pupifier.Instance.slugpupEnabled;
22+
}
23+
}
24+
1225
public class PlayerData : OnlineResource.ResourceData
1326
{
1427
public List<OnlinePlayer> Ungrabbables = new();
@@ -64,6 +77,7 @@ public static bool GamemodeIsMeadow()
6477
{
6578
if (GameIsMeadow())
6679
{
80+
if (Options.EnableInMeadowGamemode.Value) return false;
6781
return OnlineManager.lobby.gameMode is MeadowGameMode;
6882
}
6983
return false;

readme.md

+18-31
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,30 @@
11
# Pupifier
2-
3-
Lets you become a slugpup in Rain World with a push of a button (dynamic in-game transform), with meadow support. This mod was made specifically for meadow but works for non-meadow as well
2+
Lets you become a slugpup in Rain World with a push of a button (dynamic in-game transform), with meadow support.
3+
This mod was made specifically for meadow but works for non-meadow as well
44

55
## Known issues
66

7-
- Meadow issues are not related to my mod (grabbing players and breaking if you go thru a pipe, piggybacking desync)
8-
- Report any issues please!
7+
- Meadow issues (not related to my mod): grabbing players and breaking if you go thru a pipe, piggybacking desync
8+
- If you don't want these to happen there is a toggle in the remix menu to disable people from grabbing you
9+
- Meadow Gamemode: Not working; henpemaz has coded it so that pups are not allowed in the meadow gamemode, enable locally in toggles settings
910

1011
## Features
1112

12-
- Transform into a slugpup (Works in Rain Meadow)
13-
- Change your stats based on slugpup relativity
14-
- Works with modded slugcats as well
15-
16-
## Installation
17-
18-
1. Download the latest release of Pupifier.
19-
2. Extract the contents of the zip file into your game directory.
20-
3. Ensure that the required mods (`Rain Meadow` and `More Slugcats`) are installed.
21-
4. Launch the game and enjoy your new slugpup adventure!
22-
23-
## Requirements
13+
- Transform into a slugpup dynamically, with a hotkey, even when in-game, also works in Meadow
14+
- Change your stats based on slugpup relativity, works with modded slugcats
15+
- Supports controller input as a hotkey to change
2416

25-
- Game version: v1.9.15
26-
- Required Mods: moreslugcats
17+
## Q&amp;A
18+
- Does this mod change gameplay? Yes, and a ton, you will behave almost like a slugpup, with some changes, for example, it's all relative so if you pick rivulet you will be faster than a normal slugpup
19+
- Is it only cosmetic? No, you could try to make it, I haven't tested much but there is a toggle in the stats settings to turn off changing stats, that way you will still be small but no stats will be changed
20+
- What is configurable? Every stat you have as a player, along with holding double spears as spearmaster or holding 2 items no matter what or not letting people grab you
2721

2822
## Credits
2923

30-
- **amione** - Creator
31-
- **youbitchoc** - For helping in development
32-
- **henpemaz** - For Rain Meadow
33-
- **Maxi Mol** - For Mouse Drag code
34-
- **LDani**, **simichan1227** - For testing the s**t out of my mod (It was kinda encouraging)
35-
36-
## License
37-
38-
This mod is provided as-is, without any express or implied warranties. Use at your own risk.
39-
40-
## Support
24+
- amione - Creator
25+
- youbitchoc - For helping in development
26+
- henpemaz - For Rain Meadow
27+
- Maxi Mol - For Mouse Drag code
28+
- LDani, simichan1227 - For testing the s**t out of my mod (It was kinda encouraging)
4129

42-
If you encounter any issues or have questions, feel free to reach out or contribute to the development of the mod.
43-
Enjoy your time as a slugpup in Rain Meadow!
30+
### Report Issues on github please! https://github.com/xamionex/Pupifier/issues/new

0 commit comments

Comments
 (0)