Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor felinid/chitinid item coughing #2790

Merged
merged 7 commits into from
Jan 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Content.Client/_DV/Abilities/Felinid/FelinidSystem.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
using Content.Shared._DV.Abilities.Felinid;

namespace Content.Shared._DV.Abilities.Felinid;

public sealed class FelinidSystem : SharedFelinidSystem;
2 changes: 1 addition & 1 deletion Content.Server/Chemistry/EntitySystems/InjectorSystem.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Content.Server.Abilities.Chitinid;
using Content.Server.Body.Components;
using Content.Server.Body.Systems;
using Content.Shared._DV.Chemistry.Components; // DeltaV
using Content.Shared.Chemistry;
using Content.Shared.Chemistry.Components;
using Content.Shared.Chemistry.Components.SolutionManager;
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

195 changes: 0 additions & 195 deletions Content.Server/Nyanotrasen/Abilities/Felinid/FelinidSystem.cs

This file was deleted.

This file was deleted.

This file was deleted.

32 changes: 17 additions & 15 deletions Content.Server/_DV/Abilities/Chitinid/ChitinidComponent.cs
Original file line number Diff line number Diff line change
@@ -1,26 +1,30 @@
using Content.Shared.Damage;
using Content.Shared.Damage.Prototypes;
using Content.Shared.FixedPoint;
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;

namespace Content.Server.Abilities.Chitinid;
namespace Content.Server._DV.Abilities.Chitinid;

[RegisterComponent]
/// <summary>
/// Passively heals radiation up to a limit, which then uses <c>ItemCougherComponent</c> to cough up Chitzite.
/// After that it will heal radiation damage again.
/// </summary>
[RegisterComponent, Access(typeof(ChitinidSystem))]
[AutoGenerateComponentPause]
public sealed partial class ChitinidComponent : Component
{
[DataField]
public EntProtoId ChitzitePrototype = "Chitzite";

[DataField]
public EntProtoId ChitziteActionId = "ActionChitzite";

[DataField]
public EntityUid? ChitziteAction;
public FixedPoint2 AmountAbsorbed = 0f;

/// <summary>
/// Once this much damage is absorbed, it will stop healing and require you to cough up chitzite.
/// </summary>
[DataField]
public FixedPoint2 AmountAbsorbed = 0f;
public FixedPoint2 MaximumAbsorbed = 30f;

/// <summary>
/// What damage is healed, by adding, every <see cref="UpdateInterval"/>.
/// This must be negative.
/// </summary>
[DataField]
public DamageSpecifier Healing = new()
{
Expand All @@ -30,12 +34,10 @@ public sealed partial class ChitinidComponent : Component
}
};

[DataField]
public FixedPoint2 MaximumAbsorbed = 30f;

[DataField]
public TimeSpan UpdateInterval = TimeSpan.FromSeconds(1);

[DataField(customTypeSerializer: typeof(TimeOffsetSerializer))]
[AutoPausedField]
public TimeSpan NextUpdate;
}
Loading
Loading