Бафф христова + форсвелдед прикол (#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

@@ -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<HandVirtualItemComponent>(hand.HeldEntity) && TryComp<SharedPullerComponent>(uid, out var sharedPullerComponent) && sharedPullerComponent.Pulling == null)
return false;
return true;
}

View File

@@ -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<HandsComponent, EntInsertedIntoContainerMessage>(HandleEntityInserted);
@@ -178,6 +181,15 @@ public abstract partial class SharedHandsSystem : EntitySystem
if (checkActionBlocker && !_actionBlocker.CanPickup(uid, entity))
return false;
// WD edit
if (TryComp<WieldableComponent>(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);
}

View File

@@ -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]

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();

Binary file not shown.

View File

@@ -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))

View File

@@ -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

View File

@@ -7,7 +7,5 @@
- type: Projectile
damage:
types:
Piercing: 40
Structural: 30
- type: StaminaDamageOnCollide
damage: 35
Piercing: 140 #WD edit
Structural: 150 #WD edit

View File

@@ -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

Binary file not shown.

After

Width:  |  Height:  |  Size: 296 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 745 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 736 B

View File

@@ -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
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 745 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 736 B