Click Drag Functionality + Refactor Interaction Interfaces (#1125)

Co-authored-by: Víctor Aguilera Puerto <6766154+Zumorica@users.noreply.github.com>
Co-authored-by: ComicIronic <comicironic@gmail.com>
Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
This commit is contained in:
chairbender
2020-07-06 14:27:03 -07:00
committed by GitHub
parent c019d428a7
commit b35333d366
184 changed files with 1792 additions and 895 deletions

View File

@@ -9,7 +9,7 @@ using Robust.Shared.ViewVariables;
using Robust.Shared.Interfaces.GameObjects;
using Robust.Shared.Map;
using System.Linq;
using Content.Server.GameObjects.EntitySystems;
using Content.Server.Interfaces.GameObjects.Components.Interaction;
namespace Content.Server.BodySystem {

View File

@@ -15,6 +15,7 @@ using Robust.Server.Interfaces.Player;
using Content.Shared.Interfaces;
using Robust.Shared.Interfaces.Random;
using System.Linq;
using Content.Server.Interfaces.GameObjects.Components.Interaction;
using Robust.Shared.Localization;
namespace Content.Server.BodySystem
@@ -22,7 +23,7 @@ namespace Content.Server.BodySystem
/// <summary>
/// Component representing a dropped, tangible <see cref="BodyPart"/> entity.
/// </summary>
/// </summary>
[RegisterComponent]
public class DroppedBodyPartComponent : Component, IAfterInteract, IBodyPartContainer
{

View File

@@ -1,4 +1,4 @@
using Content.Server.GameObjects.EntitySystems;
using Content.Server.Interfaces.GameObjects.Components.Interaction;
using Robust.Server.GameObjects.Components.UserInterface;
using Robust.Server.Interfaces.GameObjects;
using Robust.Shared.GameObjects;

View File

@@ -16,13 +16,14 @@ using Robust.Server.Interfaces.Player;
using Robust.Shared.Interfaces.Random;
using Robust.Shared.Interfaces.GameObjects;
using System.Diagnostics;
using Content.Server.Interfaces.GameObjects.Components.Interaction;
using Robust.Shared.Localization;
namespace Content.Server.BodySystem {
/// <summary>
/// Component representing a dropped, tangible <see cref="Mechanism"/> entity.
/// </summary>
/// </summary>
[RegisterComponent]
public class DroppedMechanismComponent : Component, IAfterInteract
{
@@ -130,7 +131,7 @@ namespace Content.Server.BodySystem {
}
/// <summary>
/// Called after the client chooses from a list of possible BodyParts that can be operated on.
/// Called after the client chooses from a list of possible BodyParts that can be operated on.
/// </summary>
private void HandleReceiveBodyPart(int key)
{

View File

@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using Content.Server.GameObjects.EntitySystems;
using Content.Server.Interfaces.GameObjects.Components.Interaction;
using Content.Shared.BodySystem;
using Content.Shared.GameObjects;
using Content.Shared.Interfaces;
@@ -65,7 +66,7 @@ namespace Content.Server.BodySystem
{
var toSend = new Dictionary<string, int>(); //Create dictionary to send to client (text to be shown : data sent back if selected)
foreach (var(key, value) in bodyManager.PartDictionary) { //For each limb in the target, add it to our cache if it is a valid option.
if (value.SurgeryCheck(_surgeryType))
if (value.SurgeryCheck(_surgeryType))
{
_optionsCache.Add(_idHash, value);
toSend.Add(key + ": " + value.Name, _idHash++);
@@ -171,7 +172,7 @@ namespace Content.Server.BodySystem
}
/// <summary>
/// Called after the client chooses from a list of possible <see cref="BodyPart">BodyParts</see> that can be operated on.
/// Called after the client chooses from a list of possible <see cref="BodyPart">BodyParts</see> that can be operated on.
/// </summary>
private void HandleReceiveBodyPart(int key)
{