Skip to content

Commit 5ec5f6f

Browse files
committed
2.5.5. Mecha Scaling
1 parent 84d3199 commit 5ec5f6f

File tree

7 files changed

+21
-6
lines changed

7 files changed

+21
-6
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.5.4")]
18+
[BepInPlugin("dsp.galactic-scale.2", "Galactic Scale 2 Plug-In", "2.5.5")]
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.5.4</Version>
11+
<Version>2.5.5</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
@@ -1,6 +1,7 @@
11
# DSP Galactic Scale 2.0 Mod
22

33
# BACKUP YOUR SAVES
4+
- Version 2.5.5 - Fix Mecha Scaling when teleporting and add debug scale value for funsies.
45
- Version 2.5.4 - Fix Vanilla Generator Saves
56
- Version 2.5.3 - Added some missing code from recent updates that dpmm99 discovered
67

Scripts/Functionality/Teleport/TeleportComponent.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,24 +31,31 @@ public void FixedUpdate()
3131
private IEnumerator Teleport(PlanetData planet)
3232
{
3333
yield return new WaitForEndOfFrame();
34+
yield return new WaitForSeconds(0.1f);
3435
TargetPlanet = null;
3536
TargetStar = null;
3637
GameMain.mainPlayer.uPosition = planet.uPosition + VectorLF3.unit_z * planet.realRadius;
3738
GameMain.data.mainPlayer.movementState = EMovementState.Sail;
3839
TeleportEnabled = false;
3940
GameMain.mainPlayer.transform.localScale = Vector3.one;
41+
yield return new WaitForSeconds(1);
42+
GameMain.mainPlayer.transform.localScale = Vector3.one * GS2.Config.MechaScale;
43+
4044
}
4145

4246
private IEnumerator Teleport(StarData star)
4347
{
4448
yield return new WaitForEndOfFrame();
49+
yield return new WaitForSeconds(0.1f);
4550
TargetPlanet = null;
4651
TargetStar = null;
4752
GameMain.mainPlayer.uPosition = star.uPosition + VectorLF3.unit_z * 1;
4853
GameMain.data.mainPlayer.movementState = EMovementState.Sail;
4954
TeleportEnabled = false;
5055
GameMain.mainPlayer.transform.localScale = Vector3.one;
5156
GameCamera.instance.FrameLogic();
57+
yield return new WaitForSeconds(1);
58+
GameMain.mainPlayer.transform.localScale = Vector3.one * GS2.Config.MechaScale;
5259
}
5360

5461
public bool NavArrowClick(UIStarmap starmap)

Scripts/Init.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public static partial class GS2
3434
public static VeinAlgorithmLibrary VeinAlgorithmLibrary = VeinAlgorithmLibrary.Init();
3535
public static VegeAlgorithmLibrary VegeAlgorithmLibrary = VegeAlgorithmLibrary.Init();
3636
public static GS2MainSettings Config = new();
37-
37+
3838
public static GalaxyData galaxy;
3939

4040
public static GameDesc gameDesc;

Scripts/SettingsUI/MainSettings.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
using System.Collections.Generic;
22
using System.IO;
33
using GSSerializer;
4+
using UnityEngine;
45
using static GalacticScale.GS2;
56

67
namespace GalacticScale
@@ -31,6 +32,7 @@ public class GS2MainSettings : iConfigurableGenerator
3132
public bool SkipTutorials => Preferences.GetBool("Skip Tutorials");
3233
public bool ScarletRevert => Preferences.GetBool("RevertScarlet");
3334
public bool CheatMode => Preferences.GetBool("Cheat Mode");
35+
public float MechaScale => Preferences.GetFloat("MechaScale", 1f);
3436

3537
// public bool VanillaGrid => Preferences.GetBool("Vanilla Grid");
3638
public bool MinifyJson
@@ -152,6 +154,7 @@ public void Init()
152154
DebugOptions.Add(GSUI.Checkbox("Debug Log".Translate(), false, "Debug Log", null, "Print extra logs to BepInEx console".Translate()));
153155
DebugOptions.Add(GSUI.Checkbox("Force Rare Spawn".Translate(), false, "Force Rare Spawn", null, "Ignore randomness/distance checks".Translate()));
154156
_cheatModeCheckbox = DebugOptions.Add(GSUI.Checkbox("Enable Teleport".Translate(), false, "Cheat Mode", null, "TP by ctrl-click nav arrow in star map".Translate()));
157+
DebugOptions.Add(GSUI.Slider("Mecha Scale".Translate(), 0.1f, 1f, 10f, 0.1f, "MechaScale", ScaleMecha, "How big Icarus should be. 1 = default"));
155158
DebugOptions.Add(GSUI.Slider("Ship Speed Multiplier".Translate(), 1f, 1f, 100f, "Logistics Ship Multi", null, "Multiplier for Warp Speed of Ships".Translate()));
156159
DebugOptions.Add(GSUI.Slider("GalaxySelect Planet ScaleFactor".Translate(), 0.1f, 0.6f, 100f, 0.1f, "VSPlanetScaleFactor", null, "How big planets should be in the new game system view".Translate()));
157160
DebugOptions.Add(GSUI.Slider("GalaxySelect Star ScaleFactor".Translate(), 0.1f, 0.6f, 100f, 0.1f, "VSStarScaleFactor", null, "How big star should be in the new game system view".Translate()));
@@ -199,9 +202,13 @@ public void EnableDevMode()
199202
SavePreferences();
200203
}
201204

205+
public void ScaleMecha(Val o)
206+
{
207+
if (GameMain.mainPlayer != null) GameMain.mainPlayer.transform.localScale = Vector3.one * Preferences.GetFloat("MechaScale", 1f);
208+
}
202209
public void ResetBinaryStars(Val o)
203210
{
204-
var random = new Random(GSSettings.Seed);
211+
var random = new GS2.Random(GSSettings.Seed);
205212
foreach (var star in GSSettings.Stars)
206213
if (star.BinaryCompanion != null)
207214
{

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.5.4"
8-
description = "v2.5.4 BACKUP SAVES!!! Fix Vanilla Generator Saves"
7+
versionNumber = "2.5.5"
8+
description = "v2.5.5 BACKUP SAVES!!! Fix Vanilla Generator Saves"
99
websiteUrl = "https://github.com/innominata/GalacticScale3"
1010
containsNsfwContent = false
1111

0 commit comments

Comments
 (0)