| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- 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;
- /// <summary>
- /// 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?
- /// </summary>
- [RegisterComponent, NetworkedComponent, Access(typeof(SharedSericultureSystem)), AutoGenerateComponentState]
- public sealed partial class SericultureComponent : Component
- {
- /// <summary>
- /// The text that pops up whenever sericulture fails for not having enough hunger.
- /// </summary>
- [DataField("popupText")]
- [ViewVariables(VVAccess.ReadWrite)]
- [AutoNetworkedField]
- public string PopupText = "sericulture-failure-hunger";
- /// <summary>
- /// What will be produced at the end of the action.
- /// </summary>
- [DataField(required: true)]
- [ViewVariables(VVAccess.ReadWrite)]
- [AutoNetworkedField]
- public EntProtoId EntityProduced;
- /// <summary>
- /// The entity needed to actually preform sericulture. This will be granted (and removed) upon the entity's creation.
- /// </summary>
- [DataField(required: true)]
- [ViewVariables(VVAccess.ReadWrite)]
- [AutoNetworkedField]
- public EntProtoId Action;
- [AutoNetworkedField]
- [DataField("actionEntity")]
- public EntityUid? ActionEntity;
- /// <summary>
- /// How long will it take to make.
- /// </summary>
- [DataField("productionLength")]
- [ViewVariables(VVAccess.ReadWrite)]
- [AutoNetworkedField]
- public float ProductionLength = 3f;
- /// <summary>
- /// This will subtract (not add, don't get this mixed up) from the current hunger of the mob doing sericulture.
- /// </summary>
- [DataField("hungerCost")]
- [ViewVariables(VVAccess.ReadWrite)]
- [AutoNetworkedField]
- public float HungerCost = 5f;
- /// <summary>
- /// The lowest hunger threshold that this mob can be in before it's allowed to spin silk.
- /// </summary>
- [DataField("minHungerThreshold")]
- [ViewVariables(VVAccess.ReadWrite)]
- [AutoNetworkedField]
- public HungerThreshold MinHungerThreshold = HungerThreshold.Okay;
- }
|