Skip to content

Commit

Permalink
Revert "Weapon Reflection Movement Mechanic (#27219)" (#29326)
Browse files Browse the repository at this point in the history
* Revert "Weapon Reflection Movement Mechanic (#27219)"

This reverts commit b903733.

# Conflicts:
#	Content.Shared/Alert/AlertType.cs
#	Content.Shared/Weapons/Reflect/ReflectSystem.cs

* Add myself to codeowners

* Add myself to codeowners

* Also the alerts
  • Loading branch information
metalgearsloth authored Jun 23, 2024
1 parent 089cdcf commit 0546c9b
Show file tree
Hide file tree
Showing 13 changed files with 96 additions and 265 deletions.
7 changes: 7 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,10 @@
#Jezi
/Content.*/Medical @Jezithyr
/Content.*/Body @Jezithyr

# Sloth
/Content.*/Audio @metalgearsloth
/Content.*/Movement @metalgearsloth
/Content.*/NPC @metalgearsloth
/Content.*/Shuttles @metalgearsloth
/Content.*/Weapons @metalgearsloth
35 changes: 5 additions & 30 deletions Content.Shared/Weapons/Reflect/ReflectComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,42 +21,17 @@ public sealed partial class ReflectComponent : Component
[ViewVariables(VVAccess.ReadWrite), DataField("reflects")]
public ReflectType Reflects = ReflectType.Energy | ReflectType.NonEnergy;

[DataField("spread"), ViewVariables(VVAccess.ReadWrite), AutoNetworkedField]
public Angle Spread = Angle.FromDegrees(45);

[DataField("soundOnReflect")]
public SoundSpecifier? SoundOnReflect = new SoundPathSpecifier("/Audio/Weapons/Guns/Hits/laser_sear_wall.ogg");

/// <summary>
/// Is the deflection an innate power or something actively maintained? If true, this component grants a flat
/// deflection chance rather than a chance that degrades when moving/weightless/stunned/etc.
/// </summary>
[DataField]
public bool Innate = false;

/// <summary>
/// Maximum probability for a projectile to be reflected.
/// Probability for a projectile to be reflected.
/// </summary>
[DataField("reflectProb"), ViewVariables(VVAccess.ReadWrite), AutoNetworkedField]
public float ReflectProb = 0.25f;

/// <summary>
/// The maximum velocity a wielder can move at before losing effectiveness.
/// </summary>
[DataField]
public float VelocityBeforeNotMaxProb = 2.5f; // Walking speed for a human. Suitable for a weightless deflector like an e-sword.

/// <summary>
/// The velocity a wielder has to be moving at to use the minimum effectiveness value.
/// </summary>
[DataField]
public float VelocityBeforeMinProb = 4.5f; // Sprinting speed for a human. Suitable for a weightless deflector like an e-sword.
[DataField("spread"), ViewVariables(VVAccess.ReadWrite), AutoNetworkedField]
public Angle Spread = Angle.FromDegrees(45);

/// <summary>
/// Minimum probability for a projectile to be reflected.
/// </summary>
[DataField]
public float MinReflectProb = 0.1f;
[DataField("soundOnReflect")]
public SoundSpecifier? SoundOnReflect = new SoundPathSpecifier("/Audio/Weapons/Guns/Hits/laser_sear_wall.ogg");
}

[Flags]
Expand Down
Loading

0 comments on commit 0546c9b

Please sign in to comment.