mirror of
https://github.com/space-syndicate/space-station-14.git
synced 2026-10-10 19:01:13 +03:00
* Travel camera * Adds TravelCamera as rare maintenance loot * Prevent Travel Camera from converting people to Revolution * Removed AoE for travel_camera * Adds Travel Camera to Uplink * Camera sprites * camera working on modern code * camera melee only * every error fixed + camera sfx * PoC photography * textures * charges, description order, fixed typo * support for colors * typos plus different photograph colors * more typos * final typos? * oh god i dont know how to write so many typos * fix lint warnings * Update Resources/Audio/Misc/attributions.yml Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com> * Update Resources/Textures/Objects/Misc/photograph.rsi/meta.json Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com> * Update Content.Server/Photography/PhotographComponent.cs Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com> * Update Content.Server/Photography/PhotographComponent.cs Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com> * Update Content.Server/Photography/PhotographComponent.cs Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com> * follow convention: bases shouldn't have any sprites * uses identity.entity system * Picture taker component comments. * Update Resources/Prototypes/Entities/Objects/Devices/travel_camera.yml Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com> * Update Resources/Prototypes/Entities/Objects/Devices/travel_camera.yml Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com> * spaces inserted * 4-spaced indentation * 4-space indent * uses SharedChargesSystem * canconvert component instead of convertitem tag * removed mention of tags from head rev component * component no longer has a constructor * use tables + do the things on shared * fix abstract-ness warning * formatting + comments * cleanup and improvements * oops * fix warnings * 1 tc / disruption + recursion (also i'm pretty sure it can spawn in maints now) * proper recursion checking (i think!) * Added a dot for coherence. * minor cleanup * brought back the melee * fixed description * More accurate, albeit less funny camera description. * deduplicate code with flash system --------- Co-authored-by: SlamBamActionman <slambamactionman@gmail.com> Co-authored-by: nomdéraisonnablementlong <you@example.com> Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
85 lines
2.6 KiB
C#
85 lines
2.6 KiB
C#
using Robust.Shared.Audio;
|
|
using Robust.Shared.GameStates;
|
|
|
|
namespace Content.Shared.Flash.Components;
|
|
|
|
/// <summary>
|
|
/// Allows this entity to flash someone by using it or melee attacking with it.
|
|
/// </summary>
|
|
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
|
|
[Access(typeof(SharedFlashSystem))]
|
|
public sealed partial class FlashComponent : Component
|
|
{
|
|
/// <summary>
|
|
/// Flash the area around the entity when used in hand?
|
|
/// </summary>
|
|
[DataField, AutoNetworkedField]
|
|
public bool FlashOnUse = true;
|
|
|
|
/// <summary>
|
|
/// Flash the area around the entity when the flash is used with ranged interaction?
|
|
/// </summary>
|
|
[DataField, AutoNetworkedField]
|
|
public bool FlashOnRangedInteract = false;
|
|
|
|
/// <summary>
|
|
/// Flash the target when melee attacking them?
|
|
/// </summary>
|
|
[DataField, AutoNetworkedField]
|
|
public bool FlashOnMelee = true;
|
|
|
|
/// <summary>
|
|
/// Time the Flash will be visually flashing after use.
|
|
/// For the actual interaction delay use UseDelayComponent.
|
|
/// These two times should be the same.
|
|
/// </summary>
|
|
[DataField, AutoNetworkedField]
|
|
public TimeSpan FlashingTime = TimeSpan.FromSeconds(4);
|
|
|
|
/// <summary>
|
|
/// For how long the target will lose vision when melee attacked with the flash.
|
|
/// </summary>
|
|
[DataField, AutoNetworkedField]
|
|
public TimeSpan MeleeDuration = TimeSpan.FromSeconds(5);
|
|
|
|
/// <summary>
|
|
/// For how long the target will lose vision when used in hand.
|
|
/// </summary>
|
|
[DataField, AutoNetworkedField]
|
|
public TimeSpan AoeFlashDuration = TimeSpan.FromSeconds(2);
|
|
|
|
/// <summary>
|
|
/// How long a target is stunned when a melee flash is used.
|
|
/// If null, melee flashes will not stun at all.
|
|
/// </summary>
|
|
[DataField, AutoNetworkedField]
|
|
public TimeSpan? MeleeStunDuration = TimeSpan.FromSeconds(1.5);
|
|
|
|
/// <summary>
|
|
/// Range of the flash when using it.
|
|
/// </summary>
|
|
[DataField, AutoNetworkedField]
|
|
public float Range = 7f;
|
|
|
|
/// <summary>
|
|
/// Movement speed multiplier for slowing down the target while they are flashed.
|
|
/// </summary>
|
|
[DataField, AutoNetworkedField]
|
|
public float SlowTo = 0.5f;
|
|
|
|
/// <summary>
|
|
/// The sound to play when flashing.
|
|
/// </summary>
|
|
|
|
[DataField, AutoNetworkedField]
|
|
public SoundSpecifier Sound = new SoundPathSpecifier("/Audio/Weapons/flash.ogg")
|
|
{
|
|
Params = AudioParams.Default.WithVolume(1f).WithMaxDistance(3f)
|
|
};
|
|
|
|
/// <summary>
|
|
/// The probability of sucessfully flashing someone.
|
|
/// </summary>
|
|
[DataField, AutoNetworkedField]
|
|
public float Probability = 1f;
|
|
}
|