Бафф христова + форсвелдед прикол (#400)

* Христов воскресе

* penis edit

* Спрайты, звуки и фиксы
This commit is contained in:
ThereDrD0
2023-09-15 01:24:35 +03:00
committed by Aviu00
parent 2ef3c0726c
commit 453e30f409
16 changed files with 84 additions and 12 deletions

View File

@@ -1,6 +1,7 @@
using Content.Shared.Hands;
using Content.Shared.Hands.Components;
using Content.Shared.Hands.EntitySystems;
using Content.Shared.Interaction;
using Content.Shared.Interaction.Events;
using Content.Shared.Item;
using Content.Shared.Popups;
@@ -43,6 +44,16 @@ public sealed class WieldableSystem : EntitySystem
SubscribeLocalEvent<GunWieldBonusComponent, ItemUnwieldedEvent>(OnGunUnwielded);
SubscribeLocalEvent<IncreaseDamageOnWieldComponent, GetMeleeDamageEvent>(OnGetMeleeDamage);
SubscribeLocalEvent<WieldableComponent, GotEquippedHandEvent>(OnHandEquipped);
}
// WD edit
private void OnHandEquipped(EntityUid uid, WieldableComponent component, GotEquippedHandEvent args)
{
if (component.ForceTwoHanded)
{
TryWield(args.Equipped, component, args.User, true);
}
}
private void OnMeleeAttempt(EntityUid uid, MeleeRequiresWieldComponent component, ref AttemptMeleeEvent args)
@@ -114,7 +125,7 @@ public sealed class WieldableSystem : EntitySystem
private void OnUseInHand(EntityUid uid, WieldableComponent component, UseInHandEvent args)
{
if (args.Handled)
if (args.Handled || component.ForceTwoHanded)
return;
if (!component.Wielded)
@@ -160,9 +171,9 @@ public sealed class WieldableSystem : EntitySystem
/// Attempts to wield an item, starting a UseDelay after.
/// </summary>
/// <returns>True if the attempt wasn't blocked.</returns>
public bool TryWield(EntityUid used, WieldableComponent component, EntityUid user)
public bool TryWield(EntityUid used, WieldableComponent component, EntityUid user, bool quiet = false)
{
if (!CanWield(used, component, user))
if (!CanWield(used, component, user, quiet))
return false;
var ev = new BeforeWieldEvent();