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
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
using Content.Shared.Examine;
|
||||
using Content.Shared.Hands;
|
||||
using Content.Shared.Hands.Components;
|
||||
using Content.Shared.Hands.EntitySystems;
|
||||
@@ -45,6 +46,7 @@ public sealed class WieldableSystem : EntitySystem
|
||||
SubscribeLocalEvent<GunWieldBonusComponent, ItemWieldedEvent>(OnGunWielded);
|
||||
SubscribeLocalEvent<GunWieldBonusComponent, ItemUnwieldedEvent>(OnGunUnwielded);
|
||||
SubscribeLocalEvent<GunWieldBonusComponent, GunRefreshModifiersEvent>(OnGunRefreshModifiers);
|
||||
SubscribeLocalEvent<GunWieldBonusComponent, ExaminedEvent>(OnExamine);
|
||||
|
||||
SubscribeLocalEvent<IncreaseDamageOnWieldComponent, GetMeleeDamageEvent>(OnGetMeleeDamage);
|
||||
}
|
||||
@@ -95,6 +97,12 @@ public sealed class WieldableSystem : EntitySystem
|
||||
}
|
||||
}
|
||||
|
||||
private void OnExamine(EntityUid uid, GunWieldBonusComponent component, ref ExaminedEvent args)
|
||||
{
|
||||
if (component.WieldBonusExamineMessage != null)
|
||||
args.PushText(Loc.GetString(component.WieldBonusExamineMessage));
|
||||
}
|
||||
|
||||
private void AddToggleWieldVerb(EntityUid uid, WieldableComponent component, GetVerbsEvent<InteractionVerb> args)
|
||||
{
|
||||
if (args.Hands == null || !args.CanAccess || !args.CanInteract)
|
||||
|
||||
Reference in New Issue
Block a user