Skip to content

Commit

Permalink
Merge pull request #61 from post-kerbin-mining-corporation/dev
Browse files Browse the repository at this point in the history
Fixes to loading
  • Loading branch information
ChrisAdderley authored Nov 20, 2024
2 parents 701d07c + 3d0bfa2 commit 029daab
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 6 deletions.
Binary file modified GameData/SpaceDust/Plugins/SpaceDust.dll
Binary file not shown.
4 changes: 3 additions & 1 deletion GameData/SpaceDust/SpaceDustSettings.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ SPACEDUSTSETTINGS
DebugOverlay = false
// Emit module debug messages
DebugModules = false

DebugBackground = false
DebugPersistence = false
DebugLoading = false

// UI Stuff
// ----------------------
Expand Down
2 changes: 1 addition & 1 deletion GameData/SpaceDust/Versioning/SpaceDust.version
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
{
"MAJOR":0,
"MINOR":5,
"PATCH":4,
"PATCH":5,
"BUILD":0
},
"KSP_VERSION":
Expand Down
9 changes: 7 additions & 2 deletions Source/SpaceDust/ResourceMap.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,10 @@ public List<string> GetBodyResources(CelestialBody body)
{
for (int i = 0; i < Resources[body.name].Count; i++)
{
getResources.Add(Resources[body.name][i].ResourceName);
if (!getResources.Contains(Resources[body.name][i].ResourceName))
{
getResources.Add(Resources[body.name][i].ResourceName);
}
}
}
}
Expand All @@ -107,7 +110,9 @@ public List<ResourceBand> GetBodyDistributions(CelestialBody body, string resour
for (int i = 0; i < Resources[body.name].Count; i++)
{
if (Resources[body.name][i].ResourceName == resourceName)
dist = Resources[body.name][i].Bands;
{
dist.AddRange(Resources[body.name][i].Bands);
}

}
}
Expand Down
5 changes: 4 additions & 1 deletion Source/SpaceDust/UI/ToolbarUI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ protected virtual void Awake()
{
GameEvents.onGUIApplicationLauncherReady.Add(OnGUIAppLauncherReady);
GameEvents.onGUIApplicationLauncherDestroyed.Add(OnGUIAppLauncherDestroyed);
GameEvents.onGUIApplicationLauncherUnreadifying.Add(new EventData<GameScenes>.OnEvent(OnGUIAppLauncherUnreadifying));

GameEvents.OnMapEntered.Add(new EventVoid.OnEvent(OnMapEntered));
GameEvents.OnMapExited.Add(new EventVoid.OnEvent(OnMapExited));
GameEvents.OnMapFocusChange.Add(new EventData<MapObject>.OnEvent(OnMapFocusChange));
GameEvents.onGUIApplicationLauncherUnreadifying.Add(new EventData<GameScenes>.OnEvent(OnGUIAppLauncherUnreadifying));
}
resourceVisibilities = new Dictionary<string, bool>();
Instance = this;
Expand Down Expand Up @@ -224,10 +224,13 @@ public void OnDestroy()
{
ApplicationLauncher.Instance.RemoveModApplication(stockToolbarButton);
}
GameEvents.onGUIApplicationLauncherDestroyed.Remove(OnGUIAppLauncherDestroyed);
GameEvents.onGUIApplicationLauncherUnreadifying.Remove(OnGUIAppLauncherUnreadifying);

GameEvents.OnMapEntered.Remove(OnMapEntered);
GameEvents.OnMapFocusChange.Remove(OnMapFocusChange);
GameEvents.OnMapExited.Remove(OnMapExited);

}

protected void OnGUIAppLauncherReady()
Expand Down
5 changes: 5 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
v0.5.5
------
- Fixed an issue where multiple SPACEDUST_RESOURCE entries with the same body and resource overwrote previous entries rather than concatenating them
- Added the missing debug switches to the config file

v0.5.4
------
- Rebalanced Antimatter distributions
Expand Down
2 changes: 1 addition & 1 deletion readme.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
================
SPACE DUST 0.5.4
SPACE DUST 0.5.5
================

This is a KSP mod designed to overhaul the atmospheric and exospheric mining experience in KSP. It functions both as a framework, providing part modules and distributions to others, and an actual gameplay mod designed to provide a set of parts focused around atmospheric ISRU in the stock system.
Expand Down

0 comments on commit 029daab

Please sign in to comment.