From ce54ec63499b053350b9476844ccb0da7feee3a2 Mon Sep 17 00:00:00 2001 From: Dvir Date: Fri, 28 Jul 2023 20:11:19 +0300 Subject: [PATCH] EMP --- Content.Server/_NF/M_Emp/M_EmpSystem.cs | 2 +- .../Locale/en-US/_NF/store/uplink-catalog.ftl | 2 + .../Catalog/Fills/Boxes/ammunition.yml | 4 +- .../Weapons/Guns/Ammunition/Boxes/pistol.yml | 4 +- .../Guns/Ammunition/Cartridges/pistol.yml | 2 +- .../Guns/Ammunition/Magazines/pistol.yml | 2 +- .../Guns/Ammunition/Projectiles/pistol.yml | 3 +- .../Weapons/Guns/Ammunition/explosives.yml | 35 ---------- .../Weapons/Guns/Battery/battery_guns.yml | 35 ---------- .../Weapons/Guns/Projectiles/projectiles.yml | 2 +- .../_NF/Catalog/Fills/Backpacks/duffelbag.yml | 11 ++++ .../Prototypes/_NF/Catalog/uplink_catalog.yml | 10 +++ .../Weapons/Ammunition/Boxes/pistol.yml | 0 .../Weapons/Ammunition/Cartridges/pistol.yml | 0 .../Weapons/Ammunition/Magazines/pistol.yml | 0 .../Weapons/Ammunition/Projectiles/pistol.yml | 0 .../Objects/Weapons/Ammunition/explosives.yml | 38 +++++++++++ .../Weapons/Guns/Battery/battery_guns.yml | 34 ++++++++++ .../Weapons/Guns/Launchers/launchers.yml | 65 +++++++++++++++++++ .../Weapons/Guns/Projectiles/projectiles.yml | 0 20 files changed, 170 insertions(+), 79 deletions(-) create mode 100644 Resources/Locale/en-US/_NF/store/uplink-catalog.ftl create mode 100644 Resources/Prototypes/_NF/Catalog/Fills/Backpacks/duffelbag.yml create mode 100644 Resources/Prototypes/_NF/Catalog/uplink_catalog.yml create mode 100644 Resources/Prototypes/_NF/Entities/Objects/Weapons/Ammunition/Boxes/pistol.yml create mode 100644 Resources/Prototypes/_NF/Entities/Objects/Weapons/Ammunition/Cartridges/pistol.yml create mode 100644 Resources/Prototypes/_NF/Entities/Objects/Weapons/Ammunition/Magazines/pistol.yml create mode 100644 Resources/Prototypes/_NF/Entities/Objects/Weapons/Ammunition/Projectiles/pistol.yml create mode 100644 Resources/Prototypes/_NF/Entities/Objects/Weapons/Ammunition/explosives.yml create mode 100644 Resources/Prototypes/_NF/Entities/Objects/Weapons/Guns/Battery/battery_guns.yml create mode 100644 Resources/Prototypes/_NF/Entities/Objects/Weapons/Guns/Launchers/launchers.yml create mode 100644 Resources/Prototypes/_NF/Entities/Objects/Weapons/Guns/Projectiles/projectiles.yml diff --git a/Content.Server/_NF/M_Emp/M_EmpSystem.cs b/Content.Server/_NF/M_Emp/M_EmpSystem.cs index 2c9a7a0bc37..d5fd68ef916 100644 --- a/Content.Server/_NF/M_Emp/M_EmpSystem.cs +++ b/Content.Server/_NF/M_Emp/M_EmpSystem.cs @@ -20,7 +20,7 @@ using Content.Server.DeviceLinking.Systems; // TO ANYONE LOOKING AT THIS CODE, IM SORRY -// This code was reused for the salvage magnet and is a mess right now as it is, it has no known issues with it as for now but its not cleaned as it sould be. +// This code was reused for the salvage magnet and is a mess right now as it is, it has no known issues with, I hope, but its not cleaned as it sould be. // If you know what you are doing, fix this please to look "usable" // - Dvir01 diff --git a/Resources/Locale/en-US/_NF/store/uplink-catalog.ftl b/Resources/Locale/en-US/_NF/store/uplink-catalog.ftl new file mode 100644 index 00000000000..89f0c2cf6c2 --- /dev/null +++ b/Resources/Locale/en-US/_NF/store/uplink-catalog.ftl @@ -0,0 +1,2 @@ +uplink-emp-grenade-launcher-bundle-name = EMP China-Lake Bundle +uplink-emp-grenade-launcher-bundle-desc = An old China-Lake grenade launcher bundled with 8 rounds of EMP. \ No newline at end of file diff --git a/Resources/Prototypes/Catalog/Fills/Boxes/ammunition.yml b/Resources/Prototypes/Catalog/Fills/Boxes/ammunition.yml index a02b7bbb59b..cd8b5f463b6 100644 --- a/Resources/Prototypes/Catalog/Fills/Boxes/ammunition.yml +++ b/Resources/Prototypes/Catalog/Fills/Boxes/ammunition.yml @@ -307,12 +307,12 @@ - type: entity name: box of SMG .35 auto (emp) magazines parent: BoxMagazine - id: BoxMagazinePistolSubMachineGunEMP + id: BoxMagazinePistolSubMachineGunEmp description: A box full of SMG .35 auto (emp) magazines. components: - type: StorageFill contents: - - id: MagazinePistolSubMachineGunEMP + - id: MagazinePistolSubMachineGunEmp amount: 3 # Shotgun diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Ammunition/Boxes/pistol.yml b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Ammunition/Boxes/pistol.yml index 0e8e6d069e9..b386ee67ac5 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Ammunition/Boxes/pistol.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Ammunition/Boxes/pistol.yml @@ -85,8 +85,8 @@ - state: rubber - type: entity - id: MagazineBoxPistolIncendiary parent: BaseMagazineBoxPistol + id: MagazineBoxPistolIncendiary name: ammunition box (.35 auto incendiary) components: - type: BallisticAmmoProvider @@ -112,4 +112,4 @@ map: ["enum.GunVisualLayers.Base"] - state: mag-1 map: ["enum.GunVisualLayers.Mag"] - - state: emp \ No newline at end of file + - state: emp diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Ammunition/Cartridges/pistol.yml b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Ammunition/Cartridges/pistol.yml index 936c702b767..c7590865aec 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Ammunition/Cartridges/pistol.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Ammunition/Cartridges/pistol.yml @@ -66,4 +66,4 @@ parent: BaseCartridgePistol components: - type: CartridgeAmmo - proto: BulletPistolEmp \ No newline at end of file + proto: BulletPistolEmp diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Ammunition/Magazines/pistol.yml b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Ammunition/Magazines/pistol.yml index 93b7420c638..83b68c37eb2 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Ammunition/Magazines/pistol.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Ammunition/Magazines/pistol.yml @@ -314,4 +314,4 @@ - state: rubber map: ["enum.GunVisualLayers.Base"] - state: mag-1 - map: ["enum.GunVisualLayers.Mag"] \ No newline at end of file + map: ["enum.GunVisualLayers.Mag"] diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Ammunition/Projectiles/pistol.yml b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Ammunition/Projectiles/pistol.yml index 0be43ee4ce2..994cb5acb63 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Ammunition/Projectiles/pistol.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Ammunition/Projectiles/pistol.yml @@ -59,4 +59,5 @@ parent: BaseBulletEmp noSpawn: true components: - - type: Projectile \ No newline at end of file + - type: Projectile + diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Ammunition/explosives.yml b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Ammunition/explosives.yml index f2edfb68b4b..56d420cb33c 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Ammunition/explosives.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Ammunition/explosives.yml @@ -135,38 +135,3 @@ - type: Sprite sprite: Objects/Weapons/Guns/Ammunition/Explosives/explosives.rsi state: ball - -- type: entity - id: GrenadeEmp - name: emp grenade - parent: BaseGrenade - components: - - type: CartridgeAmmo - proto: BulletGrenadeEmp - - type: Sprite - sprite: Objects/Weapons/Guns/Ammunition/Explosives/explosives.rsi - layers: - - state: emp - map: ["enum.AmmoVisualLayers.Base"] - - type: Appearance - - type: SpentAmmoVisuals - state: emp - suffix: false - -- type: entity - id: CartridgeRocketEmp - name: PG-7VL emp - parent: BaseItem - description: A 1.5 emp warhead designed for the RPG-7 launcher. Has tubular shape. - components: - - type: Tag - tags: - - CartridgeRocket - - type: Item - size: 5 - - type: CartridgeAmmo - proto: BulletRocketEmp - deleteOnSpawn: true - - type: Sprite - sprite: Objects/Weapons/Guns/Ammunition/Explosives/explosives.rsi - state: rpg-emp \ No newline at end of file diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Battery/battery_guns.yml b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Battery/battery_guns.yml index 7b48e547fbb..640b606020d 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Battery/battery_guns.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Battery/battery_guns.yml @@ -460,38 +460,3 @@ - type: Appearance - type: StaticPrice price: 750 - -- type: entity - name: emp emitter - parent: BaseWeaponBattery - id: WeaponEmpEmitter - description: Releases electromagnetic pulses that disrupt or damage many electronic devices or drain power cells. - components: - - type: Sprite - sprite: Objects/Weapons/Guns/Battery/xray.rsi - layers: - - state: base - map: ["enum.GunVisualLayers.Base"] - - state: mag-unshaded-0 - map: ["enum.GunVisualLayers.MagUnshaded"] - shader: unshaded - - type: Clothing - sprite: Objects/Weapons/Guns/Battery/xray.rsi - - type: Gun - fireRate: 1 - selectedMode: SemiAuto - availableModes: - - SemiAuto - soundGunshot: - path: /Audio/Weapons/Guns/Gunshots/laser3.ogg - - type: Battery - maxCharge: 1000 - startingCharge: 1000 - - type: ProjectileBatteryAmmoProvider - proto: ProjectileEmp - fireCost: 1000 - - type: MagazineVisuals - magState: mag - steps: 5 - zeroVisible: true - - type: Appearance \ No newline at end of file diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Projectiles/projectiles.yml b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Projectiles/projectiles.yml index 22b18a50dd4..38cc45b79cb 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Projectiles/projectiles.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Projectiles/projectiles.yml @@ -814,4 +814,4 @@ - type: EmpOnTrigger range: 2 energyConsumption: 50000 - disableDuration: 30 \ No newline at end of file + disableDuration: 30 diff --git a/Resources/Prototypes/_NF/Catalog/Fills/Backpacks/duffelbag.yml b/Resources/Prototypes/_NF/Catalog/Fills/Backpacks/duffelbag.yml new file mode 100644 index 00000000000..acd53d4e257 --- /dev/null +++ b/Resources/Prototypes/_NF/Catalog/Fills/Backpacks/duffelbag.yml @@ -0,0 +1,11 @@ +- type: entity + parent: ClothingBackpackDuffelSyndicateBundle + id: ClothingBackpackDuffelSyndicateFilledEmpGrenadeLauncher + name: China-Lake EMP bundle + description: "An old China-Lake grenade launcher bundled with 8 rounds of EMP." + components: + - type: StorageFill + contents: + - id: WeaponLauncherChinaLakeEmp + - id: GrenadeEmp + amount: 8 diff --git a/Resources/Prototypes/_NF/Catalog/uplink_catalog.yml b/Resources/Prototypes/_NF/Catalog/uplink_catalog.yml new file mode 100644 index 00000000000..f7c196cb41f --- /dev/null +++ b/Resources/Prototypes/_NF/Catalog/uplink_catalog.yml @@ -0,0 +1,10 @@ +- type: listing + id: UplinkEmpGrenadeLauncherBundle + name: uplink-emp-grenade-launcher-bundle-name + description: uplink-emp-grenade-launcher-bundle-desc + icon: { sprite: /Textures/Objects/Weapons/Guns/Launchers/china_lake.rsi, state: icon } + productEntity: ClothingBackpackDuffelSyndicateFilledEmpGrenadeLauncher + cost: + Telecrystal: 25 + categories: + - UplinkBundles diff --git a/Resources/Prototypes/_NF/Entities/Objects/Weapons/Ammunition/Boxes/pistol.yml b/Resources/Prototypes/_NF/Entities/Objects/Weapons/Ammunition/Boxes/pistol.yml new file mode 100644 index 00000000000..e69de29bb2d diff --git a/Resources/Prototypes/_NF/Entities/Objects/Weapons/Ammunition/Cartridges/pistol.yml b/Resources/Prototypes/_NF/Entities/Objects/Weapons/Ammunition/Cartridges/pistol.yml new file mode 100644 index 00000000000..e69de29bb2d diff --git a/Resources/Prototypes/_NF/Entities/Objects/Weapons/Ammunition/Magazines/pistol.yml b/Resources/Prototypes/_NF/Entities/Objects/Weapons/Ammunition/Magazines/pistol.yml new file mode 100644 index 00000000000..e69de29bb2d diff --git a/Resources/Prototypes/_NF/Entities/Objects/Weapons/Ammunition/Projectiles/pistol.yml b/Resources/Prototypes/_NF/Entities/Objects/Weapons/Ammunition/Projectiles/pistol.yml new file mode 100644 index 00000000000..e69de29bb2d diff --git a/Resources/Prototypes/_NF/Entities/Objects/Weapons/Ammunition/explosives.yml b/Resources/Prototypes/_NF/Entities/Objects/Weapons/Ammunition/explosives.yml new file mode 100644 index 00000000000..f41471aa9bc --- /dev/null +++ b/Resources/Prototypes/_NF/Entities/Objects/Weapons/Ammunition/explosives.yml @@ -0,0 +1,38 @@ +# Rockets + +- type: entity + id: CartridgeRocketEmp + name: PG-7VL emp + parent: BaseItem + description: A 1.5 emp warhead designed for the RPG-7 launcher. Has tubular shape. + components: + - type: Tag + tags: + - CartridgeRocket + - type: Item + size: 5 + - type: CartridgeAmmo + proto: BulletRocketEmp + deleteOnSpawn: true + - type: Sprite + sprite: Objects/Weapons/Guns/Ammunition/Explosives/explosives.rsi + state: rpg-emp + +# Grenades + +- type: entity + id: GrenadeEmp + name: emp grenade # Chinalake EMP + parent: BaseGrenade + components: + - type: CartridgeAmmo + proto: BulletGrenadeEmp + - type: Sprite + sprite: Objects/Weapons/Guns/Ammunition/Explosives/explosives.rsi + layers: + - state: emp + map: ["enum.AmmoVisualLayers.Base"] + - type: Appearance + - type: SpentAmmoVisuals + state: emp + suffix: false diff --git a/Resources/Prototypes/_NF/Entities/Objects/Weapons/Guns/Battery/battery_guns.yml b/Resources/Prototypes/_NF/Entities/Objects/Weapons/Guns/Battery/battery_guns.yml new file mode 100644 index 00000000000..7f64e8c49e6 --- /dev/null +++ b/Resources/Prototypes/_NF/Entities/Objects/Weapons/Guns/Battery/battery_guns.yml @@ -0,0 +1,34 @@ +- type: entity + name: emp emitter + parent: BaseWeaponBattery + id: WeaponEmpEmitter + description: Releases electromagnetic pulses that disrupt or damage many electronic devices or drain power cells. + components: + - type: Sprite + sprite: Objects/Weapons/Guns/Battery/xray.rsi + layers: + - state: base + map: ["enum.GunVisualLayers.Base"] + - state: mag-unshaded-0 + map: ["enum.GunVisualLayers.MagUnshaded"] + shader: unshaded + - type: Clothing + sprite: Objects/Weapons/Guns/Battery/xray.rsi + - type: Gun + fireRate: 1 + selectedMode: SemiAuto + availableModes: + - SemiAuto + soundGunshot: + path: /Audio/Weapons/Guns/Gunshots/laser3.ogg + - type: Battery + maxCharge: 1000 + startingCharge: 1000 + - type: ProjectileBatteryAmmoProvider + proto: ProjectileEmp + fireCost: 1000 + - type: MagazineVisuals + magState: mag + steps: 5 + zeroVisible: true + - type: Appearance diff --git a/Resources/Prototypes/_NF/Entities/Objects/Weapons/Guns/Launchers/launchers.yml b/Resources/Prototypes/_NF/Entities/Objects/Weapons/Guns/Launchers/launchers.yml new file mode 100644 index 00000000000..5ad52d050d9 --- /dev/null +++ b/Resources/Prototypes/_NF/Entities/Objects/Weapons/Guns/Launchers/launchers.yml @@ -0,0 +1,65 @@ +- type: entity + name: china lake + parent: BaseWeaponLauncher + suffix: EMP + id: WeaponLauncherChinaLakeEmp + description: PLOOP + components: + - type: Sprite + sprite: Objects/Weapons/Guns/Launchers/china_lake.rsi + layers: + - state: icon + map: ["enum.GunVisualLayers.Base"] + - type: Clothing + sprite: Objects/Weapons/Guns/Launchers/china_lake.rsi + - type: AmmoCounter + - type: Gun + fireRate: 1 + selectedMode: SemiAuto + availableModes: + - SemiAuto + soundGunshot: + path: /Audio/Weapons/Guns/Gunshots/grenade_launcher.ogg + - type: BallisticAmmoProvider + whitelist: + tags: + - Grenade + autoCycle: false + capacity: 3 + proto: GrenadeEmp + soundInsert: + path: /Audio/Weapons/Guns/MagIn/batrifle_magin.ogg + +- type: entity + name: RPG-7 + suffix: EMP + parent: BaseWeaponLauncher + id: WeaponLauncherRocketEmp + description: A modified ancient rocket-propelled grenade launcher. + components: + - type: Sprite + sprite: Objects/Weapons/Guns/Launchers/rocket.rsi + layers: + - state: base + map: ["enum.GunVisualLayers.Base"] + - state: mag-0 + map: ["enum.GunVisualLayers.Mag"] + - type: Clothing + sprite: Objects/Weapons/Guns/Launchers/rocket.rsi + - type: Gun + fireRate: 0.5 + soundGunshot: + path: /Audio/Weapons/Guns/Gunshots/rpgfire.ogg + - type: BallisticAmmoProvider + whitelist: + tags: + - CartridgeRocket + proto: CartridgeRocketEmp + capacity: 1 + soundInsert: + path: /Audio/Weapons/Guns/MagIn/batrifle_magin.ogg + - type: MagazineVisuals + magState: mag + steps: 2 + zeroVisible: false + - type: Appearance \ No newline at end of file diff --git a/Resources/Prototypes/_NF/Entities/Objects/Weapons/Guns/Projectiles/projectiles.yml b/Resources/Prototypes/_NF/Entities/Objects/Weapons/Guns/Projectiles/projectiles.yml new file mode 100644 index 00000000000..e69de29bb2d