Skip to content

Commit 9ad8361

Browse files
committed
2.4.9
1 parent 3adc37f commit 9ad8361

File tree

6 files changed

+23
-8
lines changed

6 files changed

+23
-8
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.4.8")]
18+
[BepInPlugin("dsp.galactic-scale.2", "Galactic Scale 2 Plug-In", "2.4.9")]
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.4.8</Version>
11+
<Version>2.4.9</Version>
1212
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
1313
<LangVersion>9.0</LangVersion>
1414
<OutDir>bin/$(Configuration)</OutDir>

Package/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
# DSP Galactic Scale 2.0 Mod
2+
- Version 2.4.9 - Fixed blueprints using extra space
3+
24
- Version 2.4.8 - Fixed Lava & Hurricane Themes missing rocks. Added hint text to galaxy select. Clamped solar power to 1-500%. Fixed GS2 Star Overrides not loading correctly. Fixed bug where planetdetail wouldnt close on game start.
35

46
- Version 2.4.7 - Fixed Error when saving games with short names. Added configurable mouse tolerance for systemdisplay. Fixed Planet name text flickering in center of screen when clicked.

Scripts/Patches/BlueprintUtils/GetExtendedGratBox.cs

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ public partial class PatchOnBlueprintUtils
99
[HarmonyPatch(typeof(BlueprintUtils), "GetExtendedGratBox", typeof(BPGratBox), typeof(float))]
1010
public static bool GetExtendedGratBoxA(ref BPGratBox __result, BPGratBox gratbox, float extend_grid = 0.5f)
1111
{
12-
var segments = GameMain.localPlanet.segment;
12+
var segments = 4* Mathf.RoundToInt (GameMain.localPlanet.realRadius/4f);
1313
float longitudeRadPerGrid;
1414
if (gratbox.y * gratbox.w > 0f && gratbox.y > 0f)
1515
{
@@ -23,7 +23,15 @@ public static bool GetExtendedGratBoxA(ref BPGratBox __result, BPGratBox gratbox
2323
{
2424
longitudeRadPerGrid = BlueprintUtils.GetLongitudeRadPerGrid(0f, segments);
2525
}
26-
gratbox.Extend(longitudeRadPerGrid * extend_grid, BlueprintUtils.GetLatitudeRadPerGrid(200) * extend_grid);
26+
GS2.Warn($"Gratbox Start : {gratbox.y} {gratbox.w} {gratbox.endLatitudeRad} {gratbox.endLongitudeRad} {gratbox.startLatitudeRad} {gratbox.startLongitudeRad}");
27+
GS2.Warn($"Extending Gratbox {segments} {extend_grid} {BlueprintUtils.GetLatitudeRadPerGrid(segments) * extend_grid} {longitudeRadPerGrid}");
28+
gratbox.Extend(longitudeRadPerGrid * extend_grid, BlueprintUtils.GetLatitudeRadPerGrid(segments) * extend_grid);
29+
GS2.Warn($"Gratbox End: {gratbox.y} {gratbox.w} {gratbox.endLatitudeRad} {gratbox.endLongitudeRad} {gratbox.startLatitudeRad} {gratbox.startLongitudeRad}");
30+
// [Warning: GS2] 26:PatchOnBlueprintUtils | GetExtendedGratBoxA | Gratbox Start: -0.2777829 - 0.2777829 - 0.2777829 - 0.5456451 - 0.2777829 - 0.5456451
31+
// [Warning: GS2] 27:PatchOnBlueprintUtils | GetExtendedGratBoxA | Extending Gratbox 380 0.5 0.00165347 0.00330694
32+
//[Warning: GS2] 29:PatchOnBlueprintUtils | GetExtendedGratBoxA | Gratbox End: -0.2794364 - 0.2761295 - 0.2761295 - 0.5439916 - 0.2794364 - 0.5472986
33+
34+
2735
__result = gratbox;
2836
return false;
2937
}
@@ -32,7 +40,8 @@ public static bool GetExtendedGratBoxA(ref BPGratBox __result, BPGratBox gratbox
3240
[HarmonyPatch(typeof(BlueprintUtils), "GetExtendedGratBox", typeof(BPGratBox), typeof(float), typeof(float))]
3341
public static bool GetExtendedGratBoxB(ref BPGratBox __result, BPGratBox gratbox, float extend_lng_grid = 0.5f, float extend_lat_grid = 0.5f)
3442
{
35-
var segments = GameMain.localPlanet.segment;
43+
//var segments = GameMain.localPlanet.segment;
44+
var segments = 4 * Mathf.RoundToInt(GameMain.localPlanet.realRadius / 4f);
3645
float longitudeRadPerGrid;
3746
if (gratbox.y * gratbox.w > 0f && gratbox.y > 0f)
3847
{
@@ -46,7 +55,11 @@ public static bool GetExtendedGratBoxB(ref BPGratBox __result, BPGratBox gratbox
4655
{
4756
longitudeRadPerGrid = BlueprintUtils.GetLongitudeRadPerGrid(0f, segments);
4857
}
49-
gratbox.Extend(longitudeRadPerGrid * extend_lng_grid, BlueprintUtils.GetLatitudeRadPerGrid(200) * extend_lat_grid);
58+
GS2.Warn($"BGratbox Start : {gratbox.y} {gratbox.w} {gratbox.endLatitudeRad} {gratbox.endLongitudeRad} {gratbox.startLatitudeRad} {gratbox.startLongitudeRad}");
59+
GS2.Warn($"BExtending Gratbox {segments} {extend_lat_grid} {BlueprintUtils.GetLatitudeRadPerGrid(segments) * extend_lat_grid} {longitudeRadPerGrid}");
60+
gratbox.Extend(longitudeRadPerGrid * extend_lng_grid, BlueprintUtils.GetLatitudeRadPerGrid(segments) * extend_lat_grid);
61+
GS2.Warn($"BGratbox End: {gratbox.y} {gratbox.w} {gratbox.endLatitudeRad} {gratbox.endLongitudeRad} {gratbox.startLatitudeRad} {gratbox.startLongitudeRad}");
62+
5063
__result = gratbox;
5164
return false;
5265
}

tcli.exe

25.4 MB
Binary file not shown.

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.4.8"
8-
description = "v2.4.8. Bugfixes see readme"
7+
versionNumber = "2.4.9"
8+
description = "v2.4.9. Blueprint extra space bugfix"
99
websiteUrl = "https://github.com/innominata/GalacticScale3"
1010
containsNsfwContent = false
1111

0 commit comments

Comments
 (0)