mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
null check ig
idk why a required mod wouldn't be downloaded
This commit is contained in:
parent
2e90c30287
commit
235f62ffc7
@ -1,4 +1,5 @@
|
||||
using NewHorizons.OtherMods.MenuFramework;
|
||||
using Logger = NewHorizons.Utility.Logger;
|
||||
|
||||
namespace NewHorizons.OtherMods.CommonCameraUtility
|
||||
{
|
||||
@ -11,6 +12,16 @@ namespace NewHorizons.OtherMods.CommonCameraUtility
|
||||
_cameraAPI = Main.Instance.ModHelper.Interaction.TryGetModApi<ICommonCameraAPI>("xen.CommonCameraUtility");
|
||||
}
|
||||
|
||||
public static void RegisterCustomCamera(OWCamera camera) => _cameraAPI.RegisterCustomCamera(camera);
|
||||
public static void RegisterCustomCamera(OWCamera camera)
|
||||
{
|
||||
if (_cameraAPI != null)
|
||||
{
|
||||
_cameraAPI.RegisterCustomCamera(camera);
|
||||
}
|
||||
else
|
||||
{
|
||||
Logger.LogError("Tried to register custom camera but Common Camera Utility was missing.");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user