diff --git a/Content.Shared/Eye/Blinding/Components/BlurryVisionComponent.cs b/Content.Shared/Eye/Blinding/Components/BlurryVisionComponent.cs index faff4b9e52..bebc9ac697 100644 --- a/Content.Shared/Eye/Blinding/Components/BlurryVisionComponent.cs +++ b/Content.Shared/Eye/Blinding/Components/BlurryVisionComponent.cs @@ -15,13 +15,13 @@ public sealed partial class BlurryVisionComponent : Component /// Amount of "blurring". Also modifies examine ranges. /// [ViewVariables(VVAccess.ReadWrite), DataField("magnitude"), AutoNetworkedField] - public float Magnitude; + public float Magnitude = 4f; // WD EDIT /// /// Exponent that controls the magnitude of the effect. /// [ViewVariables(VVAccess.ReadWrite), DataField("correctionPower"), AutoNetworkedField] - public float CorrectionPower; + public float CorrectionPower = 2f; // WD EDIT public const float MaxMagnitude = 6; public const float DefaultCorrectionPower = 2f; diff --git a/Content.Shared/_White/Collision/Blur/BlurOnCollideComponent.cs b/Content.Shared/_White/Collision/Blur/BlurOnCollideComponent.cs new file mode 100644 index 0000000000..95685e3051 --- /dev/null +++ b/Content.Shared/_White/Collision/Blur/BlurOnCollideComponent.cs @@ -0,0 +1,8 @@ +namespace Content.Shared._White.Collision.Blur; + +[RegisterComponent] +public sealed partial class BlurOnCollideComponent : Component +{ + [DataField] + public float BlurTime = 10f; +} diff --git a/Content.Shared/_White/Collision/Blur/BlurOnCollideSystem.cs b/Content.Shared/_White/Collision/Blur/BlurOnCollideSystem.cs new file mode 100644 index 0000000000..257dc5bd74 --- /dev/null +++ b/Content.Shared/_White/Collision/Blur/BlurOnCollideSystem.cs @@ -0,0 +1,37 @@ +using Content.Shared.Eye.Blinding.Components; +using Content.Shared.Projectiles; +using Content.Shared.StatusEffect; +using Content.Shared.Throwing; + +namespace Content.Shared._White.Collision.Blur; + +public sealed class BlurOnCollideSystem : EntitySystem +{ + [Dependency] private readonly StatusEffectsSystem _statusEffects = default!; + + public override void Initialize() + { + base.Initialize(); + + SubscribeLocalEvent(OnProjectileHit); + SubscribeLocalEvent(OnEntityHit); + } + + private void OnEntityHit(Entity ent, ref ThrowDoHitEvent args) + { + ApplyEffects(args.Target, ent.Comp); + } + + private void OnProjectileHit(Entity ent, ref ProjectileHitEvent args) + { + ApplyEffects(args.Target, ent.Comp); + } + + private void ApplyEffects(EntityUid target, BlurOnCollideComponent component) + { + _statusEffects.TryAddStatusEffect(target, + "BlurryVision", + TimeSpan.FromSeconds(component.BlurTime), + true); + } +} diff --git a/Content.Shared/_White/Collision/Knockdown/KnockdownOnCollideComponent.cs b/Content.Shared/_White/Collision/Knockdown/KnockdownOnCollideComponent.cs new file mode 100644 index 0000000000..20ed5f8dce --- /dev/null +++ b/Content.Shared/_White/Collision/Knockdown/KnockdownOnCollideComponent.cs @@ -0,0 +1,10 @@ +using Content.Shared._White.Standing; + +namespace Content.Shared._White.Collision.Knockdown; + +[RegisterComponent] +public sealed partial class KnockdownOnCollideComponent : Component +{ + [DataField] + public DropHeldItemsBehavior Behavior = DropHeldItemsBehavior.NoDrop; +} diff --git a/Content.Shared/_White/Collision/Knockdown/KnockdownOnCollideSystem.cs b/Content.Shared/_White/Collision/Knockdown/KnockdownOnCollideSystem.cs new file mode 100644 index 0000000000..dafce97c2e --- /dev/null +++ b/Content.Shared/_White/Collision/Knockdown/KnockdownOnCollideSystem.cs @@ -0,0 +1,33 @@ +using Content.Shared._White.Standing; +using Content.Shared.Projectiles; +using Content.Shared.Throwing; + +namespace Content.Shared._White.Collision.Knockdown; + +public sealed class KnockdownOnCollideSystem : EntitySystem +{ + [Dependency] private readonly SharedLayingDownSystem _layingDown = default!; + + public override void Initialize() + { + base.Initialize(); + + SubscribeLocalEvent(OnProjectileHit); + SubscribeLocalEvent(OnEntityHit); + } + + private void OnEntityHit(Entity ent, ref ThrowDoHitEvent args) + { + ApplyEffects(args.Target, ent.Comp); + } + + private void OnProjectileHit(Entity ent, ref ProjectileHitEvent args) + { + ApplyEffects(args.Target, ent.Comp); + } + + private void ApplyEffects(EntityUid target, KnockdownOnCollideComponent component) + { + _layingDown.TryLieDown(target, null, null, component.Behavior); + } +} diff --git a/Resources/Locale/en-US/_white/store/uplink-catalog.ftl b/Resources/Locale/en-US/_white/store/uplink-catalog.ftl index 44ce8ca0fa..b4edcee7dd 100644 --- a/Resources/Locale/en-US/_white/store/uplink-catalog.ftl +++ b/Resources/Locale/en-US/_white/store/uplink-catalog.ftl @@ -2,4 +2,7 @@ uplink-emp-flashlight-desc = A rechargeable device disguised as a flashlight designed to disrupt electronic systems. Useful for disrupting communications, security's energy weapons, and APCs when you're in a tight spot. uplink-betrayal-knife-name = Betrayal dagger -uplink-betrayal-knife-desc = The betrayal dagger allows the user to teleport a short distance, and also causes significant damage when stabbed in the back. \ No newline at end of file +uplink-betrayal-knife-desc = The betrayal dagger allows the user to teleport a short distance, and also causes significant damage when stabbed in the back. + +uplink-ebow-name = Small energy crossbow +uplink-ebow-desc = A fairly quiet weapon that automatically reloads and stuns. It goes well with other types of weapons. \ No newline at end of file diff --git a/Resources/Locale/ru-RU/_white/prototypes/entities/objects/weapons/guns/battery/ebow.ftl b/Resources/Locale/ru-RU/_white/prototypes/entities/objects/weapons/guns/battery/ebow.ftl new file mode 100644 index 0000000000..a8c7d268f7 --- /dev/null +++ b/Resources/Locale/ru-RU/_white/prototypes/entities/objects/weapons/guns/battery/ebow.ftl @@ -0,0 +1,2 @@ +ent-EnergyCrossbowMini = Mаленький энергетический арбалет + .desc = Стреляет энергетическими болтами, которые отравляют и оглушают цель. \ No newline at end of file diff --git a/Resources/Locale/ru-RU/_white/store/uplink-catalog.ftl b/Resources/Locale/ru-RU/_white/store/uplink-catalog.ftl index 5953a18549..025ac86b8e 100644 --- a/Resources/Locale/ru-RU/_white/store/uplink-catalog.ftl +++ b/Resources/Locale/ru-RU/_white/store/uplink-catalog.ftl @@ -2,4 +2,7 @@ uplink-emp-flashlight-desc = Замаскированное под фонарик устройство. При ударе выпускает ЭМИ, поражающий электрические устройства. uplink-betrayal-knife-name = Предательский кинжал -uplink-betrayal-knife-desc = Предательский кинжал позволяет пользователю телепортироваться на короткое расстояние, а также наносит значительные повреждения при ударе в спину. \ No newline at end of file +uplink-betrayal-knife-desc = Предательский кинжал позволяет пользователю телепортироваться на короткое расстояние, а также наносит значительные повреждения при ударе в спину. + +uplink-ebow-name = Маленький энергетический арбалет +uplink-ebow-desc = Довольно тихое оружие, которое автоматически перезаряжается и оглушает. Хорошо сочетается с другими видами оружия. \ No newline at end of file diff --git a/Resources/Prototypes/_White/Catalog/uplink_catalog.yml b/Resources/Prototypes/_White/Catalog/uplink_catalog.yml index 4c1e4b0a60..43f9330c03 100644 --- a/Resources/Prototypes/_White/Catalog/uplink_catalog.yml +++ b/Resources/Prototypes/_White/Catalog/uplink_catalog.yml @@ -24,3 +24,20 @@ tags: - NukeOpsUplink saleLimit: 1 + +- type: listing + id: UplinkMiniEbow + name: uplink-ebow-name + description: uplink-ebow-desc + icon: { sprite: /Textures/_White/Objects/Weapons/Guns/Battery/mini-ebow.rsi, state: icon } + productEntity: EnergyCrossbowMini + cost: + Telecrystal: 10 + categories: + - UplinkWeapons + conditions: + - !type:StoreWhitelistCondition + blacklist: + tags: + - NukeOpsUplink + saleLimit: 1 \ No newline at end of file diff --git a/Resources/Prototypes/_White/Entities/Objects/Weapons/Guns/Battery/mini_ebow.yml b/Resources/Prototypes/_White/Entities/Objects/Weapons/Guns/Battery/mini_ebow.yml new file mode 100644 index 0000000000..e6309f652b --- /dev/null +++ b/Resources/Prototypes/_White/Entities/Objects/Weapons/Guns/Battery/mini_ebow.yml @@ -0,0 +1,36 @@ +- type: entity + name: small energy crossbow + description: Shoots energy bolts that poison and stun the target. + parent: BaseItem + id: EnergyCrossbowMini + components: + - type: Sprite + sprite: _White/Objects/Weapons/Guns/Battery/mini-ebow.rsi + state: icon + - type: Item + size: Small + sprite: _White/Objects/Weapons/Guns/Battery/mini-ebow.rsi + - type: Clothing + slots: + - Belt + - type: Gun + resetOnHandSelected: false + fireRate: 0.4 + soundGunshot: + path: /Audio/Weapons/click.ogg + - type: RechargeBasicEntityAmmo + rechargeCooldown: 1.5 + rechargeSound: + path: /Audio/Weapons/Guns/MagIn/revolver_magin.ogg + - type: BasicEntityAmmoProvider + proto: BoltEnergyCrossbow + capacity: 1 + count: 1 + - type: AmmoCounter + - type: GenericVisualizer + visuals: + enum.AmmoVisuals.HasAmmo: + base: + True: { state: icon } + False: { state: empty } + - type: Appearance diff --git a/Resources/Prototypes/_White/Entities/Objects/Weapons/Guns/Projectiles/bolts..yml b/Resources/Prototypes/_White/Entities/Objects/Weapons/Guns/Projectiles/bolts..yml new file mode 100644 index 0000000000..4bf6ad8722 --- /dev/null +++ b/Resources/Prototypes/_White/Entities/Objects/Weapons/Guns/Projectiles/bolts..yml @@ -0,0 +1,31 @@ +- type: entity + name: energy crossbow bolt + parent: BaseBullet + id: BoltEnergyCrossbow + noSpawn: true + components: + - type: Sprite + sprite: _White/Objects/Weapons/Guns/Projectiles/ebolt.rsi + state: bullet + - type: Ammo + muzzleFlash: null + - type: Projectile + impactEffect: null + damage: + types: + Poison: 15 + - type: Reflective + reflective: + - Energy + - type: Fixtures + fixtures: + projectile: + shape: + !type:PhysShapeAabb + bounds: "-0.1,-0.2,0.1,0.2" + hard: false + mask: + - Opaque + - type: KnockdownOnCollide + behavior: AlwaysDrop + - type: BlurOnCollide \ No newline at end of file diff --git a/Resources/Prototypes/status_effects.yml b/Resources/Prototypes/status_effects.yml index 37da86f6a8..0c29d79d5c 100644 --- a/Resources/Prototypes/status_effects.yml +++ b/Resources/Prototypes/status_effects.yml @@ -60,8 +60,13 @@ - type: statusEffect id: StaminaModifier -# WD EDIT +# WD EDIT START - type: statusEffect id: RecentlyBlocked alwaysAllowed: true alert: RecentlyBlocked + +- type: statusEffect + id: BlurryVision + alwaysAllowed: true +# WD EDIT END diff --git a/Resources/Textures/_White/Objects/Weapons/Guns/Battery/mini-ebow.rsi/bolt.png b/Resources/Textures/_White/Objects/Weapons/Guns/Battery/mini-ebow.rsi/bolt.png new file mode 100644 index 0000000000..70451918e4 Binary files /dev/null and b/Resources/Textures/_White/Objects/Weapons/Guns/Battery/mini-ebow.rsi/bolt.png differ diff --git a/Resources/Textures/_White/Objects/Weapons/Guns/Battery/mini-ebow.rsi/empty.png b/Resources/Textures/_White/Objects/Weapons/Guns/Battery/mini-ebow.rsi/empty.png new file mode 100644 index 0000000000..799e188ec8 Binary files /dev/null and b/Resources/Textures/_White/Objects/Weapons/Guns/Battery/mini-ebow.rsi/empty.png differ diff --git a/Resources/Textures/_White/Objects/Weapons/Guns/Battery/mini-ebow.rsi/icon.png b/Resources/Textures/_White/Objects/Weapons/Guns/Battery/mini-ebow.rsi/icon.png new file mode 100644 index 0000000000..4f19aa0082 Binary files /dev/null and b/Resources/Textures/_White/Objects/Weapons/Guns/Battery/mini-ebow.rsi/icon.png differ diff --git a/Resources/Textures/_White/Objects/Weapons/Guns/Battery/mini-ebow.rsi/inhand-left.png b/Resources/Textures/_White/Objects/Weapons/Guns/Battery/mini-ebow.rsi/inhand-left.png new file mode 100644 index 0000000000..df7af5c44d Binary files /dev/null and b/Resources/Textures/_White/Objects/Weapons/Guns/Battery/mini-ebow.rsi/inhand-left.png differ diff --git a/Resources/Textures/_White/Objects/Weapons/Guns/Battery/mini-ebow.rsi/inhand-right.png b/Resources/Textures/_White/Objects/Weapons/Guns/Battery/mini-ebow.rsi/inhand-right.png new file mode 100644 index 0000000000..7ca32199cc Binary files /dev/null and b/Resources/Textures/_White/Objects/Weapons/Guns/Battery/mini-ebow.rsi/inhand-right.png differ diff --git a/Resources/Textures/_White/Objects/Weapons/Guns/Battery/mini-ebow.rsi/meta.json b/Resources/Textures/_White/Objects/Weapons/Guns/Battery/mini-ebow.rsi/meta.json new file mode 100644 index 0000000000..7bc851308f --- /dev/null +++ b/Resources/Textures/_White/Objects/Weapons/Guns/Battery/mini-ebow.rsi/meta.json @@ -0,0 +1,28 @@ +{ + "version": 1, + "license": "CC-BY-SA-3.0", + "copyright": "Taken from tgstation at https://github.com/tgstation/tgstation/commit/40d89d11ea4a5cb81d61dc1018b46f4e7d32c62a", + "size": { + "x": 32, + "y": 32 + }, + "states": [ + { + "name": "icon" + }, + { + "name": "empty" + }, + { + "name": "bolt" + }, + { + "name": "inhand-left", + "directions": 4 + }, + { + "name": "inhand-right", + "directions": 4 + } + ] +} diff --git a/Resources/Textures/_White/Objects/Weapons/Guns/Projectiles/ebolt.rsi/bullet.png b/Resources/Textures/_White/Objects/Weapons/Guns/Projectiles/ebolt.rsi/bullet.png new file mode 100644 index 0000000000..c94779d864 Binary files /dev/null and b/Resources/Textures/_White/Objects/Weapons/Guns/Projectiles/ebolt.rsi/bullet.png differ diff --git a/Resources/Textures/_White/Objects/Weapons/Guns/Projectiles/ebolt.rsi/meta.json b/Resources/Textures/_White/Objects/Weapons/Guns/Projectiles/ebolt.rsi/meta.json new file mode 100644 index 0000000000..8436af22e0 --- /dev/null +++ b/Resources/Textures/_White/Objects/Weapons/Guns/Projectiles/ebolt.rsi/meta.json @@ -0,0 +1,14 @@ +{ + "version": 1, + "license": "CC-BY-SA-3.0", + "copyright": "See copyright for above folder (Weapons/Guns/Projectiles)", + "size": { + "x": 32, + "y": 32 + }, + "states": [ + { + "name": "bullet" + } + ] +}