Merge remote-tracking branch 'upstream/master' into upstream
# Conflicts: # Content.Server/Body/Components/BloodstreamComponent.cs # Content.Server/Chemistry/EntitySystems/ChemistrySystem.cs # Resources/Prototypes/Entities/Objects/Specific/Medical/hypospray.yml # Resources/Prototypes/Entities/Structures/Machines/lathe.yml # Resources/Textures/Clothing/OuterClothing/Coats/labcoat.rsi/open-inhand-left.png # Resources/Textures/Clothing/OuterClothing/Coats/labcoat.rsi/open-inhand-right.png # Resources/Textures/Clothing/OuterClothing/Coats/labcoat_chem.rsi/open-inhand-left.png # Resources/Textures/Clothing/OuterClothing/Coats/labcoat_chem.rsi/open-inhand-right.png # Resources/Textures/Clothing/OuterClothing/Coats/labcoat_gene.rsi/open-inhand-left.png # Resources/Textures/Clothing/OuterClothing/Coats/labcoat_gene.rsi/open-inhand-right.png # Resources/Textures/Clothing/OuterClothing/Coats/labcoat_robo.rsi/open-inhand-left.png # Resources/Textures/Clothing/OuterClothing/Coats/labcoat_robo.rsi/open-inhand-right.png # Resources/Textures/Clothing/OuterClothing/Coats/labcoat_viro.rsi/open-inhand-left.png # Resources/Textures/Clothing/OuterClothing/Coats/labcoat_viro.rsi/open-inhand-right.png # Resources/Textures/Clothing/OuterClothing/Coats/rndcoat.rsi/open-inhand-left.png # Resources/Textures/Clothing/OuterClothing/Coats/rndcoat.rsi/open-inhand-right.png # Resources/Textures/Clothing/OuterClothing/Hardsuits/evaprisoner.rsi/open-inhand-left.png # Resources/Textures/Clothing/OuterClothing/Hardsuits/evaprisoner.rsi/open-inhand-right.png
This commit is contained in:
33
Content.Shared/Chemistry/Components/HyposprayComponent.cs
Normal file
33
Content.Shared/Chemistry/Components/HyposprayComponent.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
using Content.Shared.FixedPoint;
|
||||
using Robust.Shared.GameStates;
|
||||
using Robust.Shared.Serialization;
|
||||
using Robust.Shared.Audio;
|
||||
|
||||
namespace Content.Shared.Chemistry.Components;
|
||||
|
||||
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
|
||||
public sealed partial class HyposprayComponent : Component
|
||||
{
|
||||
[DataField]
|
||||
public string SolutionName = "hypospray";
|
||||
|
||||
// TODO: This should be on clumsycomponent.
|
||||
[DataField]
|
||||
[ViewVariables(VVAccess.ReadWrite)]
|
||||
public float ClumsyFailChance = 0.5f;
|
||||
|
||||
[DataField]
|
||||
[ViewVariables(VVAccess.ReadWrite)]
|
||||
public FixedPoint2 TransferAmount = FixedPoint2.New(5);
|
||||
|
||||
[DataField]
|
||||
public SoundSpecifier InjectSound = new SoundPathSpecifier("/Audio/Items/hypospray.ogg");
|
||||
|
||||
/// <summary>
|
||||
/// Decides whether you can inject everything or just mobs.
|
||||
/// When you can only affect mobs, you're capable of drawing from beakers.
|
||||
/// </summary>
|
||||
[AutoNetworkedField]
|
||||
[DataField(required: true)]
|
||||
public bool OnlyAffectsMobs = false;
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
using Content.Shared.FixedPoint;
|
||||
using Robust.Shared.GameStates;
|
||||
using Robust.Shared.Serialization;
|
||||
|
||||
namespace Content.Shared.Chemistry.Components;
|
||||
|
||||
[NetworkedComponent()]
|
||||
public abstract partial class SharedHyposprayComponent : Component
|
||||
{
|
||||
[DataField("solutionName")]
|
||||
public string SolutionName = "hypospray";
|
||||
}
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
public sealed class HyposprayComponentState : ComponentState
|
||||
{
|
||||
public FixedPoint2 CurVolume { get; }
|
||||
public FixedPoint2 MaxVolume { get; }
|
||||
|
||||
public HyposprayComponentState(FixedPoint2 curVolume, FixedPoint2 maxVolume)
|
||||
{
|
||||
CurVolume = curVolume;
|
||||
MaxVolume = maxVolume;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user