mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-29 18:32:45 +00:00
28 lines
630 B
C#
28 lines
630 B
C#
using QSB.Events;
|
|
using QSB.Utility;
|
|
using QSB.WorldSync;
|
|
|
|
namespace QSB.OrbSync.WorldObjects
|
|
{
|
|
public class QSBOrbSlot : WorldObject<NomaiInterfaceSlot>
|
|
{
|
|
public void HandleEvent(bool state, int orbId)
|
|
{
|
|
if (!WorldObjectManager.AllObjectsReady)
|
|
{
|
|
return;
|
|
}
|
|
|
|
QSBEventManager.FireEvent(EventNames.QSBOrbSlot, ObjectId, orbId, state);
|
|
}
|
|
|
|
public void SetState(bool state, int orbId)
|
|
{
|
|
var occOrb = state ? OrbManager.Orbs[orbId] : null;
|
|
AttachedObject._occupyingOrb = occOrb;
|
|
var ev = state ? "OnSlotActivated" : "OnSlotDeactivated";
|
|
AttachedObject.RaiseEvent(ev, AttachedObject);
|
|
}
|
|
}
|
|
}
|