Skip to content

Commit 5293f29

Browse files
committed
2.16.2
1 parent 04e6fb9 commit 5293f29

File tree

5 files changed

+20
-13
lines changed

5 files changed

+20
-13
lines changed

Bootstrap.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public partial class GS2
1515
}
1616

1717

18-
[BepInPlugin("dsp.galactic-scale.2", "Galactic Scale 2 Plug-In", "2.16.1")]
18+
[BepInPlugin("dsp.galactic-scale.2", "Galactic Scale 2 Plug-In", "2.16.2")]
1919
[BepInDependency("space.customizing.console", BepInDependency.DependencyFlags.SoftDependency)]
2020
[BepInDependency("dsp.nebula-multiplayer-api", BepInDependency.DependencyFlags.SoftDependency)]
2121
public class Bootstrap : BaseUnityPlugin

GalacticScale3.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<PropertyGroup>
99
<AssemblyName>GalacticScale</AssemblyName>
1010
<Description>Galaxy Customization for Dyson Sphere Program</Description>
11-
<Version>2.16.1</Version>
11+
<Version>2.16.2</Version>
1212
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
1313
<LangVersion>9.0</LangVersion>
1414
<OutDir>bin/$(Configuration)</OutDir>

Package/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
# BACKUP YOUR SAVES. SERIOUSLY.
44

5+
- Version 2.16.2 - Fixed error on new game
56
- Version 2.16.1 - Potential Fix for Bug on New Game
67
- Version 2.16.0 - Tentative update game version 0.10.31.24646
78
- Version 2.15.4 - Default star size to 1x to try and prevent some pathing errors on df ships

Scripts/Patches/Transpilers/SectorModel/CreateGalaxyAstroBuffer.cs

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,9 @@ public static IEnumerable<CodeInstruction> TranspilerSectorModelCreateGalaxyAstr
1717
// Replace 25600 with the result of the CalcAstroBufferSize method
1818
.MatchForward(
1919
true,
20-
new CodeMatch(i =>
21-
{
22-
return i.opcode == Ldc_I4 && Convert.ToInt32(i.operand ?? 0) == 25600;
23-
}
24-
))
25-
.Repeat(matcher =>
26-
{
27-
matcher.SetInstructionAndAdvance(new CodeInstruction(Call, calcMethod));
28-
}).InstructionEnumeration();
20+
new CodeMatch(i => { return i.opcode == Ldc_I4 && Convert.ToInt32(i.operand ?? 0) == 25600; }
21+
))
22+
.Repeat(matcher => { matcher.SetInstructionAndAdvance(new CodeInstruction(Call, calcMethod)); }).InstructionEnumeration();
2923

3024
return instructions;
3125
}
@@ -34,5 +28,17 @@ public static int CalcAstroBufferSize()
3428
{
3529
return GameMain.spaceSector.galaxy.starCount * 400;
3630
}
31+
32+
33+
[HarmonyPrefix, HarmonyPatch(typeof(SectorModel), nameof(SectorModel.OnCameraPostRender))]
34+
public static bool PatchOnCameraPostRender(ref SectorModel __instance, Camera cam)
35+
{
36+
if (GameMain.mainPlayer == null)
37+
{
38+
return false;
39+
}
40+
41+
return true;
42+
}
3743
}
3844
}

thunderstore.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ schemaVersion = "0.0.1"
44
[package]
55
namespace = "Galactic_Scale"
66
name = "GalacticScale"
7-
versionNumber = "2.16.1"
8-
description = "v2.16.1 Galaxy Customization. New Planets. Different Sized Planets. Up to 100 Planets/star and 1024 Stars. DF is more or less balanced. See GS Discord Server"
7+
versionNumber = "2.16.2"
8+
description = "v2.16.2 Galaxy Customization. New Planets. Different Sized Planets. Up to 100 Planets/star and 1024 Stars. DF is more or less balanced. See GS Discord Server"
99
websiteUrl = "https://github.com/Touhma/DSP_Plugins"
1010
containsNsfwContent = false
1111

0 commit comments

Comments
 (0)