-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
37 changed files
with
574 additions
and
251 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
411 changes: 201 additions & 210 deletions
411
Content.Server/Atmos/EntitySystems/GasAnalyzerSystem.cs
Large diffs are not rendered by default.
Oops, something went wrong.
37 changes: 37 additions & 0 deletions
37
Content.Server/Explosion/Components/ShockOnTriggerComponent.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom; | ||
using Content.Server.Explosion.EntitySystems; | ||
|
||
namespace Content.Server.Explosion.Components; | ||
|
||
/// <summary> | ||
/// A component that electrocutes an entity having this component when a trigger is triggered. | ||
/// </summary> | ||
[RegisterComponent, AutoGenerateComponentPause] | ||
[Access(typeof(TriggerSystem))] | ||
public sealed partial class ShockOnTriggerComponent : Component | ||
{ | ||
/// <summary> | ||
/// The force of an electric shock when the trigger is triggered. | ||
/// </summary> | ||
[DataField] | ||
public int Damage = 5; | ||
|
||
/// <summary> | ||
/// Duration of electric shock when the trigger is triggered. | ||
/// </summary> | ||
[DataField] | ||
public TimeSpan Duration = TimeSpan.FromSeconds(2); | ||
|
||
/// <summary> | ||
/// The minimum delay between repeating triggers. | ||
/// </summary> | ||
[DataField] | ||
public TimeSpan Cooldown = TimeSpan.FromSeconds(4); | ||
|
||
/// <summary> | ||
/// When can the trigger run again? | ||
/// </summary> | ||
[DataField(customTypeSerializer: typeof(TimeOffsetSerializer))] | ||
[AutoPausedField] | ||
public TimeSpan NextTrigger = TimeSpan.Zero; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
Content.Server/Singularity/EntitySystems/RadiationCollectorSystem.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
Content.Shared/Clothing/Components/SelfUnremovableClothingComponent.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
using Content.Shared.Clothing.EntitySystems; | ||
using Robust.Shared.GameStates; | ||
|
||
namespace Content.Shared.Clothing.Components; | ||
|
||
/// <summary> | ||
/// The component prohibits the player from taking off clothes on them that have this component. | ||
/// </summary> | ||
/// <remarks> | ||
/// See also ClothingComponent.EquipDelay if you want the clothes that the player cannot take off by himself to be put on by the player with a delay. | ||
///</remarks> | ||
[NetworkedComponent] | ||
[RegisterComponent] | ||
[Access(typeof(SelfUnremovableClothingSystem))] | ||
public sealed partial class SelfUnremovableClothingComponent : Component | ||
{ | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
Content.Shared/Clothing/EntitySystems/SelfUnremovableClothingSystem.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
using Content.Shared.Clothing.Components; | ||
using Content.Shared.Examine; | ||
using Content.Shared.Inventory; | ||
using Content.Shared.Inventory.Events; | ||
|
||
namespace Content.Shared.Clothing.EntitySystems; | ||
|
||
/// <summary> | ||
/// A system for the operation of a component that prohibits the player from taking off his own clothes that have this component. | ||
/// </summary> | ||
public sealed class SelfUnremovableClothingSystem : EntitySystem | ||
{ | ||
public override void Initialize() | ||
{ | ||
base.Initialize(); | ||
|
||
SubscribeLocalEvent<SelfUnremovableClothingComponent, BeingUnequippedAttemptEvent>(OnUnequip); | ||
SubscribeLocalEvent<SelfUnremovableClothingComponent, ExaminedEvent>(OnUnequipMarkup); | ||
} | ||
|
||
private void OnUnequip(Entity<SelfUnremovableClothingComponent> selfUnremovableClothing, ref BeingUnequippedAttemptEvent args) | ||
{ | ||
if (TryComp<ClothingComponent>(selfUnremovableClothing, out var clothing) && (clothing.Slots & args.SlotFlags) == SlotFlags.NONE) | ||
return; | ||
|
||
if (args.UnEquipTarget == args.Unequipee) | ||
{ | ||
args.Cancel(); | ||
} | ||
} | ||
|
||
private void OnUnequipMarkup(Entity<SelfUnremovableClothingComponent> selfUnremovableClothing, ref ExaminedEvent args) | ||
{ | ||
args.PushMarkup(Loc.GetString("comp-self-unremovable-clothing")); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.