From e813ea0a653f70f3b8d5984cf58df5f9b94a6ef9 Mon Sep 17 00:00:00 2001 From: "ato (Atlas)" Date: Sat, 23 Nov 2024 13:42:57 +0300 Subject: [PATCH] swag additions --- BetterFirstPerson/BetterFirstPersonMod.cs | 7 +- BetterFirstPerson/Config.cs | 3 +- BetterFirstPerson/FirstPersonFix.cs | 428 ++++++++++++++++------ BetterFirstPerson/manifest.json | 8 +- 4 files changed, 315 insertions(+), 131 deletions(-) diff --git a/BetterFirstPerson/BetterFirstPersonMod.cs b/BetterFirstPerson/BetterFirstPersonMod.cs index de932e3..9bc7a23 100644 --- a/BetterFirstPerson/BetterFirstPersonMod.cs +++ b/BetterFirstPerson/BetterFirstPersonMod.cs @@ -1,16 +1,15 @@ using GDWeave; -using Serilog; -using Serilog.Core; - namespace BetterFirstPerson; public class BetterFirstPersonMod : IMod { public Config Config; + //public Serilog.ILogger Logger; public BetterFirstPersonMod(IModInterface modInterface) { this.Config = modInterface.ReadConfig(); - modInterface.Logger.Information("BetterFirstPerson loaded!"); + //this.Logger = modInterface.Logger; + modInterface.Logger.Information("[Better First Person] silliness successfully enhanced :3"); modInterface.RegisterScriptMod(new PlayerPatch(this)); } diff --git a/BetterFirstPerson/Config.cs b/BetterFirstPerson/Config.cs index d5a7566..6c681e0 100644 --- a/BetterFirstPerson/Config.cs +++ b/BetterFirstPerson/Config.cs @@ -1,7 +1,6 @@ using System.Text.Json.Serialization; namespace BetterFirstPerson; - public class Config { - [JsonInclude] public bool ResetUpDownOnFreecam = false; + [JsonInclude] public bool UseBendingInstead = false; } diff --git a/BetterFirstPerson/FirstPersonFix.cs b/BetterFirstPerson/FirstPersonFix.cs index 8b94b36..189ab27 100644 --- a/BetterFirstPerson/FirstPersonFix.cs +++ b/BetterFirstPerson/FirstPersonFix.cs @@ -1,9 +1,6 @@ -using GDWeave; -using GDWeave.Godot; +using GDWeave.Godot; using GDWeave.Godot.Variants; using GDWeave.Modding; -using Serilog; -using Serilog.Configuration; namespace BetterFirstPerson; @@ -13,81 +10,244 @@ public class PlayerPatch(BetterFirstPersonMod mod) : IScriptMod public IEnumerable Modify(string path, IEnumerable tokens) { - var waiter = new MultiTokenWaiter([ + // patch _process_animation + var waiterFollow = new MultiTokenWaiter([ t => t is IdentifierToken{Name: "skeleton"}, t => t.Type is TokenType.Period, - t => t is IdentifierToken{Name: "set_bone_custom_pose" }, + t => t is IdentifierToken{Name: "set_bone_custom_pose"}, t => t.Type is TokenType.ParenthesisOpen, - t => t is ConstantToken{Value: IntVariant{Value:1 } }, + t => t is ConstantToken{Value: IntVariant{Value: 1}}, t => t.Type is TokenType.Comma, t => t.Type is TokenType.BuiltInType, t => t.Type is TokenType.ParenthesisOpen, t => t.Type is TokenType.ParenthesisClose, t => t.Type is TokenType.ParenthesisClose, t => t.Type is TokenType.Newline, + t => t.Type is TokenType.Newline, + ], allowPartialMatch: true); + + // patch animation_data dict + var waiterAnimationData = new MultiTokenWaiter([ + t => t is ConstantToken{Value: StringVariant{Value: "back_bend"}}, + t => t.Type is TokenType.Colon, + t => t is ConstantToken{Value: RealVariant{Value: 0.0}}, + t => t.Type is TokenType.Comma, + t => t.Type is TokenType.Newline, + ]); + + // patch to _process_movement(delta) + // move the A and D rotation into an if statement + var waiterDisableLeftRightAutoRotate = new MultiTokenWaiter([ + t => t is IdentifierToken{Name: "dir"}, + t => t.Type is TokenType.OpAssign, + t => t is IdentifierToken{Name: "dive_vec"}, + t => t.Type is TokenType.Period, + t => t is IdentifierToken{Name: "normalized"}, + t => t.Type is TokenType.ParenthesisOpen, + t => t.Type is TokenType.ParenthesisClose, + t => t.Type is TokenType.Newline, + t => t.Type is TokenType.Newline, + t => t is IdentifierToken{Name: "rot_help"}, + ], allowPartialMatch: true); + + var waiterDisableLeftRightAutoRotate2 = new MultiTokenWaiter([ + t => t is IdentifierToken{Name: "dir"}, + t => t.Type is TokenType.Comma, + t => t.Type is TokenType.BuiltInType, + t => t.Type is TokenType.Period, + t => t is IdentifierToken{Name: "UP"}, + t => t.Type is TokenType.ParenthesisClose, + t => t.Type is TokenType.Newline, + ], allowPartialMatch: true); + + // patch to _zoom_update() + var waiterZoomUpdate = new MultiTokenWaiter([ + t => t.Type is TokenType.PrFunction, + t => t is IdentifierToken{Name: "_zoom_update"}, + t => t.Type is TokenType.ParenthesisOpen, + t => t.Type is TokenType.ParenthesisClose, + t => t.Type is TokenType.Colon, ], allowPartialMatch: true); foreach (var token in tokens) { - // was useful since GDWeave.Test didn't work for me :p - // mod.logger.Information(token.ToString()); - if (waiter.Check(token)) + //mod.Logger.Information(token.ToString()); + + // man made horrors beyond comprehension + // proceed with caution + + if (!mod.Config.UseBendingInstead) + { + if (waiterAnimationData.Check(token)) + { + yield return token; + yield return new ConstantToken(new StringVariant("head_rotate")); + yield return new Token(TokenType.Colon); + yield return new ConstantToken(new RealVariant(0)); + yield return new Token(TokenType.Comma); + yield return new Token(TokenType.Newline, 1); + yield return token; + } + } + + if (waiterZoomUpdate.Check(token)) + { + yield return token; + yield return new Token(TokenType.Newline, 2); + yield return new IdentifierToken("body"); + yield return new Token(TokenType.Period); + yield return new IdentifierToken("visible"); + yield return new Token(TokenType.OpAssign); + yield return new ConstantToken(new BoolVariant(true)); + yield return new Token(TokenType.Newline); + yield return new Token(TokenType.Newline); + } + else if (waiterDisableLeftRightAutoRotate.Check(token)) + { + yield return new Token(TokenType.Newline, 2); + + // if camera_zoom > 0.5 + yield return new Token(TokenType.CfIf); + yield return new IdentifierToken("camera_zoom"); + yield return new Token(TokenType.OpGreater); + yield return new ConstantToken(new RealVariant(0.5)); + yield return new Token(TokenType.Colon); + yield return new Token(TokenType.Newline, 3); + + yield return token; + } + else if (waiterDisableLeftRightAutoRotate2.Check(token)) + { + yield return new Token(TokenType.Newline, 3); + } + else if (waiterFollow.Check(token)) { yield return new Token(TokenType.Newline, 1); + if (!mod.Config.UseBendingInstead) + { + // if animation_data["head_rotate"] != 0.0: + yield return new Token(TokenType.CfIf); + yield return new IdentifierToken("animation_data"); + yield return new Token(TokenType.BracketOpen); + yield return new ConstantToken(new StringVariant("head_rotate")); + yield return new Token(TokenType.BracketClose); + yield return new Token(TokenType.OpNotEqual); + yield return new ConstantToken(new RealVariant(0.0)); + yield return new Token(TokenType.Colon); + yield return new Token(TokenType.Newline, 2); + + // skeleton.set_bone_custom_pose(11, skeleton.get_bone_pose(11).rotated(Vector3(1, 0, 0), animation_data["head_rotate"])) + yield return new IdentifierToken("skeleton"); + yield return new Token(TokenType.Period); + yield return new IdentifierToken("set_bone_custom_pose"); + yield return new Token(TokenType.ParenthesisOpen); + yield return new ConstantToken(new IntVariant(11)); + yield return new Token(TokenType.Comma); + yield return new IdentifierToken("skeleton"); + yield return new Token(TokenType.Period); + yield return new IdentifierToken("get_bone_pose"); + yield return new Token(TokenType.ParenthesisOpen); + yield return new ConstantToken(new IntVariant(11)); + yield return new Token(TokenType.ParenthesisClose); + yield return new Token(TokenType.Period); + yield return new IdentifierToken("rotated"); + yield return new Token(TokenType.ParenthesisOpen); + yield return new Token(TokenType.BuiltInType, 7); + yield return new Token(TokenType.ParenthesisOpen); + yield return new ConstantToken(new IntVariant(1)); + yield return new Token(TokenType.Comma); + yield return new ConstantToken(new IntVariant(0)); + yield return new Token(TokenType.Comma); + yield return new ConstantToken(new IntVariant(0)); + yield return new Token(TokenType.ParenthesisClose); + yield return new Token(TokenType.Comma); + yield return new IdentifierToken("animation_data"); + yield return new Token(TokenType.BracketOpen); + yield return new ConstantToken(new StringVariant("head_rotate")); + yield return new Token(TokenType.BracketClose); + yield return new Token(TokenType.ParenthesisClose); + yield return new Token(TokenType.ParenthesisClose); + yield return new Token(TokenType.Newline, 2); + yield return new Token(TokenType.Newline, 1); + + // else: + yield return new Token(TokenType.CfElse); + yield return new Token(TokenType.Colon); + yield return new Token(TokenType.Newline, 2); + + // skeleton.set_bone_custom_pose(11, Transform()) + yield return new IdentifierToken("skeleton"); + yield return new Token(TokenType.Period); + yield return new IdentifierToken("set_bone_custom_pose"); + yield return new Token(TokenType.ParenthesisOpen); + yield return new ConstantToken(new IntVariant(11)); + yield return new Token(TokenType.Comma); + yield return new Token(TokenType.BuiltInType, 13); + yield return new Token(TokenType.ParenthesisOpen); + yield return new Token(TokenType.ParenthesisClose); + yield return new Token(TokenType.ParenthesisClose); + yield return new Token(TokenType.Newline, 2); + yield return new Token(TokenType.Newline, 1); + } + // if camera_zoom < 0.5 and not freecamming: yield return new Token(TokenType.CfIf); - yield return new IdentifierToken(TokenType.Identifier, 32, "camera_zoom"); + yield return new IdentifierToken("camera_zoom"); yield return new Token(TokenType.OpLess); yield return new ConstantToken(new RealVariant(0.5)); yield return new Token(TokenType.OpAnd); yield return new Token(TokenType.OpNot); - yield return new IdentifierToken(TokenType.Identifier, 134, "freecamming"); + yield return new IdentifierToken("freecamming"); yield return new Token(TokenType.Colon); yield return new Token(TokenType.Newline, 2); - // if state != STATES.FISHING and state != STATES.FISHING_STRUGGLE: + // $body / player_body / Armature / Skeleton / face.visible = false + yield return new Token(TokenType.Dollar); + yield return new IdentifierToken("body"); + yield return new Token(TokenType.OpDiv); + yield return new IdentifierToken("player_body"); + yield return new Token(TokenType.OpDiv); + yield return new IdentifierToken("Armature"); + yield return new Token(TokenType.OpDiv); + yield return new IdentifierToken("Skeleton"); + yield return new Token(TokenType.OpDiv); + yield return new IdentifierToken("face"); + yield return new Token(TokenType.Period); + yield return new IdentifierToken("visible"); + yield return new Token(TokenType.OpAssign); + yield return new ConstantToken(new BoolVariant(false)); + yield return new Token(TokenType.Newline, 2); + + // if state != STATES.FISHING and state != STATES.FISHING_STRUGGLE ...: yield return new Token(TokenType.CfIf); - yield return new IdentifierToken(TokenType.Identifier, 47, "state"); + yield return new IdentifierToken("state"); yield return new Token(TokenType.OpNotEqual); yield return new ConstantToken(new IntVariant(1)); // 1 - BUSY yield return new Token(TokenType.OpAnd); - yield return new IdentifierToken(TokenType.Identifier, 47, "state"); + yield return new IdentifierToken("state"); yield return new Token(TokenType.OpNotEqual); yield return new ConstantToken(new IntVariant(6)); // 6 - FISHING_CAST yield return new Token(TokenType.OpAnd); - yield return new IdentifierToken(TokenType.Identifier, 47, "state"); + yield return new IdentifierToken("state"); yield return new Token(TokenType.OpNotEqual); yield return new ConstantToken(new IntVariant(7)); // 7 - FISHING yield return new Token(TokenType.OpAnd); - yield return new IdentifierToken(TokenType.Identifier, 47, "state"); + yield return new IdentifierToken("state"); yield return new Token(TokenType.OpNotEqual); yield return new ConstantToken(new IntVariant(9)); // 9 - FISHING_STRUGGLE yield return new Token(TokenType.OpAnd); - yield return new IdentifierToken(TokenType.Identifier, 47, "state"); + yield return new IdentifierToken("state"); yield return new Token(TokenType.OpNotEqual); yield return new ConstantToken(new IntVariant(10)); // 10 - SHOVEL_CAST yield return new Token(TokenType.OpAnd); - yield return new IdentifierToken(TokenType.Identifier, 47, "state"); + yield return new IdentifierToken("state"); yield return new Token(TokenType.OpNotEqual); yield return new ConstantToken(new IntVariant(11)); // 11 - SHOVEL_STRUGGLE - - // idk what these are :p - - //yield return new Token(TokenType.OpOr); - //yield return new IdentifierToken(TokenType.Identifier, 47, "state"); - //yield return new Token(TokenType.OpNotEqual); - //yield return new ConstantToken(new IntVariant(12)); // 12 - NET_CAST - //yield return new Token(TokenType.OpOr); - //yield return new IdentifierToken(TokenType.Identifier, 47, "state"); - //yield return new Token(TokenType.OpNotEqual); - //yield return new ConstantToken(new IntVariant(13)); // 13 - NET_STRUGGLE - yield return new Token(TokenType.OpAnd); - yield return new IdentifierToken(TokenType.Identifier, 47, "state"); + yield return new IdentifierToken("state"); yield return new Token(TokenType.OpNotEqual); - yield return new ConstantToken(new IntVariant(16)); // 16 - SHOVEL_STRUGGLE - + yield return new ConstantToken(new IntVariant(16)); // 16 - SHOVEL_STRUGGLE? yield return new Token(TokenType.Colon); yield return new Token(TokenType.Newline, 3); @@ -98,108 +258,135 @@ public class PlayerPatch(BetterFirstPersonMod mod) : IScriptMod yield return new Token(TokenType.Period); yield return new IdentifierToken("y"); yield return new Token(TokenType.OpAssign); - yield return new IdentifierToken(TokenType.Identifier, 137, "camera"); + yield return new IdentifierToken("camera"); yield return new Token(TokenType.Period); - yield return new IdentifierToken(TokenType.Identifier, 286, "rotation"); + yield return new IdentifierToken("rotation"); yield return new Token(TokenType.Period); - yield return new IdentifierToken(TokenType.Identifier, 288, "y"); + yield return new IdentifierToken("y"); yield return new Token(TokenType.Newline, 3); - // var back_bend = clamp(camera.rotation.x * 54, -50.0, 50.0) - yield return new Token(TokenType.PrVar); - yield return new IdentifierToken("back_bend"); - yield return new Token(TokenType.OpAssign); - yield return new Token(TokenType.BuiltInFunc, 53); - yield return new Token(TokenType.ParenthesisOpen); - yield return new IdentifierToken(TokenType.Identifier, 137, "camera"); - yield return new Token(TokenType.Period); - yield return new IdentifierToken(TokenType.Identifier, 286, "rotation"); - yield return new Token(TokenType.Period); - yield return new IdentifierToken(TokenType.Identifier, 288, "x"); - yield return new Token(TokenType.OpMul); - yield return new ConstantToken(new IntVariant(54)); - yield return new Token(TokenType.Comma); - yield return new ConstantToken(new RealVariant(-50.0)); - yield return new Token(TokenType.Comma); - yield return new ConstantToken(new RealVariant(50.0)); - yield return new Token(TokenType.ParenthesisClose); - yield return new Token(TokenType.Newline, 3); - - // $body / player_body / Armature / Skeleton / BoneAttachment / Spatial.rotation_degrees = Vector3(0.0, camera.rotation.y, back_bend * 0.7) - yield return new Token(TokenType.Dollar); - yield return new IdentifierToken(TokenType.Identifier, 142, "body"); - yield return new Token(TokenType.OpDiv); - yield return new IdentifierToken(TokenType.Identifier, 144, "player_body"); - yield return new Token(TokenType.OpDiv); - yield return new IdentifierToken(TokenType.Identifier, 145, "Armature"); - yield return new Token(TokenType.OpDiv); - yield return new IdentifierToken(TokenType.Identifier, 146, "Skeleton"); - yield return new Token(TokenType.OpDiv); - yield return new IdentifierToken(TokenType.Identifier, 597, "BoneAttachment"); - yield return new Token(TokenType.OpDiv); - yield return new IdentifierToken(TokenType.Identifier, 598, "Spatial"); - yield return new Token(TokenType.Period); - yield return new IdentifierToken(TokenType.Identifier, 342, "rotation_degrees"); - yield return new Token(TokenType.OpAssign); - yield return new Token(TokenType.BuiltInType, 7); - yield return new Token(TokenType.ParenthesisOpen); - yield return new ConstantToken(new RealVariant(0.0)); - yield return new Token(TokenType.Comma); - yield return new ConstantToken(new RealVariant(0.0)); - yield return new Token(TokenType.Comma); - yield return new IdentifierToken("back_bend"); - yield return new Token(TokenType.OpMul); - yield return new ConstantToken(new RealVariant(0.7)); - yield return new Token(TokenType.ParenthesisClose); - yield return new Token(TokenType.Newline, 3); - - // animation_data["back_bend"] = deg2rad( - back_bend) - yield return new IdentifierToken(TokenType.Identifier, 126, "animation_data"); - yield return new Token(TokenType.BracketOpen); - yield return new ConstantToken(new StringVariant("back_bend")); - yield return new Token(TokenType.BracketClose); - yield return new Token(TokenType.OpAssign); - yield return new Token(TokenType.BuiltInFunc, 43); - yield return new Token(TokenType.ParenthesisOpen); - yield return new Token(TokenType.OpSub); - yield return new IdentifierToken("back_bend"); - yield return new Token(TokenType.ParenthesisClose); - yield return new Token(TokenType.Newline, 1); - - if (mod.Config.ResetUpDownOnFreecam) + if (!mod.Config.UseBendingInstead) { - // else: - yield return new Token(TokenType.CfElse); - yield return new Token(TokenType.Colon); - - yield return new Token(TokenType.Newline, 2); - // if not freecamming: - yield return new Token(TokenType.CfIf); - yield return new Token(TokenType.OpNot); - yield return new IdentifierToken(TokenType.Identifier, 134, "freecamming"); - yield return new Token(TokenType.Colon); + // var head_rotate = clamp(camera.rotation.x * 54, -65.0, 45.0) + yield return new Token(TokenType.PrVar); + yield return new IdentifierToken("head_rotate"); + yield return new Token(TokenType.OpAssign); + yield return new Token(TokenType.BuiltInFunc, 53); + yield return new Token(TokenType.ParenthesisOpen); + yield return new IdentifierToken("camera"); + yield return new Token(TokenType.Period); + yield return new IdentifierToken("rotation"); + yield return new Token(TokenType.Period); + yield return new IdentifierToken("x"); + yield return new Token(TokenType.OpMul); + yield return new ConstantToken(new IntVariant(54)); + yield return new Token(TokenType.Comma); + yield return new ConstantToken(new RealVariant(-65.0)); + yield return new Token(TokenType.Comma); + yield return new ConstantToken(new RealVariant(45.0)); + yield return new Token(TokenType.ParenthesisClose); yield return new Token(TokenType.Newline, 3); - // if animation_data["back_bend"] != 0.0: - yield return new Token(TokenType.CfIf); - yield return new IdentifierToken(TokenType.Identifier, 126, "animation_data"); + // animation_data["head_rotate"] = deg2rad(-head_rotate) + yield return new IdentifierToken("animation_data"); yield return new Token(TokenType.BracketOpen); - yield return new ConstantToken(new StringVariant("back_bend")); + yield return new ConstantToken(new StringVariant("head_rotate")); yield return new Token(TokenType.BracketClose); - yield return new Token(TokenType.OpNotEqual); - yield return new ConstantToken(new RealVariant(0.0)); - yield return new Token(TokenType.Colon); - yield return new Token(TokenType.Newline, 4); + yield return new Token(TokenType.OpAssign); + yield return new Token(TokenType.BuiltInFunc, 43); + yield return new Token(TokenType.ParenthesisOpen); + yield return new Token(TokenType.OpSub); + yield return new IdentifierToken("head_rotate"); + yield return new Token(TokenType.ParenthesisClose); + yield return new Token(TokenType.Newline, 1); + } + else + { + // var back_bend = clamp(camera.rotation.x * 54, -50.0, 50.0) + yield return new Token(TokenType.PrVar); + yield return new IdentifierToken("back_bend"); + yield return new Token(TokenType.OpAssign); + yield return new Token(TokenType.BuiltInFunc, 53); + yield return new Token(TokenType.ParenthesisOpen); + yield return new IdentifierToken("camera"); + yield return new Token(TokenType.Period); + yield return new IdentifierToken("rotation"); + yield return new Token(TokenType.Period); + yield return new IdentifierToken("x"); + yield return new Token(TokenType.OpMul); + yield return new ConstantToken(new IntVariant(54)); + yield return new Token(TokenType.Comma); + yield return new ConstantToken(new RealVariant(-50.0)); + yield return new Token(TokenType.Comma); + yield return new ConstantToken(new RealVariant(50.0)); + yield return new Token(TokenType.ParenthesisClose); + yield return new Token(TokenType.Newline, 3); - // animation_data["back_bend"] = 0.0 - yield return new IdentifierToken(TokenType.Identifier, 126, "animation_data"); + // animation_data["back_bend"] = deg2rad( - back_bend) + yield return new IdentifierToken("animation_data"); yield return new Token(TokenType.BracketOpen); yield return new ConstantToken(new StringVariant("back_bend")); yield return new Token(TokenType.BracketClose); yield return new Token(TokenType.OpAssign); - yield return new ConstantToken(new RealVariant(0.0)); + yield return new Token(TokenType.BuiltInFunc, 43); + yield return new Token(TokenType.ParenthesisOpen); + yield return new Token(TokenType.OpSub); + yield return new IdentifierToken("back_bend"); + yield return new Token(TokenType.ParenthesisClose); yield return new Token(TokenType.Newline, 1); } + + // else: + yield return new Token(TokenType.CfElse); + yield return new Token(TokenType.Colon); + yield return new Token(TokenType.Newline, 2); + + // $body / player_body / Armature / Skeleton / face.visible = true + yield return new Token(TokenType.Dollar); + yield return new IdentifierToken("body"); + yield return new Token(TokenType.OpDiv); + yield return new IdentifierToken("player_body"); + yield return new Token(TokenType.OpDiv); + yield return new IdentifierToken("Armature"); + yield return new Token(TokenType.OpDiv); + yield return new IdentifierToken("Skeleton"); + yield return new Token(TokenType.OpDiv); + yield return new IdentifierToken("face"); + yield return new Token(TokenType.Period); + yield return new IdentifierToken("visible"); + yield return new Token(TokenType.OpAssign); + yield return new ConstantToken(new BoolVariant(true)); + yield return new Token(TokenType.Newline, 2); + + // if not freecamming: + yield return new Token(TokenType.CfIf); + yield return new Token(TokenType.OpNot); + yield return new IdentifierToken("freecamming"); + yield return new Token(TokenType.Colon); + yield return new Token(TokenType.Newline, 3); + + var animationType = mod.Config.UseBendingInstead ? "back_bend" : "head_rotate"; + + // if animation_data[{animationType}] != 0.0: + yield return new Token(TokenType.CfIf); + yield return new IdentifierToken("animation_data"); + yield return new Token(TokenType.BracketOpen); + yield return new ConstantToken(new StringVariant(animationType)); + yield return new Token(TokenType.BracketClose); + yield return new Token(TokenType.OpNotEqual); + yield return new ConstantToken(new RealVariant(0.0)); + yield return new Token(TokenType.Colon); + yield return new Token(TokenType.Newline, 4); + + // animation_data[{animationType}] = 0.0 + yield return new IdentifierToken("animation_data"); + yield return new Token(TokenType.BracketOpen); + yield return new ConstantToken(new StringVariant(animationType)); + yield return new Token(TokenType.BracketClose); + yield return new Token(TokenType.OpAssign); + yield return new ConstantToken(new RealVariant(0.0)); + yield return new Token(TokenType.Newline, 1); + yield return token; } else { @@ -207,5 +394,4 @@ public class PlayerPatch(BetterFirstPersonMod mod) : IScriptMod } } } - } \ No newline at end of file diff --git a/BetterFirstPerson/manifest.json b/BetterFirstPerson/manifest.json index 56b9791..93a95a4 100644 --- a/BetterFirstPerson/manifest.json +++ b/BetterFirstPerson/manifest.json @@ -2,9 +2,9 @@ "Id": "BetterFirstPerson", "AssemblyPath": "BetterFirstPerson.dll", "Metadata": { - "Name": "BetterFirstPerson", + "Name": "Better First Person", "Author": "ato", - "Version": "1.0.0", - "Description": "better first person mod for webfishing" + "Version": "1.1.0", + "Description": "silly first person mod for silly game" } -} \ No newline at end of file +}