From 1d1fe56241298fabcd75967827b40055cadc7b30 Mon Sep 17 00:00:00 2001 From: Lexi Date: Sat, 10 Feb 2024 09:10:40 -0500 Subject: [PATCH 1/2] Fix bug in Transformer.cs --- src/PatchManager.SassyPatching/Execution/Universe.cs | 2 +- src/PatchManager.SassyPatching/Transformer.cs | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/PatchManager.SassyPatching/Execution/Universe.cs b/src/PatchManager.SassyPatching/Execution/Universe.cs index f5369cb..1f17608 100644 --- a/src/PatchManager.SassyPatching/Execution/Universe.cs +++ b/src/PatchManager.SassyPatching/Execution/Universe.cs @@ -258,7 +258,7 @@ private void LoadSinglePatch(string modId, FileInfo patch, Transformer tokenTran } catch (Exception e) { - _errorLogger($"Could not run patch: {modId}:{patch.Name} due to: {e.Message}"); + _errorLogger($"Could not run patch: {modId}:{patch.Name} due to: {e}"); } } diff --git a/src/PatchManager.SassyPatching/Transformer.cs b/src/PatchManager.SassyPatching/Transformer.cs index 0985b83..edd5543 100644 --- a/src/PatchManager.SassyPatching/Transformer.cs +++ b/src/PatchManager.SassyPatching/Transformer.cs @@ -806,6 +806,12 @@ public override Node VisitImplicit_stage_def(sassy_parser.Implicit_stage_defCont context.GetCoordinate(), context.stage.GetStringValue(), context.stage_attribute().Select(Visit).Cast().ToList()); + public override Node VisitStage_value_before(sassy_parser.Stage_value_beforeContext context) => + new StageDefinitionAttribute(context.GetCoordinate(), context.stage.GetStringValue(), false); + + public override Node VisitStage_value_after(sassy_parser.Stage_value_afterContext context) => + new StageDefinitionAttribute(context.GetCoordinate(), context.stage.GetStringValue(), true); + /// public override Node VisitConfig_creation(sassy_parser.Config_creationContext context) => new ConfigCreation( context.GetCoordinate(), context.label.GetStringValue(), context.config_name.GetStringValue(), From 0618228f2009e3b4a0a8e94a03dbf2a11f527258 Mon Sep 17 00:00:00 2001 From: cheese3660 Date: Sat, 10 Feb 2024 09:11:39 -0500 Subject: [PATCH 2/2] Update swinfo.json --- plugin_template/swinfo.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin_template/swinfo.json b/plugin_template/swinfo.json index 25c1368..e3d6eb3 100644 --- a/plugin_template/swinfo.json +++ b/plugin_template/swinfo.json @@ -5,7 +5,7 @@ "name": "Patch Manager", "description": "A mod for generic patching needs similar to KSP 1's Module Manager.", "source": "https://github.com/KSP2Community/PatchManager", - "version": "0.9.3", + "version": "0.9.4", "version_check": "https://raw.githubusercontent.com/KSP2Community/PatchManager/main/plugin_template/swinfo.json", "ksp2_version": { "min": "0.2.0",