Skip to content

Commit

Permalink
fix for DSP 0.10.28.20829
Browse files Browse the repository at this point in the history
  • Loading branch information
lostkevin committed Dec 17, 2023
1 parent ff31499 commit a83287f
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
Binary file not shown.
Binary file modified .vs/DspMods/v17/.suo
Binary file not shown.
3 changes: 2 additions & 1 deletion Common/ModText.cs
Expand Up @@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;

public static class ModTranslate
{
Expand All @@ -28,7 +29,7 @@ public static class ModTranslate

public static string LocalText(this string text)
{
if (Localization.language == Language.zhCN)
if (Localization.isZHCN)
{
return text;
}
Expand Down
2 changes: 1 addition & 1 deletion StellarAutoNavigation/AutoStellarNavigation.cs
Expand Up @@ -794,7 +794,7 @@ public static bool TryLeaveWarp(PlayerMove_Sail __instance)
public static class Sail
{
public static void SetDir(PlayerMove_Sail __instance, VectorLF3 dir) =>
__instance.sailPoser.targetURot = Quaternion.LookRotation(dir);
__instance.controller.fwdRayUDir = dir;

public static void TrySpeedUp(AutoStellarNavigation __this, PlayerMove_Sail __instance)
{
Expand Down
8 changes: 4 additions & 4 deletions StellarAutoNavigation/Main.cs
Expand Up @@ -9,7 +9,7 @@

namespace AutoNavigate
{
[BepInPlugin(__GUID__, __NAME__, "1.06")]
[BepInPlugin(__GUID__, __NAME__, "1.07")]
public class AutoNavigate : BaseUnityPlugin
{
public const string __NAME__ = "StellarAutoNavigation";
Expand Down Expand Up @@ -177,7 +177,7 @@ private static void Postfix(ref bool __result)
[HarmonyPatch(typeof(PlayerMove_Sail), "GameTick")]
private class SailMode_AutoNavigate
{
private static Quaternion oTargetURot;
private static VectorLF3 ofwdRayUDir;

private static void Prefix(PlayerMove_Sail __instance)
{
Expand All @@ -188,7 +188,7 @@ private static void Prefix(PlayerMove_Sail __instance)
return;

++__instance.controller.input0.y;
oTargetURot = __instance.sailPoser.targetURot;
ofwdRayUDir = __instance.controller.fwdRayUDir;

if (s_NavigateInstance.IsCurNavStar)
s_NavigateInstance.StarNavigation(__instance);
Expand All @@ -207,9 +207,9 @@ private static void Postfix(PlayerMove_Sail __instance)
if (GameMain.localPlanet != null ||
s_NavigateInstance.target.IsVaild())
{
__instance.sailPoser.targetURot = oTargetURot;
s_NavigateInstance.HandlePlayerInput();
}
__instance.controller.fwdRayUDir = ofwdRayUDir;
}
}

Expand Down

0 comments on commit a83287f

Please sign in to comment.