BodySystem stuff 2: overused boogaloo (#1174)
Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
This commit is contained in:
@@ -0,0 +1,79 @@
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.GameObjects.Components.UserInterface;
|
||||
using Robust.Shared.Serialization;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace Content.Shared.BodySystem
|
||||
{
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
public class RequestBodyPartSurgeryUIMessage : BoundUserInterfaceMessage
|
||||
{
|
||||
public Dictionary<string, int> Targets;
|
||||
public RequestBodyPartSurgeryUIMessage(Dictionary<string, int> targets)
|
||||
{
|
||||
Targets = targets;
|
||||
}
|
||||
}
|
||||
[Serializable, NetSerializable]
|
||||
public class RequestMechanismSurgeryUIMessage : BoundUserInterfaceMessage
|
||||
{
|
||||
public Dictionary<string, int> Targets;
|
||||
public RequestMechanismSurgeryUIMessage(Dictionary<string, int> targets)
|
||||
{
|
||||
Targets = targets;
|
||||
}
|
||||
}
|
||||
[Serializable, NetSerializable]
|
||||
public class RequestBodyPartSlotSurgeryUIMessage : BoundUserInterfaceMessage
|
||||
{
|
||||
public Dictionary<string, int> Targets;
|
||||
public RequestBodyPartSlotSurgeryUIMessage(Dictionary<string, int> targets)
|
||||
{
|
||||
Targets = targets;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
public class ReceiveBodyPartSurgeryUIMessage : BoundUserInterfaceMessage
|
||||
{
|
||||
public int SelectedOptionID;
|
||||
public ReceiveBodyPartSurgeryUIMessage(int selectedOptionID)
|
||||
{
|
||||
SelectedOptionID = selectedOptionID;
|
||||
}
|
||||
}
|
||||
[Serializable, NetSerializable]
|
||||
public class ReceiveMechanismSurgeryUIMessage : BoundUserInterfaceMessage
|
||||
{
|
||||
public int SelectedOptionID;
|
||||
public ReceiveMechanismSurgeryUIMessage(int selectedOptionID)
|
||||
{
|
||||
SelectedOptionID = selectedOptionID;
|
||||
}
|
||||
}
|
||||
[Serializable, NetSerializable]
|
||||
public class ReceiveBodyPartSlotSurgeryUIMessage : BoundUserInterfaceMessage
|
||||
{
|
||||
public int SelectedOptionID;
|
||||
public ReceiveBodyPartSlotSurgeryUIMessage(int selectedOptionID)
|
||||
{
|
||||
SelectedOptionID = selectedOptionID;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
[NetSerializable, Serializable]
|
||||
public enum GenericSurgeryUiKey
|
||||
{
|
||||
Key,
|
||||
}
|
||||
}
|
||||
@@ -1,73 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Content.Shared.GameObjects;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.Interfaces.Serialization;
|
||||
using Robust.Shared.Prototypes;
|
||||
using Robust.Shared.Serialization;
|
||||
using Robust.Shared.ViewVariables;
|
||||
using YamlDotNet.RepresentationModel;
|
||||
|
||||
namespace Content.Shared.BodySystem {
|
||||
|
||||
|
||||
public class SharedSurgeryToolComponent : Component {
|
||||
|
||||
protected SurgeryToolType _surgeryToolClass;
|
||||
protected float _baseOperateTime;
|
||||
public override string Name => "SurgeryTool";
|
||||
public override uint? NetID => ContentNetIDs.SURGERY;
|
||||
|
||||
public override void ExposeData(ObjectSerializer serializer)
|
||||
{
|
||||
base.ExposeData(serializer);
|
||||
serializer.DataField(ref _surgeryToolClass, "surgeryToolClass", SurgeryToolType.Incision);
|
||||
serializer.DataField(ref _baseOperateTime, "baseOperateTime", 5);
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
public class OpenSurgeryUIMessage : ComponentMessage
|
||||
{
|
||||
public OpenSurgeryUIMessage()
|
||||
{
|
||||
Directed = true;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
public class CloseSurgeryUIMessage : ComponentMessage
|
||||
{
|
||||
public CloseSurgeryUIMessage()
|
||||
{
|
||||
Directed = true;
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
public class UpdateSurgeryUIMessage : ComponentMessage
|
||||
{
|
||||
public Dictionary<string, string> Targets;
|
||||
public UpdateSurgeryUIMessage(Dictionary<string, string> targets)
|
||||
{
|
||||
Targets = targets;
|
||||
Directed = true;
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
public class SelectSurgeryUIMessage : ComponentMessage
|
||||
{
|
||||
public string TargetSlot;
|
||||
public SelectSurgeryUIMessage(string target)
|
||||
{
|
||||
TargetSlot = target;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user