add IsInShip to PlayerInfo

This commit is contained in:
_nebula 2023-01-21 10:48:54 +00:00
parent 548d12f1b6
commit 34c8369e91
2 changed files with 3 additions and 0 deletions

View File

@ -31,6 +31,7 @@ public partial class PlayerInfo
public bool IsInMoon { get; set; }
public bool IsInShrine { get; set; }
public bool IsInEyeShuttle { get; set; }
public bool IsInShip { get; set; }
public IQSBQuantumObject EntangledObject { get; set; }
public QSBPlayerAudioController AudioController { get; set; }
public bool IsLocalPlayer => TransformSync.isLocalPlayer; // if TransformSync is ever null, i give permission for nebula to make fun of me about it for the rest of time - johncorby

View File

@ -165,12 +165,14 @@ internal class ShipManager : WorldObjectManager
public void AddPlayerToShip(PlayerInfo player)
{
player.IsInShip = true;
_playersInShip.Add(player);
UpdateElectricalComponent();
}
public void RemovePlayerFromShip(PlayerInfo player)
{
player.IsInShip = false;
_playersInShip.Remove(player);
UpdateElectricalComponent();
}