2024-08-29 20:23:33 +05:00
|
|
|
/*
|
|
|
|
|
* This file is sublicensed under MIT License
|
|
|
|
|
* https://github.com/space-wizards/space-station-14/blob/master/LICENSE.TXT
|
|
|
|
|
*/
|
|
|
|
|
|
2024-07-22 12:16:32 +03:00
|
|
|
using Content.Shared._CP14.Workbench.Prototypes;
|
2024-09-28 01:29:02 +03:00
|
|
|
using Content.Shared.Tag;
|
2024-07-23 10:29:41 +03:00
|
|
|
using Robust.Shared.Audio;
|
2024-07-22 12:16:32 +03:00
|
|
|
using Robust.Shared.Prototypes;
|
|
|
|
|
|
|
|
|
|
namespace Content.Server._CP14.Workbench;
|
|
|
|
|
|
2024-08-19 18:39:47 +03:00
|
|
|
/// <summary>
|
|
|
|
|
/// This entity can be used to craft other objects through the interface
|
|
|
|
|
/// </summary>
|
2024-07-22 12:16:32 +03:00
|
|
|
[RegisterComponent]
|
|
|
|
|
[Access(typeof(CP14WorkbenchSystem))]
|
|
|
|
|
public sealed partial class CP14WorkbenchComponent : Component
|
|
|
|
|
{
|
2024-08-19 18:39:47 +03:00
|
|
|
/// <summary>
|
|
|
|
|
/// Crafting speed modifier on this workbench.
|
|
|
|
|
/// </summary>
|
2024-07-22 12:16:32 +03:00
|
|
|
[DataField]
|
|
|
|
|
public float CraftSpeed = 1f;
|
|
|
|
|
|
2024-09-28 01:29:02 +03:00
|
|
|
[DataField]
|
|
|
|
|
public float WorkbenchRadius = 0.5f;
|
|
|
|
|
|
2024-08-19 18:39:47 +03:00
|
|
|
/// <summary>
|
|
|
|
|
/// List of recipes available for crafting on this type of workbench
|
|
|
|
|
/// </summary>
|
2024-07-22 12:16:32 +03:00
|
|
|
[DataField]
|
|
|
|
|
public List<ProtoId<CP14WorkbenchRecipePrototype>> Recipes = new();
|
2024-07-23 10:29:41 +03:00
|
|
|
|
2024-09-28 01:29:02 +03:00
|
|
|
/// <summary>
|
|
|
|
|
/// Auto recipe list fill based on tags
|
|
|
|
|
/// </summary>
|
|
|
|
|
[DataField]
|
|
|
|
|
public List<ProtoId<TagPrototype>> RecipeTags = new();
|
|
|
|
|
|
2024-08-19 18:39:47 +03:00
|
|
|
/// <summary>
|
|
|
|
|
/// Played during crafting. Can be overwritten by the crafting sound of a specific recipe.
|
|
|
|
|
/// </summary>
|
2024-07-23 10:29:41 +03:00
|
|
|
[DataField]
|
|
|
|
|
public SoundSpecifier CraftSound = new SoundCollectionSpecifier("CP14Hammering");
|
2024-07-22 12:16:32 +03:00
|
|
|
}
|