-
Notifications
You must be signed in to change notification settings - Fork 32
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
8 changed files
with
82 additions
and
18 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
using Content.Shared.Weapons.Ranged.Systems; | ||
using Robust.Shared.GameStates; | ||
using Robust.Shared.Prototypes; | ||
|
||
namespace Content.Shared.Projectiles; | ||
|
||
/// <summary> | ||
/// Spawns a spread of the projectiles when fired | ||
/// </summary> | ||
[RegisterComponent, NetworkedComponent, Access(typeof(SharedGunSystem))] | ||
public sealed partial class ProjectileSpreadComponent : Component | ||
{ | ||
/// <summary> | ||
/// The entity prototype that will be fired by the rest of the spread. | ||
/// Will generally be the same entity prototype as the first projectile being fired. | ||
/// Needed for ammo components that do not specify a fired prototype, unlike cartridges. | ||
/// </summary> | ||
[DataField(required: true)] | ||
public EntProtoId Proto; | ||
|
||
/// <summary> | ||
/// How much the ammo spreads when shot, in degrees. Does nothing if count is 0. | ||
/// </summary> | ||
[DataField] | ||
public Angle Spread = Angle.FromDegrees(5); | ||
|
||
/// <summary> | ||
/// How many prototypes are spawned when shot. | ||
/// </summary> | ||
[DataField] | ||
public int Count = 1; | ||
} |
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
2 changes: 1 addition & 1 deletion
2
Resources/Prototypes/_LostParadise/Entities/Objects/Weapons/Guns/Crossbow/crossbow.yml
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: 0 additions & 1 deletion
1
Resources/Prototypes/_LostParadise/Entities/Structures/Furniture/Armory/base_weapon_rack.yml
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