]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Teslaloose and Singuloose counterplay (#23444)
authorEd <96445749+TheShuEd@users.noreply.github.com>
Fri, 5 Jan 2024 02:48:09 +0000 (05:48 +0300)
committerGitHub <noreply@github.com>
Fri, 5 Jan 2024 02:48:09 +0000 (18:48 -0800)
* add tesla dissapear mechanic
add field holobarrier

* add PD

* add crafting

* spacing

* added to cargo

* Fix

* resprite + damageable

* oopsie

* Update Resources/Prototypes/Entities/Objects/Weapons/Guns/Battery/battery_guns.yml

Co-authored-by: Kara <lunarautomaton6@gmail.com>
* Update Resources/Prototypes/Entities/Objects/Weapons/Guns/Battery/battery_guns.yml

Co-authored-by: Kara <lunarautomaton6@gmail.com>
* Update Resources/Locale/en-US/research/technologies.ftl

Co-authored-by: Kara <lunarautomaton6@gmail.com>
---------

Co-authored-by: Kara <lunarautomaton6@gmail.com>
22 files changed:
Content.Server/Tesla/Components/TeslaEnergyBallComponent.cs
Content.Server/Tesla/EntitySystem/TeslaEnergyBallSystem.cs
Resources/Locale/en-US/prototypes/catalog/fills/crates/engineering-crates.ftl
Resources/Locale/en-US/research/technologies.ftl
Resources/Prototypes/Catalog/Cargo/cargo_engineering.yml
Resources/Prototypes/Catalog/Fills/Crates/engineering.yml
Resources/Prototypes/Entities/Objects/Devices/holoprojectors.yml
Resources/Prototypes/Entities/Objects/Weapons/Guns/Battery/battery_guns.yml
Resources/Prototypes/Entities/Structures/Holographic/projections.yml
Resources/Prototypes/Entities/Structures/Machines/lathe.yml
Resources/Prototypes/Entities/Structures/Power/Generation/PA/particles.yml
Resources/Prototypes/Entities/Structures/Power/Generation/Tesla/energyball.yml
Resources/Prototypes/Recipes/Lathes/tools.yml
Resources/Prototypes/Research/experimental.yml
Resources/Textures/Objects/Devices/Holoprojectors/field.rsi/icon.png [new file with mode: 0644]
Resources/Textures/Objects/Devices/Holoprojectors/field.rsi/meta.json [new file with mode: 0644]
Resources/Textures/Objects/Weapons/Guns/Battery/particle_decelerator.rsi/base.png [new file with mode: 0644]
Resources/Textures/Objects/Weapons/Guns/Battery/particle_decelerator.rsi/inhand-left.png [new file with mode: 0644]
Resources/Textures/Objects/Weapons/Guns/Battery/particle_decelerator.rsi/inhand-right.png [new file with mode: 0644]
Resources/Textures/Objects/Weapons/Guns/Battery/particle_decelerator.rsi/meta.json [new file with mode: 0644]
Resources/Textures/Structures/Holo/field.rsi/icon.png [new file with mode: 0644]
Resources/Textures/Structures/Holo/field.rsi/meta.json [new file with mode: 0644]

index 0f2b38da8403d5b3510b9f93b12fe67f6a06ccb1..5e1c62f30427281116d3bbb6952850a06fd11e96 100644 (file)
@@ -28,6 +28,18 @@ public sealed partial class TeslaEnergyBallComponent : Component
     [DataField, ViewVariables(VVAccess.ReadWrite)]
     public float NeedEnergyToSpawn = 100f;
 
+    /// <summary>
+    /// The amount of energy to which the tesla must reach in order to be destroyed.
+    /// </summary>
+    [DataField, ViewVariables(VVAccess.ReadWrite)]
+    public float EnergyToDespawn = -100f;
+
+    /// <summary>
+    /// Played when energy reaches the lower limit (and entity destroyed)
+    /// </summary>
+    [DataField]
+    public SoundSpecifier? SoundCollapse;
+
     /// <summary>
     /// Entities that spawn when the energy limit is reached
     /// </summary>
index ff7793d3b2b957260e32d86fccfc7d06b6253e63..606f4615af305127d71319d0006c90255b2c989e 100644 (file)
@@ -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);
+        }
     }
 }
