using Content.Shared.Chemistry.Reagent; using Content.Shared.Whitelist; using Robust.Shared.Audio; using Robust.Shared.Containers; using Robust.Shared.GameStates; using Robust.Shared.Prototypes; using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype; namespace Content.Shared.Devour.Components; [RegisterComponent, NetworkedComponent] [Access(typeof(SharedDevourSystem))] public sealed partial class DevourerComponent : Component { [DataField(customTypeSerializer: typeof(PrototypeIdSerializer))] public string? DevourAction = "ActionDevour"; [DataField] public EntityUid? DevourActionEntity; [DataField] public SoundSpecifier? SoundDevour = new SoundPathSpecifier("/Audio/Effects/demon_consume.ogg") { Params = AudioParams.Default.WithVolume(-3f), }; [DataField] public float DevourTime = 3f; /// /// The amount of time it takes to devour something /// /// NOTE: original intended design was to increase this proportionally with damage thresholds, but those proved quite difficult to get consistently. right now it devours the structure at a fixed timer. /// /// [DataField] public float StructureDevourTime = 10f; [DataField] public SoundSpecifier? SoundStructureDevour = new SoundPathSpecifier("/Audio/Machines/airlock_creaking.ogg") { Params = AudioParams.Default.WithVolume(-3f), }; /// /// Where the entities go when it devours them, empties when it is butchered. /// public Container Stomach = default!; /// /// Determines what things the devourer can consume. /// [DataField] public EntityWhitelist? Whitelist = new() { Components = new[] { "MobState", } }; /// /// Determines what things end up in the dragon's stomach if they eat it. /// If it isn't in the whitelist, it's deleted. /// [DataField] public EntityWhitelist? StomachStorageWhitelist; /// /// Determine's the dragon's food preference. If the eaten thing matches, /// it is rewarded with the reward chemical. If null, all food is fine. /// [DataField] public EntityWhitelist? FoodPreferenceWhitelist; /// /// The chemical ID injected upon devouring /// [DataField(customTypeSerializer: typeof(PrototypeIdSerializer))] public string Chemical = "Ichor"; /// /// The amount of ichor injected per devour /// [DataField] public float HealRate = 15f; }