Emergency tank: 4 minutes (down from 12) Extended Etank: 9 minutes (down from 37) Double Etank : 15 minutes (down from 62) Full tank : 31 minutes (down from 94) This will make it so EVA crews actually need to watch their pressure if they spend significant time outside the station, and/or have a canister in their general vicinity. Emergency tanks can no longer be used on timescales that far exceed escaping an emergency situation, but will probably be insufficient in extended emergencies, where access to canisters will now be much more important. How well this works in practice will have to be carefully watched.
60 lines
1.9 KiB
C#
60 lines
1.9 KiB
C#
using Content.Shared.Tools;
|
|
using Robust.Shared.GameStates;
|
|
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
|
|
|
|
namespace Content.Shared.PneumaticCannon;
|
|
|
|
/// <summary>
|
|
/// Handles gas powered guns--cancels shooting if no gas is available, and takes gas from the given container slot.
|
|
/// </summary>
|
|
[RegisterComponent, NetworkedComponent]
|
|
public sealed class PneumaticCannonComponent : Component
|
|
{
|
|
public const string TankSlotId = "gas_tank";
|
|
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
|
public PneumaticCannonPower Power = PneumaticCannonPower.Medium;
|
|
|
|
[DataField("toolModifyPower", customTypeSerializer:typeof(PrototypeIdSerializer<ToolQualityPrototype>))]
|
|
public string ToolModifyPower = "Anchoring";
|
|
|
|
/// <summary>
|
|
/// How long to stun for if they shoot the pneumatic cannon at high power.
|
|
/// </summary>
|
|
[DataField("highPowerStunTime")]
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
|
public float HighPowerStunTime = 3.0f;
|
|
|
|
/// <summary>
|
|
/// Amount of moles to consume for each shot at any power.
|
|
/// </summary>
|
|
[DataField("gasUsage")]
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
|
public float GasUsage = 0.142f;
|
|
|
|
/// <summary>
|
|
/// Base projectile speed at default power.
|
|
/// </summary>
|
|
[DataField("baseProjectileSpeed")]
|
|
public float BaseProjectileSpeed = 20f;
|
|
|
|
/// <summary>
|
|
/// If true, will throw ammo rather than shoot it.
|
|
/// </summary>
|
|
[DataField("throwItems"), ViewVariables(VVAccess.ReadWrite)]
|
|
public bool ThrowItems = true;
|
|
}
|
|
|
|
/// <summary>
|
|
/// How strong the pneumatic cannon should be.
|
|
/// Each tier throws items farther and with more speed, but has drawbacks.
|
|
/// The highest power knocks the player down for a considerable amount of time.
|
|
/// </summary>
|
|
public enum PneumaticCannonPower : byte
|
|
{
|
|
Low = 0,
|
|
Medium = 1,
|
|
High = 2,
|
|
Len = 3 // used for length calc
|
|
}
|