diff --git a/Content.Shared/Hands/EntitySystems/SharedHandsSystem.Drop.cs b/Content.Shared/Hands/EntitySystems/SharedHandsSystem.Drop.cs index 42201ab6af..d87d195122 100644 --- a/Content.Shared/Hands/EntitySystems/SharedHandsSystem.Drop.cs +++ b/Content.Shared/Hands/EntitySystems/SharedHandsSystem.Drop.cs @@ -2,6 +2,7 @@ using System.Numerics; using Content.Shared.Hands.Components; using Content.Shared.Interaction; using Content.Shared.Tag; +using Content.Shared.Pulling.Components; using Robust.Shared.Containers; using Robust.Shared.Map; @@ -66,6 +67,10 @@ public abstract partial class SharedHandsSystem if (checkActionBlocker && !_actionBlocker.CanDrop(uid)) return false; + // WD edit + if (HasComp(hand.HeldEntity) && TryComp(uid, out var sharedPullerComponent) && sharedPullerComponent.Pulling == null) + return false; + return true; } diff --git a/Content.Shared/Hands/EntitySystems/SharedHandsSystem.Pickup.cs b/Content.Shared/Hands/EntitySystems/SharedHandsSystem.Pickup.cs index bbae03e45b..509d0ddabc 100644 --- a/Content.Shared/Hands/EntitySystems/SharedHandsSystem.Pickup.cs +++ b/Content.Shared/Hands/EntitySystems/SharedHandsSystem.Pickup.cs @@ -1,6 +1,8 @@ using Content.Shared.Database; using Content.Shared.Hands.Components; using Content.Shared.Item; +using Content.Shared.Popups; +using Content.Shared.Wieldable.Components; using Robust.Shared.Containers; using Robust.Shared.Map; using Robust.Shared.Physics; @@ -10,6 +12,7 @@ namespace Content.Shared.Hands.EntitySystems; public abstract partial class SharedHandsSystem : EntitySystem { + [Dependency] private readonly SharedPopupSystem _popupSystem = default!; private void InitializePickup() { SubscribeLocalEvent(HandleEntityInserted); @@ -178,6 +181,15 @@ public abstract partial class SharedHandsSystem : EntitySystem if (checkActionBlocker && !_actionBlocker.CanPickup(uid, entity)) return false; + // WD edit + if (TryComp(entity, out var wieldableComponent) && handsComp.CountFreeHands() < 2 && wieldableComponent.ForceTwoHanded) + { + var message = Loc.GetString("wieldable-component-not-enough-free-hands", + ("number", 1), ("item", entity)); + _popupSystem.PopupClient(message, entity, uid); + return false; + } + // check can insert (including raising attempt events). return ContainerSystem.CanInsert(entity, handContainer); } diff --git a/Content.Shared/Wieldable/Components/WieldableComponent.cs b/Content.Shared/Wieldable/Components/WieldableComponent.cs index 4a50b93072..8ba2e000fe 100644 --- a/Content.Shared/Wieldable/Components/WieldableComponent.cs +++ b/Content.Shared/Wieldable/Components/WieldableComponent.cs @@ -30,6 +30,9 @@ public sealed partial class WieldableComponent : Component public string? WieldedInhandPrefix = "wielded"; public string? OldInhandPrefix = null; + + [DataField("forceTwoHanded")] + public bool ForceTwoHanded; } [Serializable, NetSerializable] diff --git a/Content.Shared/Wieldable/WieldableSystem.cs b/Content.Shared/Wieldable/WieldableSystem.cs index 0f6422241c..dcbe9a7f81 100644 --- a/Content.Shared/Wieldable/WieldableSystem.cs +++ b/Content.Shared/Wieldable/WieldableSystem.cs @@ -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(OnGunUnwielded); SubscribeLocalEvent(OnGetMeleeDamage); + SubscribeLocalEvent(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. /// /// True if the attempt wasn't blocked. - 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(); diff --git a/Resources/Audio/White/Gun/insert.ogg b/Resources/Audio/White/Gun/insert.ogg new file mode 100644 index 0000000000..cb82a03975 Binary files /dev/null and b/Resources/Audio/White/Gun/insert.ogg differ diff --git a/Resources/Prototypes/Catalog/Fills/Items/briefcases.yml b/Resources/Prototypes/Catalog/Fills/Items/briefcases.yml index ce2cf1e2b3..3aa1b46ffc 100644 --- a/Resources/Prototypes/Catalog/Fills/Items/briefcases.yml +++ b/Resources/Prototypes/Catalog/Fills/Items/briefcases.yml @@ -26,8 +26,8 @@ - id: WeaponSniperHristov - id: MagazineBoxAntiMateriel - id: ClothingNeckTieRed - - id: ClothingHandsGlovesLatex - id: ClothingUniformJumpsuitLawyerBlack +<<<<<<< HEAD - type: entity id: BriefcaseSyndieLobbyingBundleFilled @@ -40,3 +40,8 @@ - id: ClothingEyesGlassesSunglasses - id: SpaceCash1000 amount: 5 +======= + - id: ClothingHandsGlovesCombat # WD edit + - id: ClothingShoesBootsLaceup + - id: WeaponPistolCobra #WD edit +>>>>>>> ef8809aaff (Бафф христова + форсвелдед прикол (#400)) diff --git a/Resources/Prototypes/Catalog/uplink_catalog.yml b/Resources/Prototypes/Catalog/uplink_catalog.yml index 8a9c4badce..bdc6e9c9ab 100644 --- a/Resources/Prototypes/Catalog/uplink_catalog.yml +++ b/Resources/Prototypes/Catalog/uplink_catalog.yml @@ -390,7 +390,7 @@ description: uplink-sniper-ammo-desc productEntity: MagazineBoxAntiMateriel cost: - Telecrystal: 2 + Telecrystal: 6 # WD edit categories: - UplinkAmmo @@ -813,7 +813,7 @@ icon: { sprite: /Textures/Objects/Weapons/Guns/Snipers/heavy_sniper.rsi, state: base } productEntity: BriefcaseSyndieSniperBundleFilled cost: - Telecrystal: 12 + Telecrystal: 20 # WD edit categories: - UplinkBundles saleLimit: 1 diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Ammunition/Projectiles/antimateriel.yml b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Ammunition/Projectiles/antimateriel.yml index 31d7b65fe8..9e6ffbaf53 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Ammunition/Projectiles/antimateriel.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Ammunition/Projectiles/antimateriel.yml @@ -7,7 +7,5 @@ - type: Projectile damage: types: - Piercing: 40 - Structural: 30 - - type: StaminaDamageOnCollide - damage: 35 + Piercing: 140 #WD edit + Structural: 150 #WD edit diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Snipers/snipers.yml b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Snipers/snipers.yml index be1ca7b272..a74d49c330 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Snipers/snipers.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Snipers/snipers.yml @@ -53,15 +53,19 @@ description: A portable anti-materiel rifle. Fires armor piercing 14.5mm shells. Uses .60 anti-materiel ammo. components: - type: Sprite - sprite: Objects/Weapons/Guns/Snipers/heavy_sniper.rsi + sprite: Objects/Weapons/Guns/Snipers/hristov.rsi - type: Clothing - sprite: Objects/Weapons/Guns/Snipers/heavy_sniper.rsi + sprite: Objects/Weapons/Guns/Snipers/hristov.rsi - type: BallisticAmmoProvider + soundInsert: /Audio/White/Gun/insert.ogg whitelist: tags: - CartridgeAntiMateriel capacity: 5 proto: CartridgeAntiMateriel + - type: Wieldable + wieldTime: 0 + forceTwoHanded: True - type: entity name: musket diff --git a/Resources/Textures/Objects/Weapons/Guns/Snipers/hristov.rsi/base.png b/Resources/Textures/Objects/Weapons/Guns/Snipers/hristov.rsi/base.png new file mode 100644 index 0000000000..5e5959c1b2 Binary files /dev/null and b/Resources/Textures/Objects/Weapons/Guns/Snipers/hristov.rsi/base.png differ diff --git a/Resources/Textures/Objects/Weapons/Guns/Snipers/hristov.rsi/equipped-BACKPACK.png b/Resources/Textures/Objects/Weapons/Guns/Snipers/hristov.rsi/equipped-BACKPACK.png new file mode 100644 index 0000000000..f30c94c0f5 Binary files /dev/null and b/Resources/Textures/Objects/Weapons/Guns/Snipers/hristov.rsi/equipped-BACKPACK.png differ diff --git a/Resources/Textures/Objects/Weapons/Guns/Snipers/hristov.rsi/inhand-left.png b/Resources/Textures/Objects/Weapons/Guns/Snipers/hristov.rsi/inhand-left.png new file mode 100644 index 0000000000..8f80135526 Binary files /dev/null and b/Resources/Textures/Objects/Weapons/Guns/Snipers/hristov.rsi/inhand-left.png differ diff --git a/Resources/Textures/Objects/Weapons/Guns/Snipers/hristov.rsi/inhand-right.png b/Resources/Textures/Objects/Weapons/Guns/Snipers/hristov.rsi/inhand-right.png new file mode 100644 index 0000000000..46c0aba5fd Binary files /dev/null and b/Resources/Textures/Objects/Weapons/Guns/Snipers/hristov.rsi/inhand-right.png differ diff --git a/Resources/Textures/Objects/Weapons/Guns/Snipers/hristov.rsi/meta.json b/Resources/Textures/Objects/Weapons/Guns/Snipers/hristov.rsi/meta.json new file mode 100644 index 0000000000..484769178f --- /dev/null +++ b/Resources/Textures/Objects/Weapons/Guns/Snipers/hristov.rsi/meta.json @@ -0,0 +1,34 @@ +{ + "version": 1, + "license": "CC-BY-SA-3.0", + "copyright": "Taken from tgstation at https://github.com/tgstation/tgstation/commit/e1142f20f5e4661cb6845cfcf2dd69f864d67432", + "size": { + "x": 32, + "y": 32 + }, + "states": [ + { + "name": "base" + }, + { + "name": "inhand-left", + "directions": 4 + }, + { + "name": "inhand-right", + "directions": 4 + }, + { + "name": "wielded-inhand-left", + "directions": 4 + }, + { + "name": "wielded-inhand-right", + "directions": 4 + }, + { + "name": "equipped-BACKPACK", + "directions": 4 + } + ] +} diff --git a/Resources/Textures/Objects/Weapons/Guns/Snipers/hristov.rsi/wielded-inhand-left.png b/Resources/Textures/Objects/Weapons/Guns/Snipers/hristov.rsi/wielded-inhand-left.png new file mode 100644 index 0000000000..8f80135526 Binary files /dev/null and b/Resources/Textures/Objects/Weapons/Guns/Snipers/hristov.rsi/wielded-inhand-left.png differ diff --git a/Resources/Textures/Objects/Weapons/Guns/Snipers/hristov.rsi/wielded-inhand-right.png b/Resources/Textures/Objects/Weapons/Guns/Snipers/hristov.rsi/wielded-inhand-right.png new file mode 100644 index 0000000000..46c0aba5fd Binary files /dev/null and b/Resources/Textures/Objects/Weapons/Guns/Snipers/hristov.rsi/wielded-inhand-right.png differ