Add IMechanism interface to body system (#1997)

This commit is contained in:
DrSmugleaf
2020-09-02 01:16:13 +02:00
committed by GitHub
parent 072f374bcc
commit 682b6b9568
9 changed files with 162 additions and 117 deletions

View File

@@ -128,7 +128,7 @@ namespace Content.Server.GameObjects.Components.Body
public float BaseOperationTime { get => _baseOperateTime; set => _baseOperateTime = value; }
public void RequestMechanism(IEnumerable<Mechanism> options, ISurgeon.MechanismRequestCallback callback)
public void RequestMechanism(IEnumerable<IMechanism> options, ISurgeon.MechanismRequestCallback callback)
{
var toSend = new Dictionary<string, int>();
foreach (var mechanism in options)
@@ -230,7 +230,7 @@ namespace Content.Server.GameObjects.Components.Body
/// <summary>
/// Called after the client chooses from a list of possible
/// <see cref="Mechanism"/> to choose from.
/// <see cref="IMechanism"/> to choose from.
/// </summary>
private void HandleReceiveMechanism(int key)
{
@@ -251,23 +251,13 @@ namespace Content.Server.GameObjects.Components.Body
private void SendNoUsefulWayToUsePopup()
{
if (_bodyManagerComponentCache == null)
{
return;
}
_bodyManagerComponentCache.Owner.PopupMessage(_performerCache,
_bodyManagerComponentCache?.Owner.PopupMessage(_performerCache,
Loc.GetString("You see no useful way to use {0:theName}.", Owner));
}
private void SendNoUsefulWayToUseAnymorePopup()
{
if (_bodyManagerComponentCache == null)
{
return;
}
_bodyManagerComponentCache.Owner.PopupMessage(_performerCache,
_bodyManagerComponentCache?.Owner.PopupMessage(_performerCache,
Loc.GetString("You see no useful way to use {0:theName} anymore.", Owner));
}