Files
wwdpublic/Content.Shared/Projectiles/EmbeddableProjectileComponent.cs
Kai5 091a8ff433 [GoobPort] WIZ REAL (#465)
* Уэээээээ

* Почти настрадались

* Скоро конец....

* СКОРО

* Мышки плакали, кололись, но продолжали упорно жрать кактус

* Все ближе!

* Это такой конец?

* Книжка говна

* фиксики

* ОНО ЖИВОЕ

* Телепорт

* разное

* Added byond

* ивенты теперь работают

* Разфикс телепорта

* Свет мой зеркальце скажи, да всю правду доложи - Я ль робастней всех на свете?

* Разное

* Еще многа всего

* Многа разнава

* Скоро конец....

* ЭТО КОНЕЦ

* Фикс линтера (ну, или я на это надеюсь)

* Еще один фикс линтера

* Победа!

* фиксики

* пу пу пу

* Фикс подмастерья

* Мисклик

* Высокочастотный меч

* Неймспейсы

* Пул способностей мага
2025-04-26 10:18:58 +03:00

93 lines
3.0 KiB
C#

using Content.Shared._Shitmed.Targeting;
using System.Numerics;
using Content.Shared.Damage;
using Robust.Shared.Audio;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
using Robust.Shared.GameStates;
namespace Content.Shared.Projectiles;
/// <summary>
/// Embeds this entity inside of the hit target.
/// </summary>
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
public sealed partial class EmbeddableProjectileComponent : Component
{
/// <summary>
/// Minimum speed of the projectile to embed.
/// </summary>
[ViewVariables(VVAccess.ReadWrite), DataField, AutoNetworkedField]
public float MinimumSpeed = 5f;
/// <summary>
/// Delete the entity on embedded removal?
/// Does nothing if there's no RemovalTime.
/// </summary>
[ViewVariables(VVAccess.ReadWrite), DataField, AutoNetworkedField]
public bool DeleteOnRemove;
/// <summary>
/// How long it takes to remove the embedded object.
/// </summary>
[ViewVariables(VVAccess.ReadWrite), DataField, AutoNetworkedField]
public float? RemovalTime = 5f;
/// <summary>
/// Whether this entity will embed when thrown, or only when shot as a projectile.
/// </summary>
[ViewVariables(VVAccess.ReadWrite), DataField, AutoNetworkedField]
public bool EmbedOnThrow = true;
/// <summary>
/// How far into the entity should we offset (0 is wherever we collided).
/// </summary>
[ViewVariables(VVAccess.ReadWrite), DataField, AutoNetworkedField]
public Vector2 Offset = Vector2.Zero;
/// <summary>
/// Sound to play after embedding into a hit target.
/// </summary>
[ViewVariables(VVAccess.ReadWrite), DataField, AutoNetworkedField]
public SoundSpecifier? Sound;
/// <summary>
/// The entity this embeddable is attached to.
/// </summary>
[ViewVariables(VVAccess.ReadWrite), AutoNetworkedField]
public EntityUid? Target = null;
/// <summary>
/// The body part of the target this embeddable is attached to.
/// </summary>
[ViewVariables(VVAccess.ReadWrite), AutoNetworkedField]
public TargetBodyPart? TargetBodyPart = null;
/// <summary>
/// How much time before this entity automatically falls off? (0 is never)
/// </summary>
[ViewVariables(VVAccess.ReadWrite), DataField, AutoNetworkedField]
public float AutoRemoveDuration = 40f;
/// <summary>
/// The time when this entity automatically falls off after being attached.
/// </summary>
[ViewVariables(VVAccess.ReadWrite), DataField(customTypeSerializer: typeof(TimeOffsetSerializer)), AutoNetworkedField]
public TimeSpan? AutoRemoveTime = null;
// WD EDIT START
[DataField]
public DamageSpecifier Damage = new();
[DataField]
public bool PreventCollide;
// WD EDIT END
// Goobstation edit start
/// <summary>
/// Uid of the entity the projectile is embed into.
/// </summary>
[DataField, AutoNetworkedField]
public EntityUid? EmbeddedIntoUid;
// Goobstation edit end
}