using Content.Shared.Damage;
using Content.Shared.FixedPoint;
using Content.Shared.Nutrition.Components;
using Robust.Shared.Audio;
using Robust.Shared.Containers;
using Robust.Shared.GameStates;
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
namespace Content.Shared.Kitchen.Components;
///
/// Used to mark entity that should act as a spike.
///
[RegisterComponent, NetworkedComponent]
[AutoGenerateComponentState, AutoGenerateComponentPause]
[Access(typeof(SharedKitchenSpikeSystem))]
public sealed partial class KitchenSpikeComponent : Component
{
///
/// Default sound to play when the victim is hooked or unhooked.
///
private static readonly ProtoId DefaultSpike = new("Spike");
///
/// Default sound to play when the victim is butchered.
///
private static readonly ProtoId DefaultSpikeButcher = new("SpikeButcher");
///
/// ID of the container where the victim will be stored.
///
[DataField, AutoNetworkedField]
public string ContainerId = "body";
///
/// Container where the victim will be stored.
///
[ViewVariables]
public ContainerSlot BodyContainer = default!;
///
/// Sound to play when the victim is hooked or unhooked.
///
[DataField, AutoNetworkedField]
public SoundSpecifier SpikeSound = new SoundCollectionSpecifier(DefaultSpike);
///
/// Sound to play when the victim is butchered.
///
[DataField, AutoNetworkedField]
public SoundSpecifier ButcherSound = new SoundCollectionSpecifier(DefaultSpikeButcher);
///
/// Damage that will be applied to the victim when they are hooked or unhooked.
///
[DataField, AutoNetworkedField]
public DamageSpecifier SpikeDamage = new()
{
DamageDict = new Dictionary
{
{ "Piercing", 10 },
},
};
///
/// Damage that will be applied to the victim when they are butchered.
///
[DataField, AutoNetworkedField]
public DamageSpecifier ButcherDamage = new()
{
DamageDict = new Dictionary
{
{ "Slash", 20 },
},
};
///
/// Damage that the victim will receive over time.
///
[DataField, AutoNetworkedField]
public DamageSpecifier TimeDamage = new()
{
DamageDict = new Dictionary
{
{ "Blunt", 1 }, // Mobs are only gibbed from blunt (at least for now).
},
};
///
/// The next time when the damage will be applied to the victim.
///
[AutoPausedField, AutoNetworkedField]
[DataField(customTypeSerializer: typeof(TimeOffsetSerializer))]
public TimeSpan NextDamage;
///
/// How often the damage should be applied to the victim.
///
[DataField, AutoNetworkedField]
public TimeSpan DamageInterval = TimeSpan.FromSeconds(10);
///
/// Time that it will take to put the victim on the spike.
///
[DataField, AutoNetworkedField]
public TimeSpan HookDelay = TimeSpan.FromSeconds(7);
///
/// Time that it will take to put the victim off the spike.
///
[DataField, AutoNetworkedField]
public TimeSpan UnhookDelay = TimeSpan.FromSeconds(10);
///
/// Time that it will take to butcher the victim while they are alive.
///
///
/// This is summed up with a 's butcher delay in butcher DoAfter.
///
[DataField, AutoNetworkedField]
public TimeSpan ButcherDelayAlive = TimeSpan.FromSeconds(8);
///
/// Value by which the butchering delay will be multiplied if the victim is dead.
///
[DataField, AutoNetworkedField]
public float ButcherModifierDead = 0.5f;
}
[Serializable, NetSerializable]
public enum KitchenSpikeVisuals : byte
{
Status,
}
[Serializable, NetSerializable]
public enum KitchenSpikeStatus : byte
{
Empty,
Bloody, // TODO: Add sprites for different species.
}