CatStation/Content.Shared/Flash/FlashEvents.cs
KeTuFaisPiKiNut 63ce4c9be1
Travel Camera (#43322)
* 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>
2026-04-07 20:18:04 +00:00

27 lines
1.1 KiB
C#

using Content.Shared.Inventory;
namespace Content.Shared.Flash;
/// <summary>
/// Called before a flash is used to check if the attempt is cancelled by blindness, items or FlashImmunityComponent.
/// Raised on the target hit by the flash and their inventory items.
/// </summary>
[ByRefEvent]
public record struct FlashAttemptEvent(EntityUid Target, EntityUid? User, EntityUid? Used, bool Cancelled = false) : IInventoryRelayEvent
{
SlotFlags IInventoryRelayEvent.TargetSlots => SlotFlags.HEAD | SlotFlags.EYES | SlotFlags.MASK;
}
/// <summary>
/// Called when a player is successfully flashed, once for each flashed player.
/// Raised on the target hit by the flash, the user of the flash and the flash used.
/// The Melee parameter is used to check for rev conversion.
/// </summary>
[ByRefEvent]
public record struct AfterFlashedEvent(EntityUid Target, EntityUid? User, EntityUid? Used, bool Melee);
/// <summary>
/// Raised once on the flash entity when it was used, regardless of the flashed status being applied or not.
/// </summary>
[ByRefEvent]
public record struct AfterFlashActivatedEvent(EntityUid? Target, EntityUid? User);