r2mods/ilspy_dump/ror2_csproj/GenericInspectInfoProvider.cs

33 lines
670 B
C#
Raw Normal View History

2024-10-04 07:26:37 +00:00
using RoR2;
using RoR2.UI;
using UnityEngine;
public class GenericInspectInfoProvider : MonoBehaviour, IInspectInfoProvider, IHasInspectHintOverride
{
public InspectDef InspectInfo;
[Tooltip("Set this to a non-empty token to override the default Inspect hint on the HUD.")]
public string inspectHintOverrideToken;
public bool CanBeInspected()
{
return true;
}
public InspectInfo GetInfo()
{
return InspectInfo;
}
public bool GetInspectHintOverride(out string hintOverride)
{
if (inspectHintOverrideToken.Length > 0)
{
hintOverride = Language.GetString(inspectHintOverrideToken);
return true;
}
hintOverride = null;
return false;
}
}