Skip to content

Commit

Permalink
2.4.9
Browse files Browse the repository at this point in the history
  • Loading branch information
innominata committed Mar 10, 2022
1 parent 3adc37f commit 9ad8361
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Bootstrap.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public partial class GS2
}


[BepInPlugin("dsp.galactic-scale.2", "Galactic Scale 2 Plug-In", "2.4.8")]
[BepInPlugin("dsp.galactic-scale.2", "Galactic Scale 2 Plug-In", "2.4.9")]
[BepInDependency("space.customizing.console", BepInDependency.DependencyFlags.SoftDependency)]
[BepInDependency("dsp.nebula-multiplayer-api", BepInDependency.DependencyFlags.SoftDependency)]
public class Bootstrap : BaseUnityPlugin
Expand Down
2 changes: 1 addition & 1 deletion GalacticScale3.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<PropertyGroup>
<AssemblyName>GalacticScale</AssemblyName>
<Description>Galaxy Customization for Dyson Sphere Program</Description>
<Version>2.4.8</Version>
<Version>2.4.9</Version>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<LangVersion>9.0</LangVersion>
<OutDir>bin/$(Configuration)</OutDir>
Expand Down
2 changes: 2 additions & 0 deletions Package/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# DSP Galactic Scale 2.0 Mod
- Version 2.4.9 - Fixed blueprints using extra space

- 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.

- 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.
Expand Down
21 changes: 17 additions & 4 deletions Scripts/Patches/BlueprintUtils/GetExtendedGratBox.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public partial class PatchOnBlueprintUtils
[HarmonyPatch(typeof(BlueprintUtils), "GetExtendedGratBox", typeof(BPGratBox), typeof(float))]
public static bool GetExtendedGratBoxA(ref BPGratBox __result, BPGratBox gratbox, float extend_grid = 0.5f)
{
var segments = GameMain.localPlanet.segment;
var segments = 4* Mathf.RoundToInt (GameMain.localPlanet.realRadius/4f);
float longitudeRadPerGrid;
if (gratbox.y * gratbox.w > 0f && gratbox.y > 0f)
{
Expand All @@ -23,7 +23,15 @@ public static bool GetExtendedGratBoxA(ref BPGratBox __result, BPGratBox gratbox
{
longitudeRadPerGrid = BlueprintUtils.GetLongitudeRadPerGrid(0f, segments);
}
gratbox.Extend(longitudeRadPerGrid * extend_grid, BlueprintUtils.GetLatitudeRadPerGrid(200) * extend_grid);
GS2.Warn($"Gratbox Start : {gratbox.y} {gratbox.w} {gratbox.endLatitudeRad} {gratbox.endLongitudeRad} {gratbox.startLatitudeRad} {gratbox.startLongitudeRad}");
GS2.Warn($"Extending Gratbox {segments} {extend_grid} {BlueprintUtils.GetLatitudeRadPerGrid(segments) * extend_grid} {longitudeRadPerGrid}");
gratbox.Extend(longitudeRadPerGrid * extend_grid, BlueprintUtils.GetLatitudeRadPerGrid(segments) * extend_grid);
GS2.Warn($"Gratbox End: {gratbox.y} {gratbox.w} {gratbox.endLatitudeRad} {gratbox.endLongitudeRad} {gratbox.startLatitudeRad} {gratbox.startLongitudeRad}");
// [Warning: GS2] 26:PatchOnBlueprintUtils | GetExtendedGratBoxA | Gratbox Start: -0.2777829 - 0.2777829 - 0.2777829 - 0.5456451 - 0.2777829 - 0.5456451
// [Warning: GS2] 27:PatchOnBlueprintUtils | GetExtendedGratBoxA | Extending Gratbox 380 0.5 0.00165347 0.00330694
//[Warning: GS2] 29:PatchOnBlueprintUtils | GetExtendedGratBoxA | Gratbox End: -0.2794364 - 0.2761295 - 0.2761295 - 0.5439916 - 0.2794364 - 0.5472986


__result = gratbox;
return false;
}
Expand All @@ -32,7 +40,8 @@ public static bool GetExtendedGratBoxA(ref BPGratBox __result, BPGratBox gratbox
[HarmonyPatch(typeof(BlueprintUtils), "GetExtendedGratBox", typeof(BPGratBox), typeof(float), typeof(float))]
public static bool GetExtendedGratBoxB(ref BPGratBox __result, BPGratBox gratbox, float extend_lng_grid = 0.5f, float extend_lat_grid = 0.5f)
{
var segments = GameMain.localPlanet.segment;
//var segments = GameMain.localPlanet.segment;
var segments = 4 * Mathf.RoundToInt(GameMain.localPlanet.realRadius / 4f);
float longitudeRadPerGrid;
if (gratbox.y * gratbox.w > 0f && gratbox.y > 0f)
{
Expand All @@ -46,7 +55,11 @@ public static bool GetExtendedGratBoxB(ref BPGratBox __result, BPGratBox gratbox
{
longitudeRadPerGrid = BlueprintUtils.GetLongitudeRadPerGrid(0f, segments);
}
gratbox.Extend(longitudeRadPerGrid * extend_lng_grid, BlueprintUtils.GetLatitudeRadPerGrid(200) * extend_lat_grid);
GS2.Warn($"BGratbox Start : {gratbox.y} {gratbox.w} {gratbox.endLatitudeRad} {gratbox.endLongitudeRad} {gratbox.startLatitudeRad} {gratbox.startLongitudeRad}");
GS2.Warn($"BExtending Gratbox {segments} {extend_lat_grid} {BlueprintUtils.GetLatitudeRadPerGrid(segments) * extend_lat_grid} {longitudeRadPerGrid}");
gratbox.Extend(longitudeRadPerGrid * extend_lng_grid, BlueprintUtils.GetLatitudeRadPerGrid(segments) * extend_lat_grid);
GS2.Warn($"BGratbox End: {gratbox.y} {gratbox.w} {gratbox.endLatitudeRad} {gratbox.endLongitudeRad} {gratbox.startLatitudeRad} {gratbox.startLongitudeRad}");

__result = gratbox;
return false;
}
Expand Down
Binary file added tcli.exe
Binary file not shown.
4 changes: 2 additions & 2 deletions thunderstore.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ schemaVersion = "0.0.1"
[package]
namespace = "Galactic_Scale"
name = "GalacticScale"
versionNumber = "2.4.8"
description = "v2.4.8. Bugfixes see readme"
versionNumber = "2.4.9"
description = "v2.4.9. Blueprint extra space bugfix"
websiteUrl = "https://github.com/innominata/GalacticScale3"
containsNsfwContent = false

Expand Down

0 comments on commit 9ad8361

Please sign in to comment.