/*
* This file is sublicensed under MIT License
* https://github.com/space-wizards/space-station-14/blob/master/LICENSE.TXT
*/
using JetBrains.Annotations;
using Robust.Shared.Prototypes;
using Robust.Shared.Utility;
namespace Content.Shared._CP14.Workbench;
[ImplicitDataDefinitionForInheritors]
[MeansImplicitUse]
public abstract partial class CP14WorkbenchCraftRequirement
{
///
/// Here a check is made that the recipe as a whole can be fulfilled at the current moment. Do not add anything that affects gameplay here, and only perform checks here.
///
///
public abstract bool CheckRequirement(IEntityManager entManager,
IPrototypeManager protoManager,
HashSet placedEntities);
///
/// An event that is triggered after crafting. This is the place to put important things like removing items, spending stacks or other things.
///
public virtual void PostCraft(IEntityManager entManager,
IPrototypeManager protoManager,
HashSet placedEntities)
{
}
public virtual double GetPrice(IEntityManager entManager,
IPrototypeManager protoManager)
{
return 0;
}
///
/// This text will be displayed in the description of the craft recipe. Write something like ‘Wooden planks: х10’ here
///
public virtual string GetRequirementTitle(IPrototypeManager protoManager)
{
return string.Empty;
}
///
/// You can specify an icon generated from an entity. It will support layering, colour changes and other layer options. Return null to disable.
///
public virtual EntityPrototype? GetRequirementEntityView(IPrototypeManager protoManager)
{
return null;
}
///
/// You can specify the texture directly. Return null to disable.
///
public virtual SpriteSpecifier? GetRequirementTexture(IPrototypeManager protoManager)
{
return null;
}
///
/// Optional, allows you to repaint the icon.
///
public virtual Color GetRequirementColor(IPrototypeManager protoManager)
{
return Color.White;
}
}