Ice anomaly (#15925)

Co-authored-by: Nemanja <98561806+EmoGarbage404@users.noreply.github.com>
This commit is contained in:
ThunderBear2006
2023-05-03 14:37:33 -04:00
committed by GitHub
parent d52184a561
commit 8951b9f26a
18 changed files with 472 additions and 65 deletions

View File

@@ -0,0 +1,38 @@
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
namespace Content.Server.Anomaly.Components;
[RegisterComponent]
public sealed class ProjectileAnomalyComponent : Component
{
/// <sumarry>
/// The prototype of the projectile that will be shot when the anomaly pulses
/// </summary>
[DataField("projectilePrototype", required: true, customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>))]
public string ProjectilePrototype = default!;
/// <summary>
/// The MAXIMUM speed <see cref="ProjectilePrototype"/> can travel
/// </summary>
[DataField("maxProjectileSpeed")]
public float MaxProjectileSpeed = 30f;
/// <summary>
/// The MAXIMUM number of projectiles shot per pulse
/// </summary>
[DataField("maxProjectiles")]
public int MaxProjectiles = 5;
/// <summary>
/// The MAXIMUM range for targeting entities
/// </summary>
[DataField("projectileRange")]
public float ProjectileRange = 50f;
/// <summary>
/// Chance that a non sentient entity will be targeted, value must be between 0.0-1.0
/// </summary>
[DataField("targetNonSentientChance")]
public float TargetNonSentientChance = 0.5f;
}