Skip to content

Commit

Permalink
Fix incorrect MonoModReplace on properties (#857)
Browse files Browse the repository at this point in the history
This caused MonoMod to generate new orig get and set methods for the Anxiety property of Distort.cs and the SelectionColor property of MenuButton.cs. Moving the MonoModReplace attribute to the getter/setter and not the property fixes this.
  • Loading branch information
GamationOnGithub authored Nov 26, 2024
1 parent 1c22cc2 commit 47405a8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
6 changes: 1 addition & 5 deletions Celeste.Mod.mm/Patches/Distort.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,8 @@ class patch_Distort {

private static float anxiety = 0f;

[MonoModReplace]
public new static float Anxiety {
get
{
return anxiety;
}
[MonoModReplace]
set
{
anxiety = value;
Expand Down
4 changes: 2 additions & 2 deletions Celeste.Mod.mm/Patches/MenuButton.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ abstract class patch_MenuButton : MenuButton {
private bool selected;
private Tween tween;

[MonoModReplace]
public new Color SelectionColor {
public new Color SelectionColor {
[MonoModReplace]
get
{
if (selected) {
Expand Down

0 comments on commit 47405a8

Please sign in to comment.