Files
tbd-station-14/Content.Shared/Weapons/Ranged/Components/GunWieldBonusComponent.cs
RiceMar1244 2287f59e8a Adds wielding for all large guns (#26970)
* Adds wielding assets

* Modifies meta.json files and adds artist credit

* Adds wieldable component to a bunch of weapons

* Moves shotgun inhands and wield inhands to their own folders (because its the only way the sprites would work)

* Removes the wieldable component from some guns

* Adds wielding sprites for wieldable guns that didnt have them

* Adds gun wielding bonuses and base innaccuracy to wieldable guns.

* Corrects wielded accuracy to be default accuracy instead of perfect

* Makes the drozd smg and bulldog shotgun wieldable

* Makes nukie c20r wieldable and adds sprites

* Adds BaseGunWieldable

* Makes all the newly wieldable gun use the base inheritable

* Adds accuracy to smgs to resolve inheritance conflict

* Makes all wieldable shotguns require wielding to fire because of a bug involving spread innacuracy

* Adds wield bonus message on examine
2024-05-09 19:58:15 -07:00

40 lines
1.4 KiB
C#

using Content.Shared.Wieldable;
using Robust.Shared.GameStates;
namespace Content.Shared.Weapons.Ranged.Components;
/// <summary>
/// Applies an accuracy bonus upon wielding.
/// </summary>
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState, Access(typeof(WieldableSystem))]
public sealed partial class GunWieldBonusComponent : Component
{
[ViewVariables(VVAccess.ReadWrite), DataField("minAngle"), AutoNetworkedField]
public Angle MinAngle = Angle.FromDegrees(-43);
/// <summary>
/// Angle bonus applied upon being wielded.
/// </summary>
[ViewVariables(VVAccess.ReadWrite), DataField("maxAngle"), AutoNetworkedField]
public Angle MaxAngle = Angle.FromDegrees(-43);
/// <summary>
/// Recoil bonuses applied upon being wielded.
/// Higher angle decay bonus, quicker recovery.
/// Lower angle increase bonus (negative numbers), slower buildup.
/// </summary>
[DataField, AutoNetworkedField]
public Angle AngleDecay = Angle.FromDegrees(0);
/// <summary>
/// Recoil bonuses applied upon being wielded.
/// Higher angle decay bonus, quicker recovery.
/// Lower angle increase bonus (negative numbers), slower buildup.
/// </summary>
[DataField, AutoNetworkedField]
public Angle AngleIncrease = Angle.FromDegrees(0);
[DataField]
public LocId? WieldBonusExamineMessage = "gunwieldbonus-component-examine";
}