Files
tbd-station-14/Content.Server/GameObjects/Components/Weapon/Melee/MeleeChemicalInjectorComponent.cs
mirrorcult f744b655b8 Refactor MeleeWeaponComponent and related comps to be ECS (#4133)
* move everything to MeleeWeaponSystem

* refactor MeleeChemicalInjector

* hypospray and flash refactor

* stunbaton refactor

* bugfixes

* flash afterinteract

* resolve issues

* props

* playing the slots

* MeleeInteractEvent + bugfixes

* spear can actually use MeleeChemicalInjector
2021-06-05 09:20:52 +02:00

25 lines
820 B
C#

using Content.Shared.Chemistry;
using Robust.Shared.GameObjects;
using Robust.Shared.ViewVariables;
using System;
using Robust.Shared.Serialization.Manager.Attributes;
namespace Content.Server.GameObjects.Components.Weapon.Melee
{
[RegisterComponent]
public class MeleeChemicalInjectorComponent : Component
{
public override string Name => "MeleeChemicalInjector";
[ViewVariables(VVAccess.ReadWrite)]
[DataField("transferAmount")]
public ReagentUnit TransferAmount { get; set; } = ReagentUnit.New(1);
[ViewVariables(VVAccess.ReadWrite)]
public float TransferEfficiency { get => _transferEfficiency; set => _transferEfficiency = Math.Clamp(value, 0, 1); }
[DataField("transferEfficiency")]
private float _transferEfficiency = 1f;
}
}