mirror of
https://github.com/DeltaV-Station/Delta-v.git
synced 2026-10-02 00:57:26 +00:00
* Remove Alive Icon (#1252) <!-- Guidelines: https://docs.spacestation14.io/en/getting-started/pr-guideline --> <!-- NOTE: All code submitted to this repository is ALWAYS licensed under the AGPL-3.0-or-later license. The REUSE Specification headers or separate .license files indicate a secondary license (e.g., MPL or MIT) solely to facilitate integration for projects that do not use the AGPL license. This secondary license does not replace the fact that AGPL-3.0-or-later remains the primary and binding license. Uncomment and modify the following line if you wish to change the license from the default of AGPL.--> <!--- LICENSE: AGPL --> <!-- What did you change? --> I removed the alive Icon from the Medical HUD. <!-- Discuss how this would affect game balance or explain why it was changed. Link any relevant discussions or issues. --> It blocked vision on speech bubbles and is entirely unnecessary. Is the entity moving? Probably alive. Does it not have a dead or critical icon? Probably alive. We don't need an Icon that blocks the speech bubble to tell us this. <!-- Summary of code changes for easier review. --> Added a boolean to not give the icon if an entity is alvie. Removed the Mob.Alive state from the icon finder table thing. <!-- Attach media if the PR makes ingame changes (clothing, items, features, etc). Small fixes/refactors are exempt. Media may be used in SS14 progress reports with credit. --> <img width="89" height="95" alt="grafik" src="https://github.com/user-attachments/assets/ef9308be-276b-440b-95d4-fddcaece32b9" /> <!-- Confirm the following by placing an X in the brackets [X]: --> - [X] I have read and am following the [Pull Request and Changelog Guidelines](https://docs.spacestation14.com/en/general-development/codebase-info/pull-request-guidelines.html). - [X] I have added media to this PR or it does not require an ingame showcase. - [X] I can confirm this PR contains no AI-generated content, and did not use any AI-generated content. <!-- You should understand that not following the above may get your PR closed at maintainer’s discretion --> <!-- List any breaking changes, including namespaces, public class/method/field changes, prototype renames; and provide instructions for fixing them. This will be posted in #codebase-changes. --> **Changelog** <!-- Add a Changelog entry to make players aware of new features or changes that could affect gameplay. Make sure to read the guidelines and take this Changelog template out of the comment block in order for it to show up. Changelog must have a 🆑 symbol, so the bot recognizes the changes and adds them to the game's changelog. --> 🆑 - remove: Removed the alive Icon - You can finally see if someone is typing an answer. --------- Co-authored-by: TheDen-Bot <186991657+TheDen-Bot@users.noreply.github.com> * Fixes * Actually correct Comment --------- Co-authored-by: TheDen-Bot <186991657+TheDen-Bot@users.noreply.github.com>
110 lines
4.3 KiB
C#
110 lines
4.3 KiB
C#
using Content.Shared.Damage.Prototypes;
|
|
using Content.Shared.FixedPoint;
|
|
using Content.Shared.Mobs;
|
|
using Content.Shared.StatusIcon;
|
|
using Robust.Shared.GameStates;
|
|
using Robust.Shared.Prototypes;
|
|
using Robust.Shared.Serialization;
|
|
|
|
namespace Content.Shared.Damage
|
|
{
|
|
/// <summary>
|
|
/// Component that allows entities to take damage.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// The supported damage types are specified using a <see cref="DamageContainerPrototype"/>s. DamageContainers
|
|
/// may also have resistances to certain damage types, defined via a <see cref="DamageModifierSetPrototype"/>.
|
|
/// </remarks>
|
|
[RegisterComponent]
|
|
[NetworkedComponent]
|
|
[Access(typeof(DamageableSystem), Other = AccessPermissions.ReadExecute)]
|
|
public sealed partial class DamageableComponent : Component
|
|
{
|
|
/// <summary>
|
|
/// This <see cref="DamageContainerPrototype"/> specifies what damage types are supported by this component.
|
|
/// If null, all damage types will be supported.
|
|
/// </summary>
|
|
[DataField("damageContainer")]
|
|
public ProtoId<DamageContainerPrototype>? DamageContainerID;
|
|
|
|
/// <summary>
|
|
/// This <see cref="DamageModifierSetPrototype"/> will be applied to any damage that is dealt to this container,
|
|
/// unless the damage explicitly ignores resistances.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Though DamageModifierSets can be deserialized directly, we only want to use the prototype version here
|
|
/// to reduce duplication.
|
|
/// </remarks>
|
|
[DataField("damageModifierSet")]
|
|
public ProtoId<DamageModifierSetPrototype>? DamageModifierSetId;
|
|
|
|
/// <summary>
|
|
/// All the damage information is stored in this <see cref="DamageSpecifier"/>.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// If this data-field is specified, this allows damageable components to be initialized with non-zero damage.
|
|
/// </remarks>
|
|
[DataField(readOnly: true)] //todo remove this readonly when implementing writing to damagespecifier
|
|
public DamageSpecifier Damage = new();
|
|
|
|
/// <summary>
|
|
/// Damage, indexed by <see cref="DamageGroupPrototype"/> ID keys.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Groups which have no members that are supported by this component will not be present in this
|
|
/// dictionary.
|
|
/// </remarks>
|
|
[ViewVariables] public Dictionary<string, FixedPoint2> DamagePerGroup = new();
|
|
|
|
/// <summary>
|
|
/// The sum of all damages in the DamageableComponent.
|
|
/// </summary>
|
|
[ViewVariables]
|
|
public FixedPoint2 TotalDamage;
|
|
|
|
[DataField("radiationDamageTypes")]
|
|
public List<ProtoId<DamageTypePrototype>> RadiationDamageTypeIDs = new() { "Radiation" };
|
|
|
|
/// <summary>
|
|
/// Group types that affect the pain overlay.
|
|
/// </summary>
|
|
/// TODO: Add support for adding damage types specifically rather than whole damage groups
|
|
[DataField]
|
|
public List<ProtoId<DamageGroupPrototype>> PainDamageGroups = new() { "Brute", "Burn" };
|
|
|
|
[DataField]
|
|
public Dictionary<MobState, ProtoId<HealthIconPrototype>> HealthIcons = new()
|
|
{ // Den: Nuked Alive Icon so speech bubbles are visible
|
|
{ MobState.Critical, "HealthIconCritical" },
|
|
{ MobState.Dead, "HealthIconDead" },
|
|
};
|
|
|
|
[DataField]
|
|
public ProtoId<HealthIconPrototype> RottingIcon = "HealthIconRotting";
|
|
|
|
[DataField]
|
|
public FixedPoint2? HealthBarThreshold;
|
|
}
|
|
|
|
[Serializable, NetSerializable]
|
|
public sealed class DamageableComponentState : ComponentState
|
|
{
|
|
public readonly Dictionary<string, FixedPoint2> DamageDict;
|
|
public readonly string? DamageContainerId;
|
|
public readonly string? ModifierSetId;
|
|
public readonly FixedPoint2? HealthBarThreshold;
|
|
|
|
public DamageableComponentState(
|
|
Dictionary<string, FixedPoint2> damageDict,
|
|
string? damageContainerId,
|
|
string? modifierSetId,
|
|
FixedPoint2? healthBarThreshold)
|
|
{
|
|
DamageDict = damageDict;
|
|
DamageContainerId = damageContainerId;
|
|
ModifierSetId = modifierSetId;
|
|
HealthBarThreshold = healthBarThreshold;
|
|
}
|
|
}
|
|
}
|