Added new Rocket-Processing
This commit is contained in:
@@ -1,5 +1,31 @@
|
||||
using UnityEngine;
|
||||
|
||||
public interface IWorkstationItemControl
|
||||
{
|
||||
bool TryAcquireExternalControl();
|
||||
bool TryReleaseExternalControl();
|
||||
bool TryReleaseExternalControlToPlayer(ulong clientId);
|
||||
}
|
||||
|
||||
public static class WorkstationItemControlUtility
|
||||
{
|
||||
public static bool TryGetControl(
|
||||
NetworkItem item,
|
||||
out IWorkstationItemControl itemControl)
|
||||
{
|
||||
if (item != null)
|
||||
{
|
||||
foreach (MonoBehaviour component in item.GetComponents<MonoBehaviour>())
|
||||
{
|
||||
if (component is IWorkstationItemControl candidate)
|
||||
{
|
||||
itemControl = candidate;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
itemControl = null;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,11 +16,13 @@ public sealed class ItemDefinition : ScriptableObject
|
||||
[SerializeField] private string itemId;
|
||||
[SerializeField] private string displayName;
|
||||
[SerializeField] private ItemCategory category;
|
||||
[SerializeField] private bool isAssemblyReady;
|
||||
[SerializeField] private NetworkObject worldPrefab;
|
||||
|
||||
public string ItemId => itemId;
|
||||
public string DisplayName => string.IsNullOrWhiteSpace(displayName) ? name : displayName;
|
||||
public ItemCategory Category => category;
|
||||
public bool IsAssemblyReady => isAssemblyReady;
|
||||
public NetworkObject WorldPrefab => worldPrefab;
|
||||
|
||||
private void OnValidate()
|
||||
|
||||
Reference in New Issue
Block a user