diff --git a/Content.Server/Tesla/Components/TeslaEnergyBallComponent.cs b/Content.Server/Tesla/Components/TeslaEnergyBallComponent.cs index 0f2b38da84..5e1c62f304 100644 --- a/Content.Server/Tesla/Components/TeslaEnergyBallComponent.cs +++ b/Content.Server/Tesla/Components/TeslaEnergyBallComponent.cs @@ -28,6 +28,18 @@ public sealed partial class TeslaEnergyBallComponent : Component [DataField, ViewVariables(VVAccess.ReadWrite)] public float NeedEnergyToSpawn = 100f; + /// + /// The amount of energy to which the tesla must reach in order to be destroyed. + /// + [DataField, ViewVariables(VVAccess.ReadWrite)] + public float EnergyToDespawn = -100f; + + /// + /// Played when energy reaches the lower limit (and entity destroyed) + /// + [DataField] + public SoundSpecifier? SoundCollapse; + /// /// Entities that spawn when the energy limit is reached /// diff --git a/Content.Server/Tesla/EntitySystem/TeslaEnergyBallSystem.cs b/Content.Server/Tesla/EntitySystem/TeslaEnergyBallSystem.cs index ff7793d3b2..606f4615af 100644 --- a/Content.Server/Tesla/EntitySystem/TeslaEnergyBallSystem.cs +++ b/Content.Server/Tesla/EntitySystem/TeslaEnergyBallSystem.cs @@ -47,5 +47,10 @@ public sealed class TeslaEnergyBallSystem : EntitySystem component.Energy -= component.NeedEnergyToSpawn; Spawn(component.SpawnProto, Transform(uid).Coordinates); } + if (component.Energy < component.EnergyToDespawn) + { + _audio.PlayPvs(component.SoundCollapse, uid); + QueueDel(uid); + } } } diff --git a/Resources/Locale/en-US/prototypes/catalog/fills/crates/engineering-crates.ftl b/Resources/Locale/en-US/prototypes/catalog/fills/crates/engineering-crates.ftl index 49bb0ecab4..5aa7f01036 100644 --- a/Resources/Locale/en-US/prototypes/catalog/fills/crates/engineering-crates.ftl +++ b/Resources/Locale/en-US/prototypes/catalog/fills/crates/engineering-crates.ftl @@ -42,3 +42,6 @@ ent-CrateRCDAmmo = RCD ammo crate ent-CrateRCD = RCD crate .desc = A crate containing a single Rapid Construction Device. + +ent-CrateParticleDecelerators = Particle Decelerators crate + .desc = A crate containing 3 Particle Decelerators. \ No newline at end of file diff --git a/Resources/Locale/en-US/research/technologies.ftl b/Resources/Locale/en-US/research/technologies.ftl index c978aeaa58..99d0c20c65 100644 --- a/Resources/Locale/en-US/research/technologies.ftl +++ b/Resources/Locale/en-US/research/technologies.ftl @@ -59,6 +59,7 @@ research-technology-gravity-manipulation = Gravity Manipulation research-technology-advanced-anomaly-research = Advanced Anomaly Research research-technology-rped = Rapid Part Exchange research-technology-super-parts = Super Parts +research-technology-deterrence = Deterrence Technologies research-technology-janitorial-equipment = Janitorial Equipment research-technology-laundry-tech = Laundry Tech diff --git a/Resources/Prototypes/Catalog/Cargo/cargo_engineering.yml b/Resources/Prototypes/Catalog/Cargo/cargo_engineering.yml index 9644dc261c..dc3bb851a7 100644 --- a/Resources/Prototypes/Catalog/Cargo/cargo_engineering.yml +++ b/Resources/Prototypes/Catalog/Cargo/cargo_engineering.yml @@ -117,3 +117,14 @@ cost: 800 category: Engineering group: market + +- type: cargoProduct + id: EngineeringParticleDecelerators + icon: + sprite: Objects/Weapons/Guns/Battery/particle_decelerator.rsi + state: base + product: CrateParticleDecelerators + cost: 15000 + category: Engineering + group: market + \ No newline at end of file diff --git a/Resources/Prototypes/Catalog/Fills/Crates/engineering.yml b/Resources/Prototypes/Catalog/Fills/Crates/engineering.yml index e33e191300..83f7483a0d 100644 --- a/Resources/Prototypes/Catalog/Fills/Crates/engineering.yml +++ b/Resources/Prototypes/Catalog/Fills/Crates/engineering.yml @@ -153,3 +153,12 @@ - type: StorageFill contents: - id: RCD + +- type: entity + id: CrateParticleDecelerators + parent: CrateEngineeringSecure + components: + - type: StorageFill + contents: + - id: WeaponParticleDecelerator + amount: 3 diff --git a/Resources/Prototypes/Entities/Objects/Devices/holoprojectors.yml b/Resources/Prototypes/Entities/Objects/Devices/holoprojectors.yml index c347a91180..7402bd6548 100644 --- a/Resources/Prototypes/Entities/Objects/Devices/holoprojectors.yml +++ b/Resources/Prototypes/Entities/Objects/Devices/holoprojectors.yml @@ -41,6 +41,23 @@ - type: StaticPrice price: 80 +- type: entity + parent: Holoprojector + id: HoloprojectorField + name: force field projector + description: Creates an impassable forcefield that won't let anything through. Close proximity may or may not cause cancer. + components: + - type: HolosignProjector + signProto: HolosignForcefield + chargeUse: 120 + - type: Sprite + sprite: Objects/Devices/Holoprojectors/field.rsi + state: icon + - type: Tag + tags: + - HolofanProjector + - type: StaticPrice + price: 250 - type: entity parent: Holoprojector 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 f667e2241a..445abaf2a1 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Battery/battery_guns.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Battery/battery_guns.yml @@ -313,6 +313,37 @@ proto: RedHeavyLaser fireCost: 100 +- type: entity + name: portable particle decelerator + parent: BaseWeaponBattery + id: WeaponParticleDecelerator + description: A portable particle decelerator capable of decomposing a tesla or singularity. + components: + - type: Item + size: Ginormous + - type: MultiHandedItem + - type: ClothingSpeedModifier + walkModifier: 0.6 + sprintModifier: 0.6 + - type: HeldSpeedModifier + - type: Sprite + sprite: Objects/Weapons/Guns/Battery/particle_decelerator.rsi + layers: + - state: base + map: ["enum.GunVisualLayers.Base"] + - type: Gun + fireRate: 0.5 + soundGunshot: + path: /Audio/Weapons/emitter.ogg + params: + pitch: 2 + - type: ProjectileBatteryAmmoProvider + proto: AntiParticlesProjectile + fireCost: 500 + - type: Battery + maxCharge: 10000 + startingCharge: 10000 + - type: entity name: x-ray cannon parent: BaseWeaponBattery diff --git a/Resources/Prototypes/Entities/Structures/Holographic/projections.yml b/Resources/Prototypes/Entities/Structures/Holographic/projections.yml index 1a81ac4702..d2a5853fcb 100644 --- a/Resources/Prototypes/Entities/Structures/Holographic/projections.yml +++ b/Resources/Prototypes/Entities/Structures/Holographic/projections.yml @@ -76,3 +76,43 @@ color: red - type: Climbable - type: Clickable + +- type: entity + id: HolosignForcefield + parent: HolosignWetFloor + name: holographic force field + description: A powerful temporal containment field that doesn't let anything through, not even a tesla or singularity. + components: + - type: Physics + bodyType: Static + canCollide: true + - type: Sprite + sprite: Structures/Holo/field.rsi + state: icon + - type: Fixtures + fixtures: + fix1: + shape: + !type:PhysShapeAabb + bounds: "-0.5,-0.5,0.5,0.5" + mask: + - FullTileMask + layer: + - GlassLayer + - type: TimedDespawn + lifetime: 180 + - type: PointLight + enabled: true + radius: 3 + color: blue + - type: Clickable + - type: ContainmentField + throwForce: 0 + - type: Destructible + thresholds: + - trigger: + !type:DamageTrigger + damage: 60 + behaviors: + - !type:DoActsBehavior + acts: [ "Destruction" ] \ No newline at end of file diff --git a/Resources/Prototypes/Entities/Structures/Machines/lathe.yml b/Resources/Prototypes/Entities/Structures/Machines/lathe.yml index d6b30e16a5..25c2355015 100644 --- a/Resources/Prototypes/Entities/Structures/Machines/lathe.yml +++ b/Resources/Prototypes/Entities/Structures/Machines/lathe.yml @@ -246,6 +246,8 @@ - Retractor - Cautery - Drill + - WeaponParticleDecelerator + - HoloprojectorField - Saw - Hemostat - Beaker diff --git a/Resources/Prototypes/Entities/Structures/Power/Generation/PA/particles.yml b/Resources/Prototypes/Entities/Structures/Power/Generation/PA/particles.yml index 3c0b0d6b0b..951c9ec5c9 100644 --- a/Resources/Prototypes/Entities/Structures/Power/Generation/PA/particles.yml +++ b/Resources/Prototypes/Entities/Structures/Power/Generation/PA/particles.yml @@ -47,3 +47,20 @@ Level3: {state: particle3} - type: GuideHelp guides: [ Singularity, Power ] + +- type: entity + name: anti particles + description: Accelerated negative particles. + id: AntiParticlesProjectile + parent: ParticlesProjectile + noSpawn: true + components: + - type: Sprite + layers: + - sprite: Structures/Power/Generation/PA/particle.rsi + color: red + state: particle0 + shader: unshaded + map: [ "unshaded" ] + - type: SinguloFood + energy: -10 diff --git a/Resources/Prototypes/Entities/Structures/Power/Generation/Tesla/energyball.yml b/Resources/Prototypes/Entities/Structures/Power/Generation/Tesla/energyball.yml index 601027fecc..4567c6d044 100644 --- a/Resources/Prototypes/Entities/Structures/Power/Generation/Tesla/energyball.yml +++ b/Resources/Prototypes/Entities/Structures/Power/Generation/Tesla/energyball.yml @@ -68,6 +68,10 @@ consumeEntities: false - type: TeslaEnergyBall spawnProto: TeslaMiniEnergyBall + soundCollapse: + path: /Audio/Effects/tesla_collapse.ogg + params: + variation: 0.3 - type: LightningArcShooter arcDepth: 3 maxLightningArc: 4 diff --git a/Resources/Prototypes/Recipes/Lathes/tools.yml b/Resources/Prototypes/Recipes/Lathes/tools.yml index 7a5df62e05..6c7612436e 100644 --- a/Resources/Prototypes/Recipes/Lathes/tools.yml +++ b/Resources/Prototypes/Recipes/Lathes/tools.yml @@ -202,3 +202,21 @@ Glass: 500 Plasma: 300 Gold: 50 + +- type: latheRecipe + id: HoloprojectorField + result: HoloprojectorField + completetime: 3 + materials: + Steel: 500 + Plasma: 300 + Glass: 100 + +- type: latheRecipe + id: WeaponParticleDecelerator + result: WeaponParticleDecelerator + completetime: 6 + materials: + Steel: 750 + Plasma: 150 + Uranium: 150 \ No newline at end of file diff --git a/Resources/Prototypes/Research/experimental.yml b/Resources/Prototypes/Research/experimental.yml index ab52a07d99..e447e219fa 100644 --- a/Resources/Prototypes/Research/experimental.yml +++ b/Resources/Prototypes/Research/experimental.yml @@ -139,6 +139,19 @@ recipeUnlocks: - RPED +- type: technology + id: DeterrenceTechnologies + name: research-technology-deterrence + icon: + sprite: Objects/Weapons/Guns/Battery/particle_decelerator.rsi + state: base + discipline: Experimental + tier: 2 + cost: 7500 + recipeUnlocks: + - WeaponParticleDecelerator + - HoloprojectorField + # Tier 3 - type: technology diff --git a/Resources/Textures/Objects/Devices/Holoprojectors/field.rsi/icon.png b/Resources/Textures/Objects/Devices/Holoprojectors/field.rsi/icon.png new file mode 100644 index 0000000000..669f1d3c7a Binary files /dev/null and b/Resources/Textures/Objects/Devices/Holoprojectors/field.rsi/icon.png differ diff --git a/Resources/Textures/Objects/Devices/Holoprojectors/field.rsi/meta.json b/Resources/Textures/Objects/Devices/Holoprojectors/field.rsi/meta.json new file mode 100644 index 0000000000..86d3ad0a86 --- /dev/null +++ b/Resources/Textures/Objects/Devices/Holoprojectors/field.rsi/meta.json @@ -0,0 +1,22 @@ +{ + "version": 1, + "size": { + "x": 32, + "y": 32 + }, + "license": "CC-BY-SA-3.0", + "copyright": "Taken from tgstation at https://github.com/tgstation/tgstation/commit/f4017da82ae4de7bfaf8ebdbba33d0de81c15587, and resprited by TheShuEd (github)", + "states": [ + { + "name": "icon", + "delays": [ + [ + 0.3, + 0.3, + 0.3, + 0.3 + ] + ] + } + ] +} \ No newline at end of file diff --git a/Resources/Textures/Objects/Weapons/Guns/Battery/particle_decelerator.rsi/base.png b/Resources/Textures/Objects/Weapons/Guns/Battery/particle_decelerator.rsi/base.png new file mode 100644 index 0000000000..d5411e8406 Binary files /dev/null and b/Resources/Textures/Objects/Weapons/Guns/Battery/particle_decelerator.rsi/base.png differ diff --git a/Resources/Textures/Objects/Weapons/Guns/Battery/particle_decelerator.rsi/inhand-left.png b/Resources/Textures/Objects/Weapons/Guns/Battery/particle_decelerator.rsi/inhand-left.png new file mode 100644 index 0000000000..42676b8e3d Binary files /dev/null and b/Resources/Textures/Objects/Weapons/Guns/Battery/particle_decelerator.rsi/inhand-left.png differ diff --git a/Resources/Textures/Objects/Weapons/Guns/Battery/particle_decelerator.rsi/inhand-right.png b/Resources/Textures/Objects/Weapons/Guns/Battery/particle_decelerator.rsi/inhand-right.png new file mode 100644 index 0000000000..42676b8e3d Binary files /dev/null and b/Resources/Textures/Objects/Weapons/Guns/Battery/particle_decelerator.rsi/inhand-right.png differ diff --git a/Resources/Textures/Objects/Weapons/Guns/Battery/particle_decelerator.rsi/meta.json b/Resources/Textures/Objects/Weapons/Guns/Battery/particle_decelerator.rsi/meta.json new file mode 100644 index 0000000000..f3847c51a0 --- /dev/null +++ b/Resources/Textures/Objects/Weapons/Guns/Battery/particle_decelerator.rsi/meta.json @@ -0,0 +1,22 @@ +{ + "version": 1, + "license": "CC-BY-SA-3.0", + "copyright": "Created by TheShuEd (github) for Space Station 14", + "size": { + "x": 32, + "y": 32 + }, + "states": [ + { + "name": "base" + }, + { + "name": "inhand-left", + "directions": 4 + }, + { + "name": "inhand-right", + "directions": 4 + } + ] +} diff --git a/Resources/Textures/Structures/Holo/field.rsi/icon.png b/Resources/Textures/Structures/Holo/field.rsi/icon.png new file mode 100644 index 0000000000..3d35f4850c Binary files /dev/null and b/Resources/Textures/Structures/Holo/field.rsi/icon.png differ diff --git a/Resources/Textures/Structures/Holo/field.rsi/meta.json b/Resources/Textures/Structures/Holo/field.rsi/meta.json new file mode 100644 index 0000000000..614861a16b --- /dev/null +++ b/Resources/Textures/Structures/Holo/field.rsi/meta.json @@ -0,0 +1,26 @@ +{ + "version": 1, + "size": { + "x": 32, + "y": 32 + }, + "license": "CC-BY-SA-3.0", + "copyright": "Made by TheShuEd (github) for SS14", + "states": [ + { + "name": "icon", + "delays": [ + [ + 0.2, + 0.2, + 0.2, + 0.2, + 0.2, + 0.2, + 0.2, + 0.2 + ] + ] + } + ] +} \ No newline at end of file