Fix misprediction of emergency access (#25973)
The EmergencyAccess bool on the AirlockComponent would not get synced to the client
This commit is contained in:
@@ -21,7 +21,7 @@ public sealed partial class AirlockComponent : Component
|
|||||||
public bool Safety = true;
|
public bool Safety = true;
|
||||||
|
|
||||||
[ViewVariables(VVAccess.ReadWrite)]
|
[ViewVariables(VVAccess.ReadWrite)]
|
||||||
[DataField]
|
[DataField, AutoNetworkedField]
|
||||||
public bool EmergencyAccess = false;
|
public bool EmergencyAccess = false;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -126,6 +126,7 @@ public abstract class SharedAirlockSystem : EntitySystem
|
|||||||
public void ToggleEmergencyAccess(EntityUid uid, AirlockComponent component)
|
public void ToggleEmergencyAccess(EntityUid uid, AirlockComponent component)
|
||||||
{
|
{
|
||||||
component.EmergencyAccess = !component.EmergencyAccess;
|
component.EmergencyAccess = !component.EmergencyAccess;
|
||||||
|
Dirty(uid, component); // This only runs on the server apparently so we need this.
|
||||||
UpdateEmergencyLightStatus(uid, component);
|
UpdateEmergencyLightStatus(uid, component);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user