fishops nerf real (#25148)

* refactor ops

* inherit dna and fiber when fish hydrated

* :trollface:

* kid named finger

* :trollface:

* move rehydrating to shared :trollface:

* nobody noticed the popup being missing all this time

* method ops

---------

Co-authored-by: deltanedas <@deltanedas:kde.org>
This commit is contained in:
deltanedas
2024-03-05 03:13:50 +00:00
committed by GitHub
parent 5a77e523c1
commit 550612a37f
4 changed files with 51 additions and 23 deletions

View File

@@ -1,39 +0,0 @@
using Content.Server.Chemistry.EntitySystems;
using Content.Shared.Chemistry.Reagent;
using Content.Shared.FixedPoint;
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
namespace Content.Server.Chemistry.Components;
/// <summary>
/// Basically, monkey cubes.
/// But specifically, this component deletes the entity and spawns in a new entity when the entity is exposed to a certain amount of a given reagent.
/// </summary>
[RegisterComponent, Access(typeof(RehydratableSystem))]
public sealed partial class RehydratableComponent : Component
{
/// <summary>
/// The reagent that must be present to count as hydrated.
/// </summary>
[DataField("catalyst", customTypeSerializer: typeof(PrototypeIdSerializer<ReagentPrototype>)), ViewVariables(VVAccess.ReadWrite)]
public string CatalystPrototype = "Water";
/// <summary>
/// The minimum amount of catalyst that must be present to be hydrated.
/// </summary>
[DataField("catalystMinimum"), ViewVariables(VVAccess.ReadWrite)]
public FixedPoint2 CatalystMinimum = FixedPoint2.Zero;
/// <summary>
/// The entity to create when hydrated.
/// </summary>
[DataField("possibleSpawns"), ViewVariables(VVAccess.ReadWrite)]
public List<string> PossibleSpawns = new();
}
/// <summary>
/// Raised on the rehydrated entity with target being the new entity it became.
/// </summary>
[ByRefEvent]
public readonly record struct GotRehydratedEvent(EntityUid Target);