quantum-space-buddies/QSB/EyeOfTheUniverse/InstrumentSync/WorldObjects/QSBQuantumInstrument.cs

32 lines
833 B
C#
Raw Normal View History

2022-01-15 16:22:46 +00:00
using QSB.EyeOfTheUniverse.MaskSync;
using QSB.WorldSync;
using System.Linq;
2022-03-03 03:46:33 +00:00
namespace QSB.EyeOfTheUniverse.InstrumentSync.WorldObjects;
internal class QSBQuantumInstrument : WorldObject<QuantumInstrument>
{
2022-03-03 03:46:33 +00:00
public override void SendInitialState(uint to)
{
2022-03-03 03:46:33 +00:00
// not needed since mid-game join is impossible here
}
2022-01-15 16:22:46 +00:00
2022-03-03 03:46:33 +00:00
public void Gather()
{
var maskZoneController = QSBWorldSync.GetUnityObjects<MaskZoneController>().First();
if (maskZoneController._maskInstrument == AttachedObject)
{
2022-03-03 03:46:33 +00:00
var shuttleController = QSBWorldSync.GetUnityObjects<EyeShuttleController>().First();
2022-03-03 03:46:33 +00:00
foreach (var player in MaskManager.WentOnSolanumsWildRide)
{
player.SetVisible(true, 2);
}
2022-01-15 16:22:46 +00:00
2022-03-03 03:46:33 +00:00
maskZoneController._whiteSphere.SetActive(false);
shuttleController._maskObject.SetActive(true);
}
2022-03-03 03:46:33 +00:00
AttachedObject.Gather();
}
}