cham projector fixes/rewrite (#27111)

* cant disguise to thing in a container

* copy cigarette visualiser

* prevent aghost throwing an error

* make disguises die in space

* fuck it rewrite it to not use polymorph

* fix action troll

* oop

* add vebr

* add access to the components

* 2/3

* fix

* relay damage from disguise to user

* fix integrity

* :trollface:

* :trollface:

* m

* kill integrity

* fix a bug

* review

* remove them from component

* relay flash effect to the disguise

* fix icon being weird

* change method since multiple systems cant handle same network event

* :trollface:

* actually network Disguise real

---------

Co-authored-by: deltanedas <@deltanedas:kde.org>
This commit is contained in:
deltanedas
2024-11-08 11:15:41 +00:00
committed by GitHub
parent 667daa168f
commit 80e148c265
9 changed files with 311 additions and 140 deletions

View File

@@ -0,0 +1,25 @@
using Content.Shared.Polymorph.Systems;
using Robust.Shared.GameStates;
namespace Content.Shared.Polymorph.Components;
/// <summary>
/// Added to a player when they use a chameleon projector.
/// Handles making them invisible and revealing when damaged enough or switching hands.
/// </summary>
[RegisterComponent, NetworkedComponent, Access(typeof(SharedChameleonProjectorSystem))]
[AutoGenerateComponentState]
public sealed partial class ChameleonDisguisedComponent : Component
{
/// <summary>
/// The disguise entity parented to the player.
/// </summary>
[DataField, AutoNetworkedField]
public EntityUid Disguise;
/// <summary>
/// For client, whether the user's sprite was previously visible or not.
/// </summary>
[DataField]
public bool WasVisible;
}