mirror of
https://github.com/space-syndicate/space-station-14.git
synced 2026-10-10 02:41:18 +03:00
* Allow projectile spells to set velocity inheritance * dot product suggestions * finish the damn comment * little cleanup, a few comments, use the coeff * magic system cleanup * no default for structs --------- Co-authored-by: themias <themias5@gmail.com>
29 lines
847 B
C#
29 lines
847 B
C#
using Content.Shared.Actions;
|
|
using Robust.Shared.Prototypes;
|
|
|
|
namespace Content.Shared.Magic.Events;
|
|
|
|
public sealed partial class ProjectileSpellEvent : WorldTargetActionEvent
|
|
{
|
|
/// <summary>
|
|
/// What entity should be spawned.
|
|
/// </summary>
|
|
[DataField(required: true)]
|
|
public EntProtoId Prototype;
|
|
|
|
/// <summary>
|
|
/// How fast the projectile should travel
|
|
/// </summary>
|
|
[DataField]
|
|
public float ProjectileSpeed = 25f;
|
|
|
|
/// <summary>
|
|
/// A coefficient to adjust velocity by when shooting the opposite way you're moving.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Useful for slow projectiles to prevent them from feeling sluggish.
|
|
/// A value of 0.5 increases projectile speed by 50% if shot directly behind you.
|
|
/// </remarks>
|
|
[DataField]
|
|
public float RearVelocityCompensation;
|
|
}
|