2022-04-01 13:42:20 -07:00
|
|
|
|
using Cysharp.Threading.Tasks;
|
|
|
|
|
using QSB.WorldSync;
|
|
|
|
|
using System;
|
|
|
|
|
using System.Threading;
|
|
|
|
|
using UnityEngine;
|
|
|
|
|
|
|
|
|
|
namespace QSB.ItemSync.WorldObjects;
|
|
|
|
|
|
2022-04-01 14:22:04 -07:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// for other drop targets that don't already have world objects
|
|
|
|
|
/// </summary>
|
2022-04-01 14:08:08 -07:00
|
|
|
|
public class QSBOtherDropTarget : WorldObject<MonoBehaviour>, IQSBDropTarget
|
2022-04-01 13:42:20 -07:00
|
|
|
|
{
|
2022-04-01 14:08:08 -07:00
|
|
|
|
IItemDropTarget IQSBDropTarget.AttachedObject => (IItemDropTarget)AttachedObject;
|
2022-04-01 13:42:20 -07:00
|
|
|
|
|
|
|
|
|
public override async UniTask Init(CancellationToken ct)
|
|
|
|
|
{
|
2022-04-01 14:08:08 -07:00
|
|
|
|
if (AttachedObject is not IItemDropTarget)
|
2022-04-01 13:42:20 -07:00
|
|
|
|
{
|
2022-08-02 16:45:47 -07:00
|
|
|
|
throw new ArgumentException("QSBOtherDropTarget.AttachedObject is not an IItemDropTarget!");
|
2022-04-01 13:42:20 -07:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|