Expose native Unity current document access
This commit is contained in:
parent
cf5897a98c
commit
988b72d2ba
5 changed files with 53 additions and 31 deletions
|
|
@ -98,7 +98,6 @@ public abstract class ActionBarBinding
|
|||
try
|
||||
{
|
||||
return AetheriaUnityRuntimeClientProvider
|
||||
.RuntimeState()
|
||||
.CurrentCatalog()
|
||||
.FindItem(item, x => x.ItemKey);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -92,6 +92,40 @@ public static class AetheriaUnityRuntimeClientProvider
|
|||
return RuntimeState(stateBoot, runtimeId).CurrentDockingState();
|
||||
}
|
||||
|
||||
public static AetheriaRuntimeCatalogSnapshot CurrentCatalog(string runtimeId = "")
|
||||
{
|
||||
return RuntimeState(runtimeId).CurrentCatalog();
|
||||
}
|
||||
|
||||
public static AetheriaRuntimeCatalogSnapshot CurrentCatalog(
|
||||
AetheriaRuntimeStateBootReport stateBoot,
|
||||
string runtimeId = "")
|
||||
{
|
||||
return RuntimeState(stateBoot, runtimeId).CurrentCatalog();
|
||||
}
|
||||
|
||||
public static AetheriaRuntimePlayerSettingsDocument CurrentPlayerSettings(string runtimeId = "")
|
||||
{
|
||||
return RuntimeState(runtimeId).CurrentPlayerSettings();
|
||||
}
|
||||
|
||||
public static AetheriaRuntimePlayerSettingsDocument CurrentPlayerSettings(
|
||||
AetheriaRuntimeStateBootReport stateBoot,
|
||||
string runtimeId = "")
|
||||
{
|
||||
return RuntimeState(stateBoot, runtimeId).CurrentPlayerSettings();
|
||||
}
|
||||
|
||||
public static AetheriaRuntimeCurrentEntityDocument CurrentEntityState(string runtimeId = "")
|
||||
{
|
||||
return RuntimeState(runtimeId).CurrentEntityState();
|
||||
}
|
||||
|
||||
public static AetheriaRuntimeStationRefitDocument CurrentStationRefit(string runtimeId = "")
|
||||
{
|
||||
return RuntimeState(runtimeId).CurrentStationRefit();
|
||||
}
|
||||
|
||||
public static AetheriaControl Control(string runtimeId = "")
|
||||
{
|
||||
return RuntimeClient(runtimeId).Control;
|
||||
|
|
|
|||
|
|
@ -318,9 +318,7 @@ public class SchematicDisplay : MonoBehaviour
|
|||
{
|
||||
try
|
||||
{
|
||||
return AetheriaUnityRuntimeClientProvider
|
||||
.RuntimeState("unity-schematic-display")
|
||||
.CurrentCatalog();
|
||||
return AetheriaUnityRuntimeClientProvider.CurrentCatalog("unity-schematic-display");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
@ -334,9 +332,7 @@ public class SchematicDisplay : MonoBehaviour
|
|||
{
|
||||
try
|
||||
{
|
||||
return AetheriaUnityRuntimeClientProvider
|
||||
.RuntimeState("unity-schematic-display")
|
||||
.CurrentPlayerSettings();
|
||||
return AetheriaUnityRuntimeClientProvider.CurrentPlayerSettings("unity-schematic-display");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
@ -351,8 +347,7 @@ public class SchematicDisplay : MonoBehaviour
|
|||
try
|
||||
{
|
||||
return AetheriaUnityRuntimeClientProvider
|
||||
.RuntimeState("unity-schematic-display")
|
||||
.CurrentEntityState()
|
||||
.CurrentEntityState("unity-schematic-display")
|
||||
?.Hud ?? new AetheriaRuntimeCurrentEntityHudStatus();
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
|
|
|||
|
|
@ -504,9 +504,7 @@ public class TradeMenu : MonoBehaviour
|
|||
{
|
||||
try
|
||||
{
|
||||
return AetheriaUnityRuntimeClientProvider
|
||||
.RuntimeState("unity-trade")
|
||||
.CurrentStationRefit();
|
||||
return AetheriaUnityRuntimeClientProvider.CurrentStationRefit("unity-trade");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
@ -579,9 +577,7 @@ public class TradeMenu : MonoBehaviour
|
|||
{
|
||||
try
|
||||
{
|
||||
return AetheriaUnityRuntimeClientProvider
|
||||
.RuntimeState("unity-trade")
|
||||
.CurrentCatalog();
|
||||
return AetheriaUnityRuntimeClientProvider.CurrentCatalog("unity-trade");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
@ -594,9 +590,7 @@ public class TradeMenu : MonoBehaviour
|
|||
{
|
||||
try
|
||||
{
|
||||
return AetheriaUnityRuntimeClientProvider
|
||||
.RuntimeState("unity-trade")
|
||||
.CurrentPlayerSettings();
|
||||
return AetheriaUnityRuntimeClientProvider.CurrentPlayerSettings("unity-trade");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue