-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move grenade components to shared (#22691)
* Moves FlashComponent.cs, FlashOnTriggerComponent.cs, and SmokeOnTriggerComponent.cs to Shared * Moves ExplodeOnTriggerComponent.cs, OnUseTimerTriggerComponent.cs, ActiveTimerTriggerComponent.cs, and SmokeOnTriggerComponent.cs to Shared * Delete .run/Content Server+Client.run.xml HOW DID THIS GET IN HERE ITS NOT AHHHH * Update Content.Client/Explosion/SmokeOnTriggerSystem.cs Co-authored-by: DrSmugleaf <[email protected]> * Update Content.Shared/Explosion/Components/ActiveTimerTriggerComponent.cs Co-authored-by: DrSmugleaf <[email protected]> * Update Content.Shared/Explosion/Components/OnUseTimerTriggerComponent.cs Co-authored-by: DrSmugleaf <[email protected]> * Update Content.Shared/Explosion/Components/OnUseTimerTriggerComponent.cs Co-authored-by: DrSmugleaf <[email protected]> * Update Content.Shared/Explosion/EntitySystems/SharedTriggerSystem.cs Co-authored-by: DrSmugleaf <[email protected]> * Update Content.Shared/Explosion/EntitySystems/SharedSmokeOnTriggerSystem.cs Co-authored-by: DrSmugleaf <[email protected]> * Update ExplodeOnTriggerComponent.cs * Revert "Delete .run/Content Server+Client.run.xml" This reverts commit 29ee05f57de60eab5c92158d8eba5e3acba483c2. * Fix? * cannot figure out how to get this to go back please forgive * Fixes a network issue * leftovers * Fixes --------- Co-authored-by: DrSmugleaf <[email protected]> Co-authored-by: metalgearsloth <[email protected]> (cherry picked from commit 467e983ba972a7ae749c95448febd19c7c285514)
- Loading branch information
Showing
40 changed files
with
125 additions
and
86 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
using Content.Shared.Explosion.EntitySystems; | ||
|
||
namespace Content.Client.Explosion; | ||
|
||
public sealed class SmokeOnTriggerSystem : SharedSmokeOnTriggerSystem | ||
{ | ||
} |
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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
using Content.Shared.Explosion; | ||
using Content.Shared.Explosion.Components; | ||
|
||
namespace Content.Client.Explosion; | ||
|
||
|
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
25 changes: 0 additions & 25 deletions
25
Content.Server/Explosion/Components/ActiveTimerTriggerComponent.cs
This file was deleted.
Oops, something went wrong.
1 change: 1 addition & 0 deletions
1
Content.Server/Explosion/Components/TriggerOnProximityComponent.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
1 change: 1 addition & 0 deletions
1
Content.Server/Explosion/EntitySystems/ExplosionSystem.GridMap.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
1 change: 1 addition & 0 deletions
1
Content.Server/Explosion/EntitySystems/ExplosionSystem.Visuals.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
1 change: 1 addition & 0 deletions
1
Content.Server/Explosion/EntitySystems/TriggerSystem.Mobstate.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
12 changes: 0 additions & 12 deletions
12
Content.Server/Flash/Components/FlashOnTriggerComponent.cs
This file was deleted.
Oops, something went wrong.
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
21 changes: 21 additions & 0 deletions
21
Content.Shared/Explosion/Components/ActiveTimerTriggerComponent.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,21 @@ | ||
using Robust.Shared.Audio; | ||
using Robust.Shared.GameStates; | ||
|
||
namespace Content.Shared.Explosion.Components; | ||
|
||
/// <summary> | ||
/// Component for tracking active trigger timers. A timers can activated by some other component, e.g. <see cref="OnUseTimerTriggerComponent"/>. | ||
/// </summary> | ||
[RegisterComponent, NetworkedComponent] | ||
public sealed partial class ActiveTimerTriggerComponent : Component | ||
{ | ||
[DataField] public float TimeRemaining; | ||
|
||
[DataField] public EntityUid? User; | ||
|
||
[DataField] public float BeepInterval; | ||
|
||
[DataField] public float TimeUntilBeep; | ||
|
||
[DataField] public SoundSpecifier? BeepSound; | ||
} |
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
6 changes: 4 additions & 2 deletions
6
...ts/OnTrigger/ExplodeOnTriggerComponent.cs → ...ts/OnTrigger/ExplodeOnTriggerComponent.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 |
---|---|---|
@@ -1,9 +1,11 @@ | ||
namespace Content.Server.Explosion.Components; | ||
using Robust.Shared.GameStates; | ||
|
||
namespace Content.Shared.Explosion.Components.OnTrigger; | ||
|
||
/// <summary> | ||
/// Explode using the entity's <see cref="ExplosiveComponent"/> if Triggered. | ||
/// </summary> | ||
[RegisterComponent] | ||
[RegisterComponent, NetworkedComponent] | ||
public sealed partial class ExplodeOnTriggerComponent : Component | ||
{ | ||
} |
7 changes: 4 additions & 3 deletions
7
...ents/OnTrigger/SmokeOnTriggerComponent.cs → ...ents/OnTrigger/SmokeOnTriggerComponent.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
32 changes: 12 additions & 20 deletions
32
.../Components/OnUseTimerTriggerComponent.cs → .../Components/OnUseTimerTriggerComponent.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 |
---|---|---|
@@ -1,57 +1,49 @@ | ||
using Robust.Shared.Audio; | ||
using Robust.Shared.GameStates; | ||
|
||
namespace Content.Server.Explosion.Components | ||
namespace Content.Shared.Explosion.Components | ||
{ | ||
[RegisterComponent] | ||
[RegisterComponent, NetworkedComponent] | ||
public sealed partial class OnUseTimerTriggerComponent : Component | ||
{ | ||
[DataField("delay")] | ||
public float Delay = 1f; | ||
[DataField] public float Delay = 1f; | ||
|
||
/// <summary> | ||
/// If not null, a user can use verbs to configure the delay to one of these options. | ||
/// </summary> | ||
[DataField("delayOptions")] | ||
public List<float>? DelayOptions = null; | ||
[DataField] public List<float>? DelayOptions = null; | ||
|
||
/// <summary> | ||
/// If not null, this timer will periodically play this sound while active. | ||
/// </summary> | ||
[DataField("beepSound")] | ||
public SoundSpecifier? BeepSound; | ||
[DataField] public SoundSpecifier? BeepSound; | ||
|
||
/// <summary> | ||
/// Time before beeping starts. Defaults to a single beep interval. If set to zero, will emit a beep immediately after use. | ||
/// </summary> | ||
[DataField("initialBeepDelay")] | ||
public float? InitialBeepDelay; | ||
[DataField] public float? InitialBeepDelay; | ||
|
||
[DataField("beepInterval")] | ||
public float BeepInterval = 1; | ||
[DataField] public float BeepInterval = 1; | ||
|
||
/// <summary> | ||
/// Whether the timer should instead be activated through a verb in the right-click menu | ||
/// </summary> | ||
[DataField("useVerbInstead")] | ||
public bool UseVerbInstead = false; | ||
[DataField] public bool UseVerbInstead = false; | ||
|
||
/// <summary> | ||
/// Should timer be started when it was stuck to another entity. | ||
/// Used for C4 charges and similar behaviour. | ||
/// </summary> | ||
[DataField("startOnStick")] | ||
public bool StartOnStick; | ||
[DataField] public bool StartOnStick; | ||
|
||
/// <summary> | ||
/// Allows changing the start-on-stick quality. | ||
/// </summary> | ||
[DataField("canToggleStartOnStick")] | ||
public bool AllowToggleStartOnStick; | ||
[DataField("canToggleStartOnStick")] public bool AllowToggleStartOnStick; | ||
|
||
/// <summary> | ||
/// Whether you can examine the item to see its timer or not. | ||
/// </summary> | ||
[DataField("examinable")] | ||
public bool Examinable = true; | ||
[DataField] public bool Examinable = true; | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
...xplosion/SharedClusterGrenadeComponent.cs → ...mponents/SharedClusterGrenadeComponent.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
2 changes: 1 addition & 1 deletion
2
...sion/SharedTriggerOnProximityComponent.cs → ...ents/SharedTriggerOnProximityComponent.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
6 changes: 6 additions & 0 deletions
6
Content.Shared/Explosion/EntitySystems/SharedSmokeOnTriggerSystem.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,6 @@ | ||
namespace Content.Shared.Explosion.EntitySystems; | ||
|
||
public abstract class SharedSmokeOnTriggerSystem : EntitySystem | ||
{ | ||
|
||
} |
6 changes: 6 additions & 0 deletions
6
Content.Shared/Explosion/EntitySystems/SharedTriggerSystem.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,6 @@ | ||
namespace Content.Shared.Explosion.EntitySystems; | ||
|
||
public abstract class SharedTriggerSystem : EntitySystem | ||
{ | ||
|
||
} |
6 changes: 4 additions & 2 deletions
6
...Server/Flash/Components/FlashComponent.cs → ...Shared/Flash/Components/FlashComponent.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
Oops, something went wrong.