index 49bb0ecab42352ed191d454f07c066a0a5c1ff9c..5aa7f0103648e20fc3e86e0b87f18d3a1c427782 100644 (file)
@@ -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
index c978aeaa580b83f8ef2eec17a80ec2adbe80a13a..99d0c20c65dca9b841083f5702754aaf9e16ba8a 100644 (file)
@@ -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
index 9644dc261cf70c86a41e5993d9a31e3a4c87edad..dc3bb851a7580f8881b0dfb722f4683cc6931947 100644 (file)
   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
index e33e191300b703ef2b56aab7f6a3c4b1d088b0a6..83f7483a0d289a77a136481ad1d072a119cd77d0 100644 (file)
   - type: StorageFill
     contents:
     - id: RCD
+
+- type: entity
+  id: CrateParticleDecelerators
+  parent: CrateEngineeringSecure
+  components:
+  - type: StorageFill
+    contents:
+    - id: WeaponParticleDecelerator
+      amount: 3
index c347a911800165c22c895551dfbb8b34bb055350..7402bd65485605bfb24e352ab4a04fc0fce846a9 100644 (file)
   - 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
index f667e2241adf112f84525c721646b6e8315707a0..445abaf2a199356eccda63b04be1ddfb600c5fdc 100644 (file)
     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
index 1a81ac47024eac0604bf8be0bbae1b918856f95d..d2a5853fcb0614ddd311930da8efddeaa49d2b37 100644 (file)
       color: red\r
     - type: Climbable\r
     - type: Clickable\r
+\r
+- type: entity\r
+  id: HolosignForcefield\r
+  parent: HolosignWetFloor\r
+  name: holographic force field\r
+  description: A powerful temporal containment field that doesn't let anything through, not even a tesla or singularity.\r
+  components:\r
+  - type: Physics\r
+    bodyType: Static\r
+    canCollide: true\r
+  - type: Sprite\r
+    sprite: Structures/Holo/field.rsi\r
+    state: icon\r
+  - type: Fixtures\r
+    fixtures:\r
+      fix1:\r
+        shape:\r
+          !type:PhysShapeAabb\r
+          bounds: "-0.5,-0.5,0.5,0.5"\r
+        mask:\r
+        - FullTileMask\r
+        layer:\r
+        - GlassLayer\r
+  - type: TimedDespawn\r
+    lifetime: 180\r
+  - type: PointLight\r
+    enabled: true\r
+    radius: 3\r
+    color: blue\r
+  - type: Clickable\r
+  - type: ContainmentField\r
+    throwForce: 0\r
+  - type: Destructible\r
+    thresholds:\r
+      - trigger:\r
+          !type:DamageTrigger\r
+          damage: 60\r
+        behaviors:\r
+          - !type:DoActsBehavior\r
+            acts: [ "Destruction" ]
\ No newline at end of file
index d6b30e16a50a7bc02a80686209c597096d657c3a..25c235501548df5373c9da8238b8c7202c4e6d2f 100644 (file)
       - Retractor
       - Cautery
       - Drill
+      - WeaponParticleDecelerator
+      - HoloprojectorField
       - Saw
       - Hemostat
       - Beaker
index 3c0b0d6b0b06d242b70eebca344c4823f8264e79..951c9ec5c997d36fc1f6dd32efeb6ad5392815c6 100644 (file)
             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
index 601027fecc7f00fe927e26e2697a70dceb69e7a5..4567c6d044022b13ac41cba554cccfd39cc0d208 100644 (file)
     consumeEntities: false
   - type: TeslaEnergyBall
     spawnProto: TeslaMiniEnergyBall
+    soundCollapse:
+      path: /Audio/Effects/tesla_collapse.ogg
+      params:
+        variation: 0.3
   - type: LightningArcShooter
     arcDepth: 3
     maxLightningArc: 4
index 7a5df62e0523e022456f7a0f29c74304955dcc0b..6c7612436e6c54bf75647fdbaa6630045b8ec48b 100644 (file)
     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
index ab52a07d9923e54dbaeca7e988c76bc0fd982e9e..e447e219fa5ac20646e1228fbc3b6703d1882412 100644 (file)
   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 (file)
index 0000000..669f1d3
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 (file)
index 0000000..86d3ad0
--- /dev/null
@@ -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 (file)
index 0000000..d5411e8
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 (file)
index 0000000..42676b8
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 (file)
index 0000000..42676b8
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 (file)
index 0000000..f3847c5
--- /dev/null
@@ -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 (file)
index 0000000..3d35f48
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 (file)
index 0000000..614861a
--- /dev/null
@@ -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