Files
tbd-station-14/Content.Shared/Paint/PaintComponent.cs
brainfood1183 e4d5e7f1ae Spray Paint (Review Ready) (#23003)
* Spray Paint (Draft)

* paint colors, paints in maints loot, cargo crate of paints.

* fix

* remove paint (sort of)

* moved paintcleaner into own system

* Moved paint to server (had to unfortunately)

* doafter now breaks when moving away.

* cant paint mobstatecomp

* loads of fixes

* fixes

* fixes

* nopaintshadercomp

* fixes

* fix

* use locale for paint remove string

* remove nopaintshadercomponent and use blacklist

* remove enabled.true from visualizer

* paint doafter event.

* add verbs for paint and remove paint and icon for paint verb.

* fixes

* no longer replaces shader when shader exists.

* replace forloop with foreach, check shader before adding and removing.

* paint doafter now separate so no copy paste code

* Entities in sprayed targets item slots are also now correctly sprayed.

* fix

* fix

* fix airlock psray painter now removes painted before painting door.

* spray paints now use openablecomponent.

* fix

* fix damn accesstypes.

* fix

* fix
2024-03-18 15:29:48 -06:00

61 lines
1.7 KiB
C#

using Content.Shared.Chemistry.Reagent;
using Content.Shared.FixedPoint;
using Robust.Shared.Audio;
using Content.Shared.Whitelist;
using Robust.Shared.Prototypes;
using Robust.Shared.GameStates;
namespace Content.Shared.Paint;
/// <summary>
/// Entity when used on another entity will paint target entity.
/// </summary>
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
[Access(typeof(SharedPaintSystem))]
public sealed partial class PaintComponent : Component
{
/// <summary>
/// Noise made when paint applied.
/// </summary>
[DataField]
public SoundSpecifier Spray = new SoundPathSpecifier("/Audio/Effects/spray2.ogg");
/// <summary>
/// Solution on the entity that contains the paint.
/// </summary>
[DataField]
public string Solution = "drink";
/// <summary>
/// How long the doafter will take.
/// </summary>
[DataField]
public int Delay = 2;
/// <summary>
/// Reagent that will be used as paint.
/// </summary>
[DataField, AutoNetworkedField]
public ProtoId<ReagentPrototype> Reagent = "SpaceGlue";
/// <summary>
/// Color that the painting entity will instruct the painted entity to be.
/// </summary>
[DataField, AutoNetworkedField]
public Color Color = Color.FromHex("#c62121");
[DataField, ViewVariables(VVAccess.ReadWrite)]
public EntityWhitelist? Blacklist;
/// <summary>
/// Reagent consumption per use.
/// </summary>
[DataField]
public FixedPoint2 ConsumptionUnit = FixedPoint2.New(5);
/// <summary>
/// Duration per unit
/// </summary>
[DataField]
public TimeSpan DurationPerUnit = TimeSpan.FromSeconds(6);
}