Convert name to string if not custom string

This commit is contained in:
Noah Pilarski 2022-09-03 13:25:29 -04:00
parent 6b7ed87084
commit ef539ad840

View File

@ -14,7 +14,13 @@ namespace NewHorizons.Patches
{
var ao = __instance.GetAstroObject();
if (ao == null || ao._name != AstroObject.Name.CustomString) return true;
if (ao == null) return true;
if (ao._name != AstroObject.Name.CustomString)
{
__result = AstroObject.AstroObjectNameToString(ao._name);
return false;
}
__result = string.Empty;