Skip to content

Commit

Permalink
Next adaptation
Browse files Browse the repository at this point in the history
  • Loading branch information
FireNameFN committed Nov 8, 2024
1 parent b10731f commit ae4f085
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion Content.Server/Projectiles/ProjectileSystem.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using Content.Server.Administration.Logs;
using Content.Server.Effects;
using Content.Server.Weapons.Ranged.Systems;
using Content.Shared._CorvaxNext.Penetration;
using Content.Shared.Camera;
using Content.Shared.Corvax.Penetration;
using Content.Shared.Damage;
using Content.Shared.Database;
using Content.Shared.Projectiles;
Expand Down Expand Up @@ -73,6 +73,7 @@ private void OnStartCollide(EntityUid uid, ProjectileComponent component, ref St
_sharedCameraRecoil.KickCamera(target, direction);
}

// Corvax-Next-Penetration
if (component.PenetrationScore > 0
&& _penetratableQuery.TryGetComponent(target, out var penetratable)
&& _random.Next(component.PenetrationScore + penetratable.StoppingPower) >= penetratable.StoppingPower)
Expand Down
1 change: 1 addition & 0 deletions Content.Shared/Projectiles/ProjectileComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ public sealed partial class ProjectileComponent : Component
[DataField]
public bool DamagedEntity;

// Corvax-Next-Penetration
[DataField]
public int PenetrationScore;
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
using Robust.Shared.GameStates;

namespace Content.Shared.Corvax.Penetration;
namespace Content.Shared._CorvaxNext.Penetration;

[RegisterComponent, NetworkedComponent]
public sealed partial class PenetratableComponent : Component
{
[DataField, ViewVariables(VVAccess.ReadWrite)]
[DataField]
public int StoppingPower;
}

0 comments on commit ae4f085

Please sign in to comment.