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", 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(),