Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 0 additions & 70 deletions Content.Server/Abilities/Mime/MimePowersComponent.cs

This file was deleted.

171 changes: 0 additions & 171 deletions Content.Server/Abilities/Mime/MimePowersSystem.cs

This file was deleted.

2 changes: 1 addition & 1 deletion Content.Server/Speech/Muting/MutingSystem.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Content.Server.Abilities.Mime;
using Content.Shared.Abilities.Mime;
using Content.Server.Chat.Systems;
using Content.Server.Popups;
using Content.Server.Speech.Components;
Expand Down
76 changes: 76 additions & 0 deletions Content.Shared/Abilities/Mime/MimePowersComponent.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
using Content.Shared.Alert;
using Robust.Shared.Prototypes;
using Robust.Shared.GameStates;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;

namespace Content.Shared.Abilities.Mime;

/// <summary>
/// Lets its owner entity use mime powers, like placing invisible walls.
/// </summary>
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
[AutoGenerateComponentPause]
public sealed partial class MimePowersComponent : Component
{
/// <summary>
/// Whether this component is active or not.
/// </summarY>
[DataField, AutoNetworkedField]
public bool Enabled = true;

/// <summary>
/// The wall prototype to use.
/// </summary>
[DataField, AutoNetworkedField]
public EntProtoId WallPrototype = "WallInvisible";

[DataField]
public EntProtoId? InvisibleWallAction = "ActionMimeInvisibleWall";

[DataField, AutoNetworkedField]
public EntityUid? InvisibleWallActionEntity;

// The vow zone lies below
[DataField, AutoNetworkedField]
public bool VowBroken = false;

/// <summary>
/// Whether this mime is ready to take the vow again.
/// Note that if they already have the vow, this is also false.
/// </summary>
[DataField, AutoNetworkedField]
public bool ReadyToRepent = false;

/// <summary>
/// Time when the mime can repent their vow
/// </summary>
[DataField(customTypeSerializer: typeof(TimeOffsetSerializer))]
[AutoNetworkedField, AutoPausedField]
public TimeSpan VowRepentTime = TimeSpan.Zero;

/// <summary>
/// How long it takes the mime to get their powers back
/// </summary>
[DataField, AutoNetworkedField]
public TimeSpan VowCooldown = TimeSpan.FromMinutes(5);

[DataField]
public ProtoId<AlertPrototype> VowAlert = "VowOfSilence";

[DataField]
public ProtoId<AlertPrototype> VowBrokenAlert = "VowBroken";

/// <summary>
/// Does this component prevent the mime from writing on paper while their vow is active?
/// </summary>
[DataField, AutoNetworkedField]
public bool PreventWriting = false;

/// <summary>
/// What message is displayed when the mime fails to write?
/// </summary>
[DataField]
public LocId FailWriteMessage = "paper-component-illiterate-mime";

public override bool SendOnlyToOwner => true;
}
Loading
Loading