mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-27 03:35:20 +00:00
fix #544
This commit is contained in:
parent
04c113f148
commit
e8d49ca102
@ -35,7 +35,17 @@ internal class QSBLightSensor : WorldObject<SingleLightSensor>
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public override async UniTask Init(CancellationToken ct) => QSBPlayerManager.OnRemovePlayer += OnPlayerLeave;
|
public override async UniTask Init(CancellationToken ct)
|
||||||
|
{
|
||||||
|
QSBPlayerManager.OnRemovePlayer += OnPlayerLeave;
|
||||||
|
_locallyIlluminated = AttachedObject._startIlluminated;
|
||||||
|
|
||||||
|
if (_locallyIlluminated)
|
||||||
|
{
|
||||||
|
_illuminatedBy.Add(QSBPlayerManager.LocalPlayerId);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public override void OnRemoval() => QSBPlayerManager.OnRemovePlayer -= OnPlayerLeave;
|
public override void OnRemoval() => QSBPlayerManager.OnRemovePlayer -= OnPlayerLeave;
|
||||||
private void OnPlayerLeave(PlayerInfo player) => SetIlluminated(player.PlayerId, false);
|
private void OnPlayerLeave(PlayerInfo player) => SetIlluminated(player.PlayerId, false);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user