-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
53 changed files
with
3,401 additions
and
392 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
using GDWeave.Godot; | ||
using GDWeave.Modding; | ||
|
||
namespace NeoQOLPack.Mods; | ||
|
||
public class CosmeticMenuPatcher : IScriptMod | ||
{ | ||
public bool ShouldRun(string path) => path == "res://Scenes/HUD/CosmeticMenu/cosmetic_menu.gdc"; | ||
|
||
public IEnumerable<Token> Modify(string path, IEnumerable<Token> tokens) | ||
{ | ||
MultiTokenWaiter readyWaiter = new MultiTokenWaiter([ | ||
t=>t is IdentifierToken {Name: "_ready"}, | ||
t=>t is IdentifierToken {Name: "add_child"}, | ||
t=>t.Type is TokenType.Newline | ||
], allowPartialMatch: true); | ||
|
||
foreach (Token token in tokens) | ||
{ | ||
if (readyWaiter.Check(token)) | ||
{ | ||
yield return token; | ||
|
||
yield return new Token(TokenType.Newline, 1); | ||
yield return new IdentifierToken("model"); | ||
yield return new Token(TokenType.Period); | ||
yield return new IdentifierToken("owner_id"); | ||
yield return new Token(TokenType.OpAssign); | ||
yield return new IdentifierToken("Network"); | ||
yield return new Token(TokenType.Period); | ||
yield return new IdentifierToken("STEAM_ID"); | ||
|
||
yield return new Token(TokenType.Newline, 1); | ||
} | ||
else yield return token; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
using GDWeave.Godot; | ||
using GDWeave.Godot.Variants; | ||
using GDWeave.Modding; | ||
|
||
namespace NeoQOLPack.Mods; | ||
|
||
public class PlayerCameraPatcher : IScriptMod | ||
{ | ||
public bool ShouldRun(string path) => path == ""; | ||
|
||
public IEnumerable<Token> Modify(string path, IEnumerable<Token> tokens) | ||
{ | ||
MultiTokenWaiter extendsWaiter = new MultiTokenWaiter([ | ||
t=>t.Type is TokenType.PrExtends, | ||
t=>t.Type is TokenType.Newline | ||
], allowPartialMatch: true); | ||
|
||
foreach (Token token in tokens) | ||
{ | ||
yield return token; | ||
|
||
yield return new Token(TokenType.PrFunction); | ||
yield return new IdentifierToken("_process"); | ||
yield return new Token(TokenType.ParenthesisOpen); | ||
yield return new IdentifierToken("delta"); | ||
yield return new Token(TokenType.ParenthesisClose); | ||
yield return new Token(TokenType.Colon); | ||
yield return new Token(TokenType.Newline, 1); | ||
|
||
yield return new IdentifierToken("fov"); | ||
yield return new Token(TokenType.OpAssign); | ||
|
||
} | ||
} | ||
} |
Oops, something went wrong.