Separate ghost warp message into two (#3310)
* Separate ghost warp message into two * Remove redundant arguments * Address reviews * Move properties up
This commit is contained in:
@@ -17,7 +17,7 @@ namespace Content.Client.UserInterface
|
||||
private readonly Button _ghostRoles = new() {Text = Loc.GetString("Ghost Roles")};
|
||||
private readonly GhostComponent _owner;
|
||||
|
||||
public GhostTargetWindow? TargetWindow { get; private set; }
|
||||
public GhostTargetWindow? TargetWindow { get; }
|
||||
|
||||
public GhostGui(GhostComponent owner)
|
||||
{
|
||||
@@ -29,8 +29,8 @@ namespace Content.Client.UserInterface
|
||||
|
||||
MouseFilter = MouseFilterMode.Ignore;
|
||||
|
||||
_ghostWarp.OnPressed += args => TargetWindow.Populate();
|
||||
_returnToBody.OnPressed += args => owner.SendReturnToBodyMessage();
|
||||
_ghostWarp.OnPressed += _ => TargetWindow.Populate();
|
||||
_returnToBody.OnPressed += _ => owner.SendReturnToBodyMessage();
|
||||
_ghostRoles.OnPressed += _ => IoCManager.Resolve<IClientConsoleHost>().RemoteExecuteCommand(null, "ghostroles");
|
||||
|
||||
AddChild(new HBoxContainer
|
||||
@@ -114,7 +114,7 @@ namespace Content.Client.UserInterface
|
||||
ClipText = true,
|
||||
};
|
||||
|
||||
currentButtonRef.OnPressed += (args) =>
|
||||
currentButtonRef.OnPressed += (_) =>
|
||||
{
|
||||
_owner.SendGhostWarpRequestMessage(key);
|
||||
};
|
||||
@@ -138,9 +138,9 @@ namespace Content.Client.UserInterface
|
||||
ClipText = true,
|
||||
};
|
||||
|
||||
currentButtonRef.OnPressed += (args) =>
|
||||
currentButtonRef.OnPressed += (_) =>
|
||||
{
|
||||
_owner.SendGhostWarpRequestMessage(default,name);
|
||||
_owner.SendGhostWarpRequestMessage(name);
|
||||
};
|
||||
|
||||
_buttonContainer.AddChild(currentButtonRef);
|
||||
|
||||
Reference in New Issue
Block a user