fix emagged lathes (#23318)

* implement

* pass uid

* fix

* fix dementia

* event implementation

* fix
This commit is contained in:
Ilya246
2024-01-02 11:11:13 +04:00
committed by GitHub
parent 9b36232e3b
commit 49dbbc5721
3 changed files with 18 additions and 17 deletions

View File

@@ -1,25 +1,23 @@
using Content.Shared.Research.Prototypes;
using Robust.Shared.GameStates;
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.List;
namespace Content.Shared.Lathe
{
[RegisterComponent, NetworkedComponent]
[AutoGenerateComponentState]
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
public sealed partial class EmagLatheRecipesComponent : Component
{
/// <summary>
/// All of the dynamic recipes that the lathe is capable to get using EMAG
/// </summary>
[DataField("emagDynamicRecipes", customTypeSerializer: typeof(PrototypeIdListSerializer<LatheRecipePrototype>))]
[AutoNetworkedField]
public List<string> EmagDynamicRecipes = new();
[DataField, AutoNetworkedField]
public List<ProtoId<LatheRecipePrototype>> EmagDynamicRecipes = new();
/// <summary>
/// All of the static recipes that the lathe is capable to get using EMAG
/// </summary>
[DataField("emagStaticRecipes", customTypeSerializer: typeof(PrototypeIdListSerializer<LatheRecipePrototype>))]
[AutoNetworkedField]
public List<string> EmagStaticRecipes = new();
[DataField, AutoNetworkedField]
public List<ProtoId<LatheRecipePrototype>> EmagStaticRecipes = new();
}
}

View File

@@ -68,11 +68,14 @@ namespace Content.Shared.Lathe
{
public readonly EntityUid Lathe;
public bool getUnavailable;
public List<ProtoId<LatheRecipePrototype>> Recipes = new();
public LatheGetRecipesEvent(EntityUid lathe)
public LatheGetRecipesEvent(EntityUid lathe, bool forced)
{
Lathe = lathe;
getUnavailable = forced;
}
}