mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
29 lines
783 B
C#
29 lines
783 B
C#
using OWML.Common;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace NewHorizons.Utility
|
|
{
|
|
public class Patches
|
|
{
|
|
public static void Apply()
|
|
{
|
|
Main.Instance.ModHelper.HarmonyHelper.AddPrefix<ReferenceFrame>("GetHUDDisplayName", typeof(Patches), nameof(Patches.GetHUDDisplayName));
|
|
}
|
|
|
|
public static bool GetHUDDisplayName(ReferenceFrame __instance, ref string __result)
|
|
{
|
|
var ao = __instance.GetAstroObject();
|
|
if (ao.GetAstroObjectName() == AstroObject.Name.CustomString)
|
|
{
|
|
__result = ao.GetCustomName();
|
|
return false;
|
|
}
|
|
return true;
|
|
}
|
|
}
|
|
}
|