add machine linking button to sandbox panel. (#2484)
* add machine linking button to sandbox panel. * Update Content.Client/Sandbox/SandboxManager.cs Co-authored-by: Paul Ritter <ritter.paul1@googlemail.com> Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> Co-authored-by: Paul Ritter <ritter.paul1@googlemail.com>
This commit is contained in:
@@ -32,6 +32,7 @@ namespace Content.Client.Sandbox
|
|||||||
public Button ToggleSubfloorButton;
|
public Button ToggleSubfloorButton;
|
||||||
public Button ShowMarkersButton; //Shows spawn points
|
public Button ShowMarkersButton; //Shows spawn points
|
||||||
public Button ShowBbButton; //Shows bounding boxes
|
public Button ShowBbButton; //Shows bounding boxes
|
||||||
|
public Button MachineLinkingButton; // Enables/disables machine linking mode.
|
||||||
|
|
||||||
public SandboxWindow()
|
public SandboxWindow()
|
||||||
{
|
{
|
||||||
@@ -77,6 +78,9 @@ namespace Content.Client.Sandbox
|
|||||||
|
|
||||||
ShowBbButton = new Button { Text = Loc.GetString("Show Bb"), ToggleMode = true };
|
ShowBbButton = new Button { Text = Loc.GetString("Show Bb"), ToggleMode = true };
|
||||||
vBox.AddChild(ShowBbButton);
|
vBox.AddChild(ShowBbButton);
|
||||||
|
|
||||||
|
MachineLinkingButton = new Button { Text = Loc.GetString("Link machines"), ToggleMode = true };
|
||||||
|
vBox.AddChild(MachineLinkingButton);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -186,6 +190,7 @@ namespace Content.Client.Sandbox
|
|||||||
_window.ToggleSubfloorButton.OnPressed += OnToggleSubfloorButtonClicked;
|
_window.ToggleSubfloorButton.OnPressed += OnToggleSubfloorButtonClicked;
|
||||||
_window.ShowMarkersButton.OnPressed += OnShowMarkersButtonClicked;
|
_window.ShowMarkersButton.OnPressed += OnShowMarkersButtonClicked;
|
||||||
_window.ShowBbButton.OnPressed += OnShowBbButtonClicked;
|
_window.ShowBbButton.OnPressed += OnShowBbButtonClicked;
|
||||||
|
_window.MachineLinkingButton.OnPressed += OnMachineLinkingButtonClicked;
|
||||||
|
|
||||||
_window.OpenCentered();
|
_window.OpenCentered();
|
||||||
}
|
}
|
||||||
@@ -241,6 +246,10 @@ namespace Content.Client.Sandbox
|
|||||||
{
|
{
|
||||||
ShowBb();
|
ShowBb();
|
||||||
}
|
}
|
||||||
|
private void OnMachineLinkingButtonClicked(BaseButton.ButtonEventArgs args)
|
||||||
|
{
|
||||||
|
LinkMachines();
|
||||||
|
}
|
||||||
|
|
||||||
private void OnGiveAdminAccessButtonClicked(BaseButton.ButtonEventArgs args)
|
private void OnGiveAdminAccessButtonClicked(BaseButton.ButtonEventArgs args)
|
||||||
{
|
{
|
||||||
@@ -318,5 +327,10 @@ namespace Content.Client.Sandbox
|
|||||||
{
|
{
|
||||||
_console.ProcessCommand("showbb");
|
_console.ProcessCommand("showbb");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void LinkMachines()
|
||||||
|
{
|
||||||
|
_console.ProcessCommand("signallink");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user