mirror of
https://github.com/DeltaV-Station/Delta-v.git
synced 2026-10-07 06:47:25 +00:00
* Fix outdated component name in assaultbelt whitelist
RangedMagazine was replaced with BallisticAmmoProvider in the Gun
refactor (#8301)
* Move FlashOnTrigger, SmokeOnTrigger, Flash components to Shared
* Move LightReplacerComponent to Shared
* Move Utensil, Mousetrap components to Shared
* Move SprayPainterComponent to Shared
The PaintableAirlock tag has also been removed, as it was unused &
unnecessary, likely a vestige of spray painter development when the
PaintableAirlock component wasn't in Content.Shared.
* Add trivial Produce and Seed components to Client
This allows the plant bag and botanical belt whitelists to correctly
match produce and seeds on the client, fixing the extraneous "Can't
insert" message that previously appeared.
---------
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
(cherry picked from commit 9cd6e4dccd)
51 lines
1.4 KiB
C#
51 lines
1.4 KiB
C#
using Content.Shared.Nutrition.EntitySystems;
|
|
using Robust.Shared.Audio;
|
|
using Robust.Shared.GameStates;
|
|
|
|
namespace Content.Shared.Nutrition.Components
|
|
{
|
|
[RegisterComponent, NetworkedComponent, Access(typeof(SharedUtensilSystem))]
|
|
public sealed partial class UtensilComponent : Component
|
|
{
|
|
[DataField("types")]
|
|
private UtensilType _types = UtensilType.None;
|
|
|
|
[ViewVariables]
|
|
public UtensilType Types
|
|
{
|
|
get => _types;
|
|
set
|
|
{
|
|
if (_types.Equals(value))
|
|
return;
|
|
|
|
_types = value;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// The chance that the utensil has to break with each use.
|
|
/// A value of 0 means that it is unbreakable.
|
|
/// </summary>
|
|
[DataField("breakChance")]
|
|
public float BreakChance;
|
|
|
|
/// <summary>
|
|
/// The sound to be played if the utensil breaks.
|
|
/// </summary>
|
|
[DataField("breakSound")]
|
|
public SoundSpecifier BreakSound = new SoundPathSpecifier("/Audio/Items/snap.ogg");
|
|
}
|
|
|
|
// If you want to make a fancy output on "wrong" composite utensil use (like: you need fork and knife)
|
|
// There should be Dictionary I guess (Dictionary<UtensilType, string>)
|
|
[Flags]
|
|
public enum UtensilType : byte
|
|
{
|
|
None = 0,
|
|
Fork = 1,
|
|
Spoon = 1 << 1,
|
|
Knife = 1 << 2
|
|
}
|
|
}
|