Toggles for handheld interactables. (#2049)

* how bout you give em a tog

* two more.

* boop
This commit is contained in:
derek
2020-09-13 05:03:22 -07:00
committed by GitHub
parent c7037c2293
commit a359b6b8b0
7 changed files with 9 additions and 9 deletions

View File

@@ -60,7 +60,7 @@ namespace Content.Server.GameObjects.Components.Atmos
{ {
_checkPlayer = true; _checkPlayer = true;
_position = null; _position = null;
UserInterface?.Open(session); UserInterface?.Toggle(session);
UpdateUserInterface(); UpdateUserInterface();
Resync(); Resync();
} }
@@ -75,7 +75,7 @@ namespace Content.Server.GameObjects.Components.Atmos
{ {
_checkPlayer = false; _checkPlayer = false;
_position = pos; _position = pos;
UserInterface?.Open(session); UserInterface?.Toggle(session);
UpdateUserInterface(); UpdateUserInterface();
Resync(); Resync();
} }

View File

@@ -294,7 +294,7 @@ namespace Content.Server.GameObjects.Components.Instruments
private void OpenUserInterface(IPlayerSession session) private void OpenUserInterface(IPlayerSession session)
{ {
UserInterface?.Open(session); UserInterface?.Toggle(session);
} }
public override void Update(float delta) public override void Update(float delta)

View File

@@ -195,7 +195,7 @@ namespace Content.Server.GameObjects.Components.Kitchen
} }
_uiDirty = true; _uiDirty = true;
UserInterface?.Open(actor.playerSession); UserInterface?.Toggle(actor.playerSession);
} }
public async Task<bool> InteractUsing(InteractUsingEventArgs eventArgs) public async Task<bool> InteractUsing(InteractUsingEventArgs eventArgs)

View File

@@ -101,7 +101,7 @@ namespace Content.Server.GameObjects.Components
return; return;
} }
UserInterface?.Open(actor.playerSession); UserInterface?.Toggle(actor.playerSession);
var msg = new MagicMirrorInitialDataMessage(looks.Appearance.HairColor, looks.Appearance.FacialHairColor, looks.Appearance.HairStyleName, var msg = new MagicMirrorInitialDataMessage(looks.Appearance.HairColor, looks.Appearance.FacialHairColor, looks.Appearance.HairStyleName,
looks.Appearance.FacialHairStyleName); looks.Appearance.FacialHairStyleName);

View File

@@ -172,7 +172,7 @@ namespace Content.Server.GameObjects.Components.PDA
return; return;
} }
UserInterface?.Open(actor.playerSession); UserInterface?.Toggle(actor.playerSession);
UpdatePDAAppearance(); UpdatePDAAppearance();
} }
@@ -183,7 +183,7 @@ namespace Content.Server.GameObjects.Components.PDA
return false; return false;
} }
UserInterface?.Open(actor.playerSession); UserInterface?.Toggle(actor.playerSession);
UpdatePDAAppearance(); UpdatePDAAppearance();
return true; return true;
} }

View File

@@ -53,7 +53,7 @@ namespace Content.Server.GameObjects.Components.Paper
_mode = PaperAction.Read; _mode = PaperAction.Read;
UpdateUserInterface(); UpdateUserInterface();
UserInterface?.Open(actor.playerSession); UserInterface?.Toggle(actor.playerSession);
return true; return true;
} }

View File

@@ -62,7 +62,7 @@ namespace Content.Server.GameObjects.Components.VendingMachines
wires.OpenInterface(actor.playerSession); wires.OpenInterface(actor.playerSession);
} else } else
{ {
UserInterface?.Open(actor.playerSession); UserInterface?.Toggle(actor.playerSession);
} }
} }