Skip to content

Commit

Permalink
update to work with 1.0.9, remove some things, add some things
Browse files Browse the repository at this point in the history
  • Loading branch information
neomoth committed Nov 8, 2024
1 parent 9d41db0 commit 26b2745
Show file tree
Hide file tree
Showing 20 changed files with 301 additions and 1,828 deletions.
7 changes: 2 additions & 5 deletions NeoQOLPack/Mod.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,17 @@ public Mod(IModInterface modInterface) {
this.Config = modInterface.ReadConfig<Config>();
Logger = modInterface.Logger;
_ = GetVersion();
modInterface.RegisterScriptMod(new InventoryItemPatcher(this));
modInterface.RegisterScriptMod(new PlayerDataPatcher(this));
modInterface.RegisterScriptMod(new InventoryPactcher(this));
modInterface.RegisterScriptMod(new ItemSelectPatcher(this));
modInterface.RegisterScriptMod(new PlayerPatcher(this));
modInterface.RegisterScriptMod(new ShopPatcher());
modInterface.RegisterScriptMod(new PlayerHudPatcher(this));
modInterface.RegisterScriptMod(new ShopButtonPatcher(this));
modInterface.RegisterScriptMod(new MenuPatcher(this, versionTag));
modInterface.RegisterScriptMod(new OptionsMenuPatcher(this));
modInterface.RegisterScriptMod(new EscMenuPatcher());
modInterface.RegisterScriptMod(new ButtonSellPatcher());
modInterface.RegisterScriptMod(new ShopCategoryPatcher());
modInterface.RegisterScriptMod(new CosmeticMenuPatcher());
modInterface.RegisterScriptMod(new SellAllButtonPatcher());
modInterface.RegisterScriptMod(new PlayerLabelPatcher());
if (injectUpdateNotice) ;
}

Expand Down
115 changes: 0 additions & 115 deletions NeoQOLPack/Mods/ButtonSellPatcher.cs

This file was deleted.

43 changes: 1 addition & 42 deletions NeoQOLPack/Mods/EscMenuPatcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,6 @@ public class EscMenuPatcher : IScriptMod

public IEnumerable<Token> Modify(string path, IEnumerable<Token> tokens)
{
MultiTokenWaiter processWaiter = new MultiTokenWaiter([
t=>t is IdentifierToken {Name: "_process"},
t=>t.Type is TokenType.Newline
], allowPartialMatch:true);

MultiTokenWaiter openWaiter = new MultiTokenWaiter([
t=>t is IdentifierToken {Name: "_open"},
t=>t.Type is TokenType.ParenthesisOpen,
Expand All @@ -33,43 +28,7 @@ public IEnumerable<Token> Modify(string path, IEnumerable<Token> tokens)

foreach (Token token in tokens)
{
if (processWaiter.Check(token))
{
yield return token;

yield return new IdentifierToken("get_node");
yield return new Token(TokenType.ParenthesisOpen);
yield return new ConstantToken(new StringVariant("VBoxContainer"));
yield return new Token(TokenType.ParenthesisClose);
yield return new Token(TokenType.Period);
yield return new IdentifierToken("anchor_top");
yield return new Token(TokenType.OpAssign);
yield return new ConstantToken(new RealVariant(0.35));
yield return new Token(TokenType.CfIf);
yield return new IdentifierToken("Network");
yield return new Token(TokenType.Period);
yield return new IdentifierToken("PLAYING_OFFLINE");
yield return new Token(TokenType.CfElse);
yield return new ConstantToken(new RealVariant(0.32));
yield return new Token(TokenType.Newline, 1);
yield return new IdentifierToken("get_node");
yield return new Token(TokenType.ParenthesisOpen);
yield return new ConstantToken(new StringVariant("VBoxContainer"));
yield return new Token(TokenType.ParenthesisClose);
yield return new Token(TokenType.Period);
yield return new IdentifierToken("anchor_bottom");
yield return new Token(TokenType.OpAssign);
yield return new ConstantToken(new RealVariant(0.65));
yield return new Token(TokenType.CfIf);
yield return new IdentifierToken("Network");
yield return new Token(TokenType.Period);
yield return new IdentifierToken("PLAYING_OFFLINE");
yield return new Token(TokenType.CfElse);
yield return new ConstantToken(new RealVariant(0.68));

yield return new Token(TokenType.Newline, 1);
}
else if (openWaiter.Check(token))
if (openWaiter.Check(token))
{
yield return token;

Expand Down
30 changes: 0 additions & 30 deletions NeoQOLPack/Mods/GlobalsPatcher.cs

This file was deleted.

Loading

0 comments on commit 26b2745

Please sign in to comment.