diff --git a/Content.Client/GameObjects/Components/Body/Scanner/BodyScannerDisplay.cs b/Content.Client/GameObjects/Components/Body/Scanner/BodyScannerDisplay.cs
index fae4c9419e..09739e7432 100644
--- a/Content.Client/GameObjects/Components/Body/Scanner/BodyScannerDisplay.cs
+++ b/Content.Client/GameObjects/Components/Body/Scanner/BodyScannerDisplay.cs
@@ -174,9 +174,10 @@ namespace Content.Client.GameObjects.Components.Body.Scanner
return;
}
+ // TODO BODY Mechanism description
var message =
Loc.GetString(
- $"{mechanism.Name}\nHealth: {mechanism.CurrentDurability}/{mechanism.MaxDurability}\n{mechanism.Description}");
+ $"{mechanism.Name}\nHealth: {mechanism.CurrentDurability}/{mechanism.MaxDurability}");
MechanismInfoLabel.SetMessage(message);
}
diff --git a/Content.Shared/GameObjects/Components/Body/Behavior/IMechanismBehavior.cs b/Content.Shared/GameObjects/Components/Body/Behavior/IMechanismBehavior.cs
index e1ddcb17b8..95f6bc689a 100644
--- a/Content.Shared/GameObjects/Components/Body/Behavior/IMechanismBehavior.cs
+++ b/Content.Shared/GameObjects/Components/Body/Behavior/IMechanismBehavior.cs
@@ -6,10 +6,22 @@ using Robust.Shared.Interfaces.Serialization;
namespace Content.Shared.GameObjects.Components.Body.Behavior
{
+ ///
+ /// Gives functionality to a when added to it.
+ ///
public interface IMechanismBehavior : IExposeData
{
+ ///
+ /// The body that owns the in which the
+ /// that owns this
+ /// is in.
+ ///
IBody? Body { get; }
+ ///
+ /// The part in which the that owns this
+ /// is in.
+ ///
IBodyPart? Part { get; }
///
@@ -21,14 +33,34 @@ namespace Content.Shared.GameObjects.Components.Body.Behavior
///
/// The entity that owns .
/// For the entity owning the body that this mechanism may be in,
- /// see
+ /// see 's .
///
IEntity Owner { get; }
+ ///
+ /// Called when this is added to a
+ /// , during .
+ /// If it is added after component initialization,
+ /// it is called immediately.
+ ///
+ ///
+ /// The mechanism that owns this .
+ ///
void Initialize(IMechanism parent);
+ ///
+ /// Called when this is added to a
+ /// , during .
+ /// If it is added after component startup, it is called immediately.
+ ///
void Startup();
+ ///
+ /// Runs an update cycle on this .
+ ///
+ ///
+ /// The amount of seconds that passed since the last update.
+ ///
void Update(float frameTime);
///
diff --git a/Content.Shared/GameObjects/Components/Body/IBody.cs b/Content.Shared/GameObjects/Components/Body/IBody.cs
index 9214436afd..672ef1c73a 100644
--- a/Content.Shared/GameObjects/Components/Body/IBody.cs
+++ b/Content.Shared/GameObjects/Components/Body/IBody.cs
@@ -4,6 +4,8 @@ using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using Content.Shared.GameObjects.Components.Body.Part;
using Content.Shared.GameObjects.Components.Body.Part.Property;
+using Content.Shared.GameObjects.Components.Body.Preset;
+using Content.Shared.GameObjects.Components.Body.Template;
using Robust.Shared.Interfaces.GameObjects;
namespace Content.Shared.GameObjects.Components.Body
@@ -14,48 +16,80 @@ namespace Content.Shared.GameObjects.Components.Body
///
public interface IBody : IComponent, IBodyPartContainer
{
+ ///
+ /// The name of the used by this
+ /// .
+ ///
public string? TemplateName { get; }
+ ///
+ /// The name of the used by this
+ /// .
+ ///
public string? PresetName { get; }
- // TODO BODY tf is this
+ // TODO BODY Part slots
+ // TODO BODY Sensible templates
///
- /// Maps all parts on this template to its BodyPartType.
- /// For instance, "right arm" is mapped to "BodyPartType.arm" on the humanoid
- /// template.
+ /// Mapping of slots in this body to their
+ /// .
///
public Dictionary Slots { get; }
///
- /// Maps slots to the part filling each one.
+ /// Mapping of slots to the filling each one.
///
public IReadOnlyDictionary Parts { get; }
- // TODO BODY what am i doing
///
- /// Maps limb name to the list of their connections to other limbs.
- /// For instance, on the humanoid template "torso" is mapped to a list
- /// containing "right arm", "left arm", "left leg", and "right leg".
- /// This is mapped both ways during runtime, but in the prototype only one
- /// way has to be defined, i.e., "torso" to "left arm" will automatically
- /// map "left arm" to "torso".
+ /// Mapping of slots to which other slots they connect to.
+ /// For example, the torso could be mapped to a list containing
+ /// "right arm", "left arm", "left leg", and "right leg".
+ /// This is mapped both ways during runtime, but in the prototype
+ /// it only has to be defined one-way, "torso": "left arm" will automatically
+ /// map "left arm" to "torso" as well.
///
public Dictionary> Connections { get; }
///
- /// Maps a template slot to the ID of the
+ /// Mapping of template slots to the ID of the
/// that should fill it. E.g. "right arm" : "BodyPart.arm.basic_human".
///
public IReadOnlyDictionary PartIds { get; }
///
- /// Adds the given into the given slot.
+ /// Attempts to add a part to the given slot.
///
- /// True if successful, false otherwise.
+ /// The slot to add this part to.
+ /// The part to add.
+ ///
+ /// Whether or not to check for the validity of the given .
+ /// Passing true does not guarantee it to be added, for example if it
+ /// had already been added before.
+ ///
+ ///
+ /// true if the part was added, false otherwise even if it was already added.
+ ///
bool TryAddPart(string slot, IBodyPart part, bool force = false);
+ ///
+ /// Checks if there is a in the given slot.
+ ///
+ /// The slot to look in.
+ ///
+ /// true if there is a part in the given ,
+ /// false otherwise.
+ ///
bool HasPart(string slot);
+ ///
+ /// Checks if this contains the given .
+ ///
+ /// The part to look for.
+ ///
+ /// true if the given is attached to the body,
+ /// false otherwise.
+ ///
bool HasPart(IBodyPart part);
///
@@ -200,8 +234,18 @@ namespace Content.Shared.GameObjects.Components.Body
List<(IBodyPart part, T property)> GetPartsWithProperty() where T : class, IBodyPartProperty;
// TODO BODY Make a slot object that makes sense to the human mind, and make it serializable. Imagine the possibilities!
+ ///
+ /// Retrieves the slot at the given index.
+ ///
+ /// The index to look in.
+ /// A pair of the slot name and part type occupying it.
KeyValuePair SlotAt(int index);
+ ///
+ /// Retrieves the part at the given index.
+ ///
+ /// The index to look in.
+ /// A pair of the part name and body part occupying it.
KeyValuePair PartAt(int index);
}
}
diff --git a/Content.Shared/GameObjects/Components/Body/Mechanism/IMechanism.cs b/Content.Shared/GameObjects/Components/Body/Mechanism/IMechanism.cs
index f6f82627cb..aabe7dd3e7 100644
--- a/Content.Shared/GameObjects/Components/Body/Mechanism/IMechanism.cs
+++ b/Content.Shared/GameObjects/Components/Body/Mechanism/IMechanism.cs
@@ -9,24 +9,23 @@ namespace Content.Shared.GameObjects.Components.Body.Mechanism
{
public interface IMechanism : IComponent
{
+ ///
+ /// The body that owns the in which this
+ /// is in.
+ ///
IBody? Body { get; }
+ ///
+ /// The part in which this is in.
+ ///
IBodyPart? Part { get; set; }
+ ///
+ /// The behaviors attached to this
+ /// mapped by their type.
+ ///
IReadOnlyDictionary Behaviors { get; }
- ///
- /// Professional description of the .
- ///
- string Description { get; set; }
-
- ///
- /// The message to display upon examining a mob with this
- /// added.
- /// If the string is empty (""), no message will be displayed.
- ///
- string ExamineMessage { get; set; }
-
///
/// Max HP of this .
///
@@ -61,7 +60,8 @@ namespace Content.Shared.GameObjects.Components.Body.Mechanism
BodyPartCompatibility Compatibility { get; set; }
///
- /// Adds a behavior if it does not exist already.
+ /// Adds a if this
+ /// does not have it already.
///
/// The behavior type to add.
///
@@ -69,10 +69,34 @@ namespace Content.Shared.GameObjects.Components.Body.Mechanism
///
bool EnsureBehavior(out T behavior) where T : IMechanismBehavior, new();
+ ///
+ /// Checks if this has the specified
+ /// .
+ ///
+ ///
+ /// The type of to check for.
+ ///
+ ///
+ /// true if it has the , false otherwise.
+ ///
bool HasBehavior() where T : IMechanismBehavior;
+ ///
+ /// Removes the specified from this
+ /// if it has it.
+ ///
+ ///
+ /// The type of to remove.
+ ///
+ /// true if it was removed, false otherwise.
bool TryRemoveBehavior() where T : IMechanismBehavior;
+ ///
+ /// Runs an update cycle for this .
+ ///
+ ///
+ /// The amount of seconds that passed since the last update.
+ ///
void Update(float frameTime);
// TODO BODY Turn these into event listeners so they dont need to be exposed
diff --git a/Content.Shared/GameObjects/Components/Body/Mechanism/SharedMechanismComponent.cs b/Content.Shared/GameObjects/Components/Body/Mechanism/SharedMechanismComponent.cs
index 7ac3c76ce2..4c5e1b9b5d 100644
--- a/Content.Shared/GameObjects/Components/Body/Mechanism/SharedMechanismComponent.cs
+++ b/Content.Shared/GameObjects/Components/Body/Mechanism/SharedMechanismComponent.cs
@@ -68,16 +68,13 @@ namespace Content.Shared.GameObjects.Components.Body.Mechanism
public IReadOnlyDictionary Behaviors => _behaviors;
- public string Description { get; set; } = string.Empty;
-
- public string ExamineMessage { get; set; } = string.Empty;
-
public int MaxDurability { get; set; }
public int CurrentDurability { get; set; }
public int DestroyThreshold { get; set; }
+ // TODO BODY: Surgery description and adding a message to the examine tooltip of the entity that owns this mechanism
// TODO BODY
public int Resistance { get; set; }
@@ -90,10 +87,6 @@ namespace Content.Shared.GameObjects.Components.Body.Mechanism
{
base.ExposeData(serializer);
- serializer.DataField(this, m => m.Description, "description", string.Empty);
-
- serializer.DataField(this, m => m.ExamineMessage, "examineMessage", string.Empty);
-
serializer.DataField(this, m => m.MaxDurability, "maxDurability", 10);
serializer.DataField(this, m => m.CurrentDurability, "currentDurability", MaxDurability);
diff --git a/Content.Shared/GameObjects/Components/Body/Networks/SharedBloodstreamComponent.cs b/Content.Shared/GameObjects/Components/Body/Networks/SharedBloodstreamComponent.cs
index 12827bd9fc..a9b3c0492f 100644
--- a/Content.Shared/GameObjects/Components/Body/Networks/SharedBloodstreamComponent.cs
+++ b/Content.Shared/GameObjects/Components/Body/Networks/SharedBloodstreamComponent.cs
@@ -6,11 +6,11 @@ namespace Content.Shared.GameObjects.Components.Body.Networks
public abstract class SharedBloodstreamComponent : Component
{
///
- /// Attempt to transfer provided solution to internal solution.
- /// Only supports complete transfers
+ /// Attempts to transfer the provided solution to an internal solution.
+ /// Only supports complete transfers.
///
- /// Solution to be transferred
- /// Whether or not transfer was a success
+ /// The solution to be transferred.
+ /// Whether or not transfer was successful.
public abstract bool TryTransferSolution(Solution solution);
}
}
diff --git a/Content.Shared/GameObjects/Components/Body/Part/BodyPartCompatibility.cs b/Content.Shared/GameObjects/Components/Body/Part/BodyPartCompatibility.cs
index 3b806f06a7..e65afd29bf 100644
--- a/Content.Shared/GameObjects/Components/Body/Part/BodyPartCompatibility.cs
+++ b/Content.Shared/GameObjects/Components/Body/Part/BodyPartCompatibility.cs
@@ -4,7 +4,7 @@ using Robust.Shared.Serialization;
namespace Content.Shared.GameObjects.Components.Body.Part
{
///
- /// Used to determine whether a BodyPart can connect to another BodyPart.
+ /// Determines whether two s can connect.
///
[Serializable, NetSerializable]
public enum BodyPartCompatibility
diff --git a/Content.Shared/GameObjects/Components/Body/Part/BodyPartExtensions.cs b/Content.Shared/GameObjects/Components/Body/Part/BodyPartExtensions.cs
index 79f0b832d2..2a52121001 100644
--- a/Content.Shared/GameObjects/Components/Body/Part/BodyPartExtensions.cs
+++ b/Content.Shared/GameObjects/Components/Body/Part/BodyPartExtensions.cs
@@ -7,16 +7,46 @@ namespace Content.Shared.GameObjects.Components.Body.Part
{
public static class BodyPartExtensions
{
+ ///
+ /// Checks if the given has the specified property.
+ ///
+ /// The to check in.
+ ///
+ /// The type of to check for.
+ ///
+ /// true if found, false otherwise.
public static bool HasProperty(this IBodyPart part, Type type)
{
return part.Owner.HasComponent(type);
}
+ ///
+ /// Checks if the given has the specified property.
+ ///
+ /// The to check in.
+ ///
+ /// The type of to check for.
+ ///
+ /// true if found, false otherwise.
public static bool HasProperty(this IBodyPart part) where T : class, IBodyPartProperty
{
return part.HasProperty(typeof(T));
}
+ ///
+ /// Tries to retrieve the with the
+ /// specified type.
+ ///
+ /// The to search in.
+ ///
+ /// The type of to search for.
+ ///
+ ///
+ /// The property, if it was found. Null otherwise.
+ ///
+ ///
+ /// true if a component with the specified type was found, false otherwise.
+ ///
public static bool TryGetProperty(this IBodyPart part, Type type,
[NotNullWhen(true)] out IBodyPartProperty? property)
{
@@ -29,6 +59,20 @@ namespace Content.Shared.GameObjects.Components.Body.Part
return (property = component as IBodyPartProperty) != null;
}
+ ///
+ /// Tries to retrieve the with the
+ /// specified type.
+ ///
+ /// The to search in.
+ ///
+ /// The type of to search for.
+ ///
+ ///
+ /// The property, if it was found. Null otherwise.
+ ///
+ ///
+ /// true if a component with the specified type was found, false otherwise.
+ ///
public static bool TryGetProperty(this IBodyPart part, [NotNullWhen(true)] out T? property) where T : class, IBodyPartProperty
{
return part.Owner.TryGetComponent(out property);
diff --git a/Content.Shared/GameObjects/Components/Body/Part/BodyPartSymmetry.cs b/Content.Shared/GameObjects/Components/Body/Part/BodyPartSymmetry.cs
index c8b9ccb62a..9a3b0d778e 100644
--- a/Content.Shared/GameObjects/Components/Body/Part/BodyPartSymmetry.cs
+++ b/Content.Shared/GameObjects/Components/Body/Part/BodyPartSymmetry.cs
@@ -3,6 +3,9 @@ using Robust.Shared.Serialization;
namespace Content.Shared.GameObjects.Components.Body.Part
{
+ ///
+ /// Defines the symmetry of a .
+ ///
[Serializable, NetSerializable]
public enum BodyPartSymmetry
{
diff --git a/Content.Shared/GameObjects/Components/Body/Part/BodyPartType.cs b/Content.Shared/GameObjects/Components/Body/Part/BodyPartType.cs
index e94cd5fc52..403400d63f 100644
--- a/Content.Shared/GameObjects/Components/Body/Part/BodyPartType.cs
+++ b/Content.Shared/GameObjects/Components/Body/Part/BodyPartType.cs
@@ -4,8 +4,7 @@ using Robust.Shared.Serialization;
namespace Content.Shared.GameObjects.Components.Body.Part
{
///
- /// Each BodyPart has a BodyPartType used to determine a variety of things.
- /// For instance, what slots it can fit into.
+ /// Defines the type of a .
///
[Serializable, NetSerializable]
public enum BodyPartType
diff --git a/Content.Shared/GameObjects/Components/Body/Part/IBodyPart.cs b/Content.Shared/GameObjects/Components/Body/Part/IBodyPart.cs
index 341af694c5..c04dcf8f19 100644
--- a/Content.Shared/GameObjects/Components/Body/Part/IBodyPart.cs
+++ b/Content.Shared/GameObjects/Components/Body/Part/IBodyPart.cs
@@ -9,6 +9,10 @@ namespace Content.Shared.GameObjects.Components.Body.Part
{
public interface IBodyPart : IComponent, IBodyPartContainer
{
+ ///
+ /// The to which this is
+ /// attached to.
+ ///
IBody? Body { get; set; }
///
@@ -19,9 +23,8 @@ namespace Content.Shared.GameObjects.Components.Body.Part
BodyPartType PartType { get; }
///
- /// Determines many things: how many mechanisms can be fit inside this
- /// , whether a body can fit through tiny crevices,
- /// etc.
+ /// Determines how many mechanisms can be fit inside this
+ /// .
///
int Size { get; }
@@ -29,16 +32,20 @@ namespace Content.Shared.GameObjects.Components.Body.Part
///
/// Collection of all s currently inside this
/// .
- /// To add and remove from this list see and
+ /// To add and remove from this list see and
///
///
IReadOnlyCollection Mechanisms { get; }
///
- /// If body part is vital
+ /// Whether or not the owning will die if all
+ /// s of this type are removed from it.
///
public bool IsVital { get; }
+ ///
+ /// The symmetry of this .
+ ///
public BodyPartSymmetry Symmetry { get; }
///
@@ -70,6 +77,16 @@ namespace Content.Shared.GameObjects.Components.Body.Part
/// True if it can be added, false otherwise.
bool CanAddMechanism(IMechanism mechanism);
+ ///
+ /// Tries to add a to this body.
+ ///
+ /// The mechanism to add.
+ ///
+ /// Whether or not to check if the mechanism is compatible.
+ /// Passing true does not guarantee it to be added, for example if
+ /// it was already added before.
+ ///
+ /// true if added, false otherwise even if it was already added.
bool TryAddMechanism(IMechanism mechanism, bool force = false);
///
diff --git a/Content.Shared/GameObjects/Components/Body/Part/IBodyPartAdded.cs b/Content.Shared/GameObjects/Components/Body/Part/IBodyPartAdded.cs
index a14c52d2f9..2e1fad8a4f 100644
--- a/Content.Shared/GameObjects/Components/Body/Part/IBodyPartAdded.cs
+++ b/Content.Shared/GameObjects/Components/Body/Part/IBodyPartAdded.cs
@@ -1,4 +1,5 @@
using System;
+using Robust.Shared.Interfaces.GameObjects;
namespace Content.Shared.GameObjects.Components.Body.Part
{
@@ -6,8 +7,13 @@ namespace Content.Shared.GameObjects.Components.Body.Part
/// This interface gives components behavior when a body part
/// is added to their owning entity.
///
- public interface IBodyPartAdded
+ public interface IBodyPartAdded : IComponent
{
+ ///
+ /// Called when a is added to the
+ /// entity owning this component.
+ ///
+ /// Information about the part that was added.
void BodyPartAdded(BodyPartAddedEventArgs args);
}
@@ -19,8 +25,14 @@ namespace Content.Shared.GameObjects.Components.Body.Part
Slot = slot;
}
+ ///
+ /// The part that was added.
+ ///
public IBodyPart Part { get; }
+ ///
+ /// The slot that was added to.
+ ///
public string Slot { get; }
}
}
diff --git a/Content.Shared/GameObjects/Components/Body/Part/IBodyPartContainer.cs b/Content.Shared/GameObjects/Components/Body/Part/IBodyPartContainer.cs
index 366cae3e5c..e9892a0451 100644
--- a/Content.Shared/GameObjects/Components/Body/Part/IBodyPartContainer.cs
+++ b/Content.Shared/GameObjects/Components/Body/Part/IBodyPartContainer.cs
@@ -1,14 +1,8 @@
namespace Content.Shared.GameObjects.Components.Body.Part
{
///
- /// Making a class inherit from this interface allows you to do many
- /// things with it in the class.
- /// This includes passing it as an argument to a
- /// delegate, as to later typecast
- /// it back to the original class type.
- /// Every BodyPart also needs an to be
- /// its parent (i.e. the holds many
- /// s, each of which have an upward reference to it).
+ /// Defines a component as being capable of containing parts.
+ /// Used during surgery.
///
// TODO BODY Remove
public interface IBodyPartContainer
diff --git a/Content.Shared/GameObjects/Components/Body/Part/IBodyPartRemoved.cs b/Content.Shared/GameObjects/Components/Body/Part/IBodyPartRemoved.cs
index a7c4b8da91..e40bdcc49b 100644
--- a/Content.Shared/GameObjects/Components/Body/Part/IBodyPartRemoved.cs
+++ b/Content.Shared/GameObjects/Components/Body/Part/IBodyPartRemoved.cs
@@ -8,6 +8,11 @@ namespace Content.Shared.GameObjects.Components.Body.Part
///
public interface IBodyPartRemoved
{
+ ///
+ /// Called when a is removed from the
+ /// entity owning this component.
+ ///
+ /// Information about the part that was removed.
void BodyPartRemoved(BodyPartRemovedEventArgs args);
}
@@ -19,8 +24,14 @@ namespace Content.Shared.GameObjects.Components.Body.Part
Slot = slot;
}
+ ///
+ /// The part that was removed.
+ ///
public IBodyPart Part { get; }
+ ///
+ /// The slot that was removed from.
+ ///
public string Slot { get; }
}
}
diff --git a/Content.Shared/GameObjects/Components/Body/Part/Property/BodyPartPropertyComponent.cs b/Content.Shared/GameObjects/Components/Body/Part/Property/BodyPartPropertyComponent.cs
index 30f1cef5ab..7c3804e823 100644
--- a/Content.Shared/GameObjects/Components/Body/Part/Property/BodyPartPropertyComponent.cs
+++ b/Content.Shared/GameObjects/Components/Body/Part/Property/BodyPartPropertyComponent.cs
@@ -5,8 +5,9 @@ namespace Content.Shared.GameObjects.Components.Body.Part.Property
{
///
/// Property attachable to a .
- /// For example, this is used to define the speed capabilities of a
- /// leg. The movement system will look for a LegProperty on all BodyParts.
+ /// For example, this is used to define the speed capabilities of a leg.
+ /// The movement system will look for a on all
+ /// .
///
public abstract class BodyPartPropertyComponent : Component, IBodyPartProperty
{
diff --git a/Content.Shared/GameObjects/Components/Body/Part/Property/ExtensionComponent.cs b/Content.Shared/GameObjects/Components/Body/Part/Property/ExtensionComponent.cs
index 15a9d687b8..c0d5cd8c5b 100644
--- a/Content.Shared/GameObjects/Components/Body/Part/Property/ExtensionComponent.cs
+++ b/Content.Shared/GameObjects/Components/Body/Part/Property/ExtensionComponent.cs
@@ -3,13 +3,16 @@ using Robust.Shared.Serialization;
namespace Content.Shared.GameObjects.Components.Body.Part.Property
{
+ ///
+ /// Defines the length of a .
+ ///
[RegisterComponent]
public class ExtensionComponent : BodyPartPropertyComponent
{
public override string Name => "Extension";
///
- /// Current distance (in tiles).
+ /// Current distance in tiles.
///
public float Distance { get; set; }
diff --git a/Content.Shared/GameObjects/Components/Body/Part/Property/GraspComponent.cs b/Content.Shared/GameObjects/Components/Body/Part/Property/GraspComponent.cs
index 24966664a0..798d334e0a 100644
--- a/Content.Shared/GameObjects/Components/Body/Part/Property/GraspComponent.cs
+++ b/Content.Shared/GameObjects/Components/Body/Part/Property/GraspComponent.cs
@@ -3,7 +3,8 @@
namespace Content.Shared.GameObjects.Components.Body.Part.Property
{
///
- /// Defines an entity as being able to pick up items
+ /// Defines a as being able to grasp around an entity,
+ /// for example picking up an item.
///
// TODO BODY Implement
[RegisterComponent]
diff --git a/Content.Shared/GameObjects/Components/Body/Part/Property/IBodyPartProperty.cs b/Content.Shared/GameObjects/Components/Body/Part/Property/IBodyPartProperty.cs
index 94f7dfac41..39f8e003fc 100644
--- a/Content.Shared/GameObjects/Components/Body/Part/Property/IBodyPartProperty.cs
+++ b/Content.Shared/GameObjects/Components/Body/Part/Property/IBodyPartProperty.cs
@@ -2,6 +2,9 @@
namespace Content.Shared.GameObjects.Components.Body.Part.Property
{
+ ///
+ /// Defines a property for a .
+ ///
public interface IBodyPartProperty : IComponent
{
bool Active { get; set; }
diff --git a/Content.Shared/GameObjects/Components/Body/Part/Property/LegComponent.cs b/Content.Shared/GameObjects/Components/Body/Part/Property/LegComponent.cs
index f80abbd209..fb1ebfcf55 100644
--- a/Content.Shared/GameObjects/Components/Body/Part/Property/LegComponent.cs
+++ b/Content.Shared/GameObjects/Components/Body/Part/Property/LegComponent.cs
@@ -3,13 +3,16 @@ using Robust.Shared.Serialization;
namespace Content.Shared.GameObjects.Components.Body.Part.Property
{
+ ///
+ /// Defines the speed at which a can move.
+ ///
[RegisterComponent]
public class LegComponent : BodyPartPropertyComponent
{
public override string Name => "Leg";
///
- /// Speed (in tiles per second).
+ /// Speed in tiles per second.
///
public float Speed { get; set; }
diff --git a/Content.Shared/GameObjects/Components/Body/Preset/BodyPresetPrototype.cs b/Content.Shared/GameObjects/Components/Body/Preset/BodyPresetPrototype.cs
index 5ec6552b41..7078551466 100644
--- a/Content.Shared/GameObjects/Components/Body/Preset/BodyPresetPrototype.cs
+++ b/Content.Shared/GameObjects/Components/Body/Preset/BodyPresetPrototype.cs
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
+using Content.Shared.GameObjects.Components.Body.Part;
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization;
using Robust.Shared.ViewVariables;
@@ -8,7 +9,7 @@ using YamlDotNet.RepresentationModel;
namespace Content.Shared.GameObjects.Components.Body.Preset
{
///
- /// Prototype for the BodyPreset class.
+ /// Defines the s used in a .
///
[Prototype("bodyPreset")]
[Serializable, NetSerializable]
diff --git a/Content.Shared/GameObjects/Components/Body/Surgery/BiologicalSurgeryDataComponent.cs b/Content.Shared/GameObjects/Components/Body/Surgery/BiologicalSurgeryDataComponent.cs
index a5e7bbdfda..ceb6f16ede 100644
--- a/Content.Shared/GameObjects/Components/Body/Surgery/BiologicalSurgeryDataComponent.cs
+++ b/Content.Shared/GameObjects/Components/Body/Surgery/BiologicalSurgeryDataComponent.cs
@@ -94,7 +94,7 @@ namespace Content.Shared.GameObjects.Components.Body.Surgery
return null;
}
- public override string GetDescription(IEntity target)
+ public override string GetDescription()
{
if (Parent == null)
{
@@ -107,21 +107,21 @@ namespace Content.Shared.GameObjects.Components.Body.Surgery
{
// Case: skin is opened, but not clamped.
toReturn += Loc.GetString("The skin on {0:their} {1} has an incision, but it is prone to bleeding.\n",
- target, Parent.Name);
+ Owner, Parent.Name);
}
else if (_skinOpened && _vesselsClamped && !_skinRetracted)
{
// Case: skin is opened and clamped, but not retracted.
toReturn += Loc.GetString("The skin on {0:their} {1} has an incision, but it is not retracted.\n",
- target, Parent.Name);
+ Owner, Parent.Name);
}
else if (_skinOpened && _vesselsClamped && _skinRetracted)
{
// Case: skin is fully open.
- toReturn += Loc.GetString("There is an incision on {0:their} {1}.\n", target, Parent.Name);
+ toReturn += Loc.GetString("There is an incision on {0:their} {1}.\n", Owner, Parent.Name);
foreach (var mechanism in _disconnectedOrgans)
{
- toReturn += Loc.GetString("{0:their} {1} is loose.\n", target, mechanism.Name);
+ toReturn += Loc.GetString("{0:their} {1} is loose.\n", Owner, mechanism.Name);
}
}
diff --git a/Content.Shared/GameObjects/Components/Body/Surgery/ISurgeon.cs b/Content.Shared/GameObjects/Components/Body/Surgery/ISurgeon.cs
index 2ab1b13967..bc741306de 100644
--- a/Content.Shared/GameObjects/Components/Body/Surgery/ISurgeon.cs
+++ b/Content.Shared/GameObjects/Components/Body/Surgery/ISurgeon.cs
@@ -6,9 +6,8 @@ using Robust.Shared.Interfaces.GameObjects;
namespace Content.Shared.GameObjects.Components.Body.Surgery
{
///
- /// Interface representing an entity capable of performing surgery (performing operations on an
- /// class).
- /// For an example see , which inherits from this class.
+ /// Interface representing an entity capable of performing surgery,
+ /// such as a circular saw.
///
public interface ISurgeon
{
@@ -19,15 +18,16 @@ namespace Content.Shared.GameObjects.Components.Body.Surgery
IEntity performer);
///
- /// How long it takes to perform a single surgery step (in seconds).
+ /// How long it takes to perform a single surgery step in seconds.
///
public float BaseOperationTime { get; set; }
///
- /// When performing a surgery, the may sometimes require selecting from a set of Mechanisms
- /// to operate on.
- /// This function is called in that scenario, and it is expected that you call the callback with one mechanism from the
- /// provided list.
+ /// When performing a surgery, the
+ /// may sometimes require selecting from a set of
+ /// s to operate on.
+ /// This function is called in that scenario, and it is expected that you call
+ /// the callback with one from the provided list.
///
public void RequestMechanism(IEnumerable options, MechanismRequestCallback callback);
}
diff --git a/Content.Shared/GameObjects/Components/Body/Surgery/SurgeryDataComponent.cs b/Content.Shared/GameObjects/Components/Body/Surgery/SurgeryDataComponent.cs
index e19ff49255..c778232c1b 100644
--- a/Content.Shared/GameObjects/Components/Body/Surgery/SurgeryDataComponent.cs
+++ b/Content.Shared/GameObjects/Components/Body/Surgery/SurgeryDataComponent.cs
@@ -3,14 +3,11 @@ using Content.Shared.GameObjects.Components.Body.Mechanism;
using Content.Shared.GameObjects.Components.Body.Part;
using Robust.Shared.GameObjects;
using Robust.Shared.Interfaces.GameObjects;
-using Robust.Shared.Serialization;
namespace Content.Shared.GameObjects.Components.Body.Surgery
{
///
- /// This data class represents the state of a in
- /// regards to everything surgery related - whether there's an incision on
- /// it, whether the bone is broken, etc.
+ /// Represents the current surgery state of a .
///
public abstract class SurgeryDataComponent : Component
{
@@ -29,10 +26,10 @@ namespace Content.Shared.GameObjects.Components.Body.Surgery
protected BodyPartType? ParentType => Parent?.PartType;
///
- /// Returns the description of this current to
- /// be shown upon observing the given entity.
+ /// Returns a description of this entity.
///
- public abstract string GetDescription(IEntity target);
+ /// The description shown upon observing this entity.
+ public abstract string GetDescription();
///
/// Returns whether a can be added into the
diff --git a/Content.Shared/GameObjects/Components/Body/Surgery/SurgeryType.cs b/Content.Shared/GameObjects/Components/Body/Surgery/SurgeryType.cs
index 1429662bf1..06f58fcbae 100644
--- a/Content.Shared/GameObjects/Components/Body/Surgery/SurgeryType.cs
+++ b/Content.Shared/GameObjects/Components/Body/Surgery/SurgeryType.cs
@@ -4,8 +4,9 @@ using Robust.Shared.Serialization;
namespace Content.Shared.GameObjects.Components.Body.Surgery
{
///
- /// Defines a surgery operation that can be performed.
+ /// Types of surgery operations that can be performed.
///
+ // TODO BODY Move this to YAML?
[Serializable, NetSerializable]
public enum SurgeryType
{
diff --git a/Content.Shared/GameObjects/Components/Body/Template/BodyTemplatePrototype.cs b/Content.Shared/GameObjects/Components/Body/Template/BodyTemplatePrototype.cs
index d1468a337d..b9fa0457d6 100644
--- a/Content.Shared/GameObjects/Components/Body/Template/BodyTemplatePrototype.cs
+++ b/Content.Shared/GameObjects/Components/Body/Template/BodyTemplatePrototype.cs
@@ -10,7 +10,7 @@ using YamlDotNet.RepresentationModel;
namespace Content.Shared.GameObjects.Components.Body.Template
{
///
- /// Prototype for the BodyTemplate class.
+ /// Defines the layout of a .
///
[Prototype("bodyTemplate")]
[Serializable, NetSerializable]