diff --git a/YAFC/Utils/Preferences.cs b/YAFC/Utils/Preferences.cs index c50e5532..9b2c13f0 100644 --- a/YAFC/Utils/Preferences.cs +++ b/YAFC/Utils/Preferences.cs @@ -15,6 +15,8 @@ public class Preferences public static readonly string appDataFolder; private static readonly string fileName; + public static readonly string autosaveFilename; + static Preferences() { appDataFolder = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData); @@ -22,7 +24,8 @@ static Preferences() appDataFolder = Path.Combine(appDataFolder, "YAFC"); if (!string.IsNullOrEmpty(appDataFolder) && !Directory.Exists(appDataFolder)) Directory.CreateDirectory(appDataFolder); - + + autosaveFilename = Path.Combine(appDataFolder, "autosave.yafc"); fileName = Path.Combine(appDataFolder, "yafc.config"); if (File.Exists(fileName)) { diff --git a/YAFC/Windows/DependencyExplorer.cs b/YAFC/Windows/DependencyExplorer.cs index 105eaa79..7b38505c 100644 --- a/YAFC/Windows/DependencyExplorer.cs +++ b/YAFC/Windows/DependencyExplorer.cs @@ -134,6 +134,8 @@ public override void Build(ImGui gui) { if (gui.BuildLink("Mark as inaccessible")) SetFlag(ProjectPerItemFlags.MarkedInaccessible, true); + if (gui.BuildLink("Mark as accessible without milestones")) + SetFlag(ProjectPerItemFlags.MarkedAccessible, true); } } else diff --git a/YAFC/Workspace/ProjectPageView.cs b/YAFC/Workspace/ProjectPageView.cs index 11e1942b..dbc80999 100644 --- a/YAFC/Workspace/ProjectPageView.cs +++ b/YAFC/Workspace/ProjectPageView.cs @@ -86,7 +86,7 @@ public MemoryDrawingSurface GenerateFullPageScreenshot() var hsize = headerContent.contentSize; var bsize = bodyContent.contentSize; var fsize = new Vector2(CalculateWidth(), hsize.Y + bsize.Y); - var surface = new MemoryDrawingSurface(fsize, 20); + var surface = new MemoryDrawingSurface(fsize, 22); headerContent.Present(surface, new Rect(default, hsize), new Rect(default, hsize), null); var bodyRect = new Rect(0f, hsize.Y, bsize.X, bsize.Y); var prevOffset = bodyContent.offset; diff --git a/YAFCmodel/Analysis/AutomationAnalysis.cs b/YAFCmodel/Analysis/AutomationAnalysis.cs index 4d2dde4a..8a81895d 100644 --- a/YAFCmodel/Analysis/AutomationAnalysis.cs +++ b/YAFCmodel/Analysis/AutomationAnalysis.cs @@ -110,6 +110,8 @@ public override void Compute(Project project, ErrorCollector warnings) var oldState = state[revDep]; if (oldState == Unknown || oldState == AutomationStatus.AutomatableLater && automationState == AutomationStatus.AutomatableNow) { + if (oldState == AutomationStatus.AutomatableLater) + unknowns++; processingQueue.Enqueue(revDep); state[revDep] = UnknownInQueue; } diff --git a/YAFCparser/Data/FactorioDataDeserializer_Context.cs b/YAFCparser/Data/FactorioDataDeserializer_Context.cs index 09b6be65..4cba88f0 100644 --- a/YAFCparser/Data/FactorioDataDeserializer_Context.cs +++ b/YAFCparser/Data/FactorioDataDeserializer_Context.cs @@ -84,8 +84,8 @@ private void RegisterSpecial() reactorProduction.flags |= RecipeFlags.ScaleProductionWithPower; reactorProduction.ingredients = Array.Empty(); - voidEntityEnergy = new EntityEnergy {type = EntityEnergyType.Void}; - laborEntityEnergy = new EntityEnergy {type = EntityEnergyType.Labor}; + voidEntityEnergy = new EntityEnergy {type = EntityEnergyType.Void, effectivity = float.PositiveInfinity}; + laborEntityEnergy = new EntityEnergy {type = EntityEnergyType.Labor, effectivity = float.PositiveInfinity}; } private T GetObject(string name) where T : FactorioObject, new() => GetObject(name); diff --git a/YAFCui/Core/DrawingSurface.cs b/YAFCui/Core/DrawingSurface.cs index 94b0f365..acceade8 100644 --- a/YAFCui/Core/DrawingSurface.cs +++ b/YAFCui/Core/DrawingSurface.cs @@ -1,4 +1,5 @@ using System; +using System.Collections.Generic; using System.Numerics; using SDL2; diff --git a/YAFCui/Core/Window.cs b/YAFCui/Core/Window.cs index 1018a8a8..c85df540 100644 --- a/YAFCui/Core/Window.cs +++ b/YAFCui/Core/Window.cs @@ -74,6 +74,7 @@ internal void WindowMoved() surface.pixelsPerUnit = pixelsPerUnit; repaintRequired = true; rootGui.MarkEverythingForRebuild(); + WindowResize(); } }