using Content.Shared.FixedPoint; using Robust.Shared.GameStates; using Robust.Shared.Map; using Robust.Shared.Serialization; namespace Content.Shared._RMC14.Projectiles; [RegisterComponent, NetworkedComponent, AutoGenerateComponentState] [Access(typeof(RMCProjectileSystem))] public sealed partial class RMCProjectileDamageFalloffComponent : Component { /// /// This lists all the thresholds and their falloff values. /// [DataField, AutoNetworkedField] public List Thresholds = new() { new DamageFalloffThreshold(0f, 1, false), new DamageFalloffThreshold(22f, 9999, true) }; /// /// This determines the minimum fraction of the projectile's original damage that must remain after falloff is applied. /// [DataField, AutoNetworkedField] public FixedPoint2 MinRemainingDamageMult = 0.05f; /// /// This is the additional falloff multiplier applied by the firing weapon. /// [DataField, AutoNetworkedField] public FixedPoint2 WeaponMult = 1; /// /// These are the coordinates from which the projectile was shot. Used to determine the distance travelled. /// [DataField, AutoNetworkedField] public EntityCoordinates? ShotFrom; } [DataRecord, Serializable, NetSerializable] public record struct DamageFalloffThreshold( /// /// The range at which falloff starts to take effect. /// Conversion from 13: effective_range_max /// float Range, /// /// This is the number by which the projectile's damage is decreased for each tile travelled beyond its effective range. /// Conversion from 13: damage_falloff /// FixedPoint2 Falloff, /// /// This makes this falloff value ignore the firing weapon's falloff multiplier. Used primarily to simulate having a capped maximum range. Should generally be false. /// bool IgnoreModifiers );