using Content.Shared.Nutrition.Components;
using Robust.Shared.GameStates;
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
namespace Content.Shared.Sericulture;
///
/// Should be applied to any mob that you want to be able to produce any material with an action and the cost of hunger.
/// TODO: Probably adjust this to utilize organs?
///
[RegisterComponent, NetworkedComponent, Access(typeof(SharedSericultureSystem)), AutoGenerateComponentState]
public sealed partial class SericultureComponent : Component
{
///
/// The text that pops up whenever sericulture fails for not having enough hunger.
///
[DataField("popupText")]
[ViewVariables(VVAccess.ReadWrite)]
[AutoNetworkedField]
public string PopupText = "sericulture-failure-hunger";
///
/// What will be produced at the end of the action.
///
[DataField(required: true)]
[ViewVariables(VVAccess.ReadWrite)]
[AutoNetworkedField]
public EntProtoId EntityProduced;
///
/// The entity needed to actually preform sericulture. This will be granted (and removed) upon the entity's creation.
///
[DataField]
[ViewVariables(VVAccess.ReadWrite)]
[AutoNetworkedField]
public EntProtoId Action = "ActionSericulture";
[AutoNetworkedField]
[DataField("actionEntity")]
public EntityUid? ActionEntity;
///
/// How long will it take to make.
///
[DataField("productionLength")]
[ViewVariables(VVAccess.ReadWrite)]
[AutoNetworkedField]
public float ProductionLength = 3f;
///
/// This will subtract (not add, don't get this mixed up) from the current hunger of the mob doing sericulture.
///
[DataField("hungerCost")]
[ViewVariables(VVAccess.ReadWrite)]
[AutoNetworkedField]
public float HungerCost = 5f;
///
/// The lowest hunger threshold that this mob can be in before it's allowed to spin silk.
///
[DataField("minHungerThreshold")]
[ViewVariables(VVAccess.ReadWrite)]
[AutoNetworkedField]
public HungerThreshold MinHungerThreshold = HungerThreshold.Okay;
}