]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
CHIMP handcannon (#15667)
authorNemanja <98561806+EmoGarbage404@users.noreply.github.com>
Sun, 23 Apr 2023 23:58:45 +0000 (19:58 -0400)
committerGitHub <noreply@github.com>
Sun, 23 Apr 2023 23:58:45 +0000 (09:58 +1000)
22 files changed:
Content.Server/Anomaly/AnomalySystem.cs
Content.Server/Anomaly/Components/AnomalousParticleComponent.cs
Content.Shared/Anomaly/Components/AnomalyComponent.cs
Resources/Prototypes/Catalog/Research/technologies.yml
Resources/Prototypes/Entities/Objects/Weapons/Guns/Ammunition/Cartridges/magnum.yml
Resources/Prototypes/Entities/Objects/Weapons/Guns/Projectiles/projectiles.yml
Resources/Prototypes/Entities/Objects/Weapons/Guns/Revolvers/revolvers.yml
Resources/Prototypes/Entities/Structures/Machines/lathe.yml
Resources/Prototypes/Recipes/Lathes/devices.yml
Resources/Prototypes/Recipes/Lathes/security.yml
Resources/Prototypes/tags.yml
Resources/Textures/Objects/Weapons/Guns/Ammunition/Casings/anomalous_casing.rsi/base-spent.png [new file with mode: 0644]
Resources/Textures/Objects/Weapons/Guns/Ammunition/Casings/anomalous_casing.rsi/base.png [new file with mode: 0644]
Resources/Textures/Objects/Weapons/Guns/Ammunition/Casings/anomalous_casing.rsi/meta.json [new file with mode: 0644]
Resources/Textures/Objects/Weapons/Guns/Ammunition/Casings/anomalous_casing.rsi/overlay.png [new file with mode: 0644]
Resources/Textures/Objects/Weapons/Guns/Revolvers/chimp.rsi/base.png [new file with mode: 0644]
Resources/Textures/Objects/Weapons/Guns/Revolvers/chimp.rsi/equipped-BELT.png [new file with mode: 0644]
Resources/Textures/Objects/Weapons/Guns/Revolvers/chimp.rsi/inhand-left.png [new file with mode: 0644]
Resources/Textures/Objects/Weapons/Guns/Revolvers/chimp.rsi/inhand-right.png [new file with mode: 0644]
Resources/Textures/Objects/Weapons/Guns/Revolvers/chimp.rsi/mag-unshaded-1.png [new file with mode: 0644]
Resources/Textures/Objects/Weapons/Guns/Revolvers/chimp.rsi/mag-unshaded-2.png [new file with mode: 0644]
Resources/Textures/Objects/Weapons/Guns/Revolvers/chimp.rsi/meta.json [new file with mode: 0644]

index 45e48364804d9a12f4090026d09d25a51adff910..730592cc2f6b8c69f63a2a90e9c7850e7da89da7 100644 (file)
@@ -66,27 +66,27 @@ public sealed partial class AnomalySystem : SharedAnomalySystem
 
     private void OnStartCollide(EntityUid uid, AnomalyComponent component, ref StartCollideEvent args)
     {
-        if (!TryComp<AnomalousParticleComponent>(args.OtherFixture.Body.Owner, out var particleComponent))
+        if (!TryComp<AnomalousParticleComponent>(args.OtherFixture.Body.Owner, out var particle))
             return;
 
-        if (args.OtherFixture.ID != particleComponent.FixtureId)
+        if (args.OtherFixture.ID != particle.FixtureId)
             return;
 
         // small function to randomize because it's easier to read like this
         float VaryValue(float v) => v * Random.NextFloat(MinParticleVariation, MaxParticleVariation);
 
-        if (particleComponent.ParticleType == component.DestabilizingParticleType)
+        if (particle.ParticleType == component.DestabilizingParticleType)
         {
-            ChangeAnomalyStability(uid, VaryValue(component.StabilityPerDestabilizingHit), component);
+            ChangeAnomalyStability(uid, VaryValue(particle.StabilityPerDestabilizingHit), component);
         }
-        else if (particleComponent.ParticleType == component.SeverityParticleType)
+        else if (particle.ParticleType == component.SeverityParticleType)
         {
-            ChangeAnomalySeverity(uid, VaryValue(component.SeverityPerSeverityHit), component);
+            ChangeAnomalySeverity(uid, VaryValue(particle.SeverityPerSeverityHit), component);
         }
-        else if (particleComponent.ParticleType == component.WeakeningParticleType)
+        else if (particle.ParticleType == component.WeakeningParticleType)
         {
-            ChangeAnomalyHealth(uid, VaryValue(component.HealthPerWeakeningeHit), component);
-            ChangeAnomalyStability(uid, VaryValue(component.StabilityPerWeakeningeHit), component);
+            ChangeAnomalyHealth(uid, VaryValue(particle.HealthPerWeakeningeHit), component);
+            ChangeAnomalyStability(uid, VaryValue(particle.StabilityPerWeakeningeHit), component);
         }
     }
 
index 6d8e248c1441dfa504a3c47d70f260bf4f319315..4444d49e3d7fcdb9c327393dcd92d1a6d94e9f9e 100644 (file)
@@ -1,4 +1,5 @@
 using Content.Shared.Anomaly;
+using Content.Shared.Anomaly.Components;
 
 namespace Content.Server.Anomaly.Components;
 
@@ -20,4 +21,32 @@ public sealed class AnomalousParticleComponent : Component
     /// </summary>
     [DataField("fixtureId")]
     public string FixtureId = "projectile";
+
+    /// <summary>
+    /// The amount that the <see cref="AnomalyComponent.Severity"/> increases by when hit
+    /// of an anomalous particle of <seealso cref="AnomalyComponent.SeverityParticleType"/>.
+    /// </summary>
+    [DataField("severityPerSeverityHit")]
+    public float SeverityPerSeverityHit = 0.025f;
+
+    /// <summary>
+    /// The amount that the <see cref="AnomalyComponent.Stability"/> increases by when hit
+    /// of an anomalous particle of <seealso cref="AnomalyComponent.DestabilizingParticleType"/>.
+    /// </summary>
+    [DataField("stabilityPerDestabilizingHit")]
+    public float StabilityPerDestabilizingHit = 0.04f;
+
+    /// <summary>
+    /// The amount that the <see cref="AnomalyComponent.Stability"/> increases by when hit
+    /// of an anomalous particle of <seealso cref="AnomalyComponent.DestabilizingParticleType"/>.
+    /// </summary>
+    [DataField("healthPerWeakeningeHit")]
+    public float HealthPerWeakeningeHit = -0.05f;
+
+    /// <summary>
+    /// The amount that the <see cref="AnomalyComponent.Stability"/> increases by when hit
+    /// of an anomalous particle of <seealso cref="AnomalyComponent.DestabilizingParticleType"/>.
+    /// </summary>
+    [DataField("stabilityPerWeakeningeHit")]
+    public float StabilityPerWeakeningeHit = -0.1f;
 }
index 813b3b38c1efda5d0ec9144eb1a1bf43259deb28..cf2e12524e289d2dbc949cc24e73d100e31c9ecc 100644 (file)
@@ -149,46 +149,18 @@ public sealed class AnomalyComponent : Component
     [DataField("severityParticleType")]
     public AnomalousParticleType SeverityParticleType;
 
-    /// <summary>
-    /// The amount that the <see cref="Severity"/> increases by when hit
-    /// of an anomalous particle of <seealso cref="SeverityParticleType"/>.
-    /// </summary>
-    [DataField("severityPerSeverityHit")]
-    public float SeverityPerSeverityHit = 0.025f;
-
     /// <summary>
     /// The particle type that destabilizes the anomaly.
     /// </summary>
     [DataField("destabilizingParticleType")]
     public AnomalousParticleType DestabilizingParticleType;
 
-    /// <summary>
-    /// The amount that the <see cref="Stability"/> increases by when hit
-    /// of an anomalous particle of <seealso cref="DestabilizingParticleType"/>.
-    /// </summary>
-    [DataField("stabilityPerDestabilizingHit")]
-    public float StabilityPerDestabilizingHit = 0.04f;
-
     /// <summary>
     /// The particle type that weakens the anomalys health.
     /// </summary>
     [DataField("weakeningParticleType")]
     public AnomalousParticleType WeakeningParticleType;
 
-    /// <summary>
-    /// The amount that the <see cref="Stability"/> increases by when hit
-    /// of an anomalous particle of <seealso cref="DestabilizingParticleType"/>.
-    /// </summary>
-    [DataField("healthPerWeakeningeHit")]
-    public float HealthPerWeakeningeHit = -0.05f;
-
-    /// <summary>
-    /// The amount that the <see cref="Stability"/> increases by when hit
-    /// of an anomalous particle of <seealso cref="DestabilizingParticleType"/>.
-    /// </summary>
-    [DataField("stabilityPerWeakeningeHit")]
-    public float StabilityPerWeakeningeHit = -0.1f;
-
     #region Points and Vessels
     /// <summary>
     /// The vessel that the anomaly is connceted to. Stored so that multiple
index 9db86f498a65641c8b0386aa118bb2d3c89c0fe4..59549821ec690c49e4006ad748ef5a7fa9f0624d 100644 (file)
   unlockedRecipes:
   - AnomalyVesselCircuitboard
   - APECircuitboard
+  - WeaponPistolCHIMP
+  - CartridgeAnomalousParticleDelta
+  - CartridgeAnomalousParticleEpsilon
+  - CartridgeAnomalousParticleZeta
 
 - type: technology
   name: technologies-robotics-technology
index 8c04c664d19012a31584a7dbc43c45644c750190..7cec8c1eb512082f3c010e4000e0086d6282a188 100644 (file)
   components:
   - type: CartridgeAmmo
     proto: BulletMagnumRubber
+
+- type: entity
+  id: BaseAnomalousCartridge
+  parent: BaseCartridgeMagnum
+  description: Packs twice the punch of a standard A.P.E. particle.
+  abstract: true
+  components:
+  - type: Sprite
+    netsync: false
+    sprite: Objects/Weapons/Guns/Ammunition/Casings/anomalous_casing.rsi
+    layers:
+    - state: base
+      map: ["enum.AmmoVisualLayers.Base"]
+  - type: Tag
+    tags:
+      - Cartridge
+      - CartridgeCHIMP
+
+- type: entity
+  id: CartridgeAnomalousParticleDelta
+  parent: BaseAnomalousCartridge
+  name: cartridge (delta particle)
+  components:
+  - type: Sprite
+    layers:
+    - state: base
+      map: ["enum.AmmoVisualLayers.Base"]
+    - state: overlay
+      color: crimson
+  - type: CartridgeAmmo
+    proto: AnomalousParticleDeltaStrong
+
+- type: entity
+  id: CartridgeAnomalousParticleEpsilon
+  parent: BaseAnomalousCartridge
+  name: cartridge (epsilon particle)
+  components:
+  - type: Sprite
+    layers:
+    - state: base
+      map: ["enum.AmmoVisualLayers.Base"]
+    - state: overlay
+      color: plum
+  - type: CartridgeAmmo
+    proto: AnomalousParticleEpsilonStrong
+
+- type: entity
+  id: CartridgeAnomalousParticleZeta
+  parent: BaseAnomalousCartridge
+  name: cartridge (zeta particle)
+  components:
+  - type: Sprite
+    layers:
+    - state: base
+      map: ["enum.AmmoVisualLayers.Base"]
+    - state: overlay
+      color: goldenrod
+  - type: CartridgeAmmo
+    proto: AnomalousParticleZetaStrong
index 90e1457f68102757163ab9625ab7c8de912aedda..2f13902101f498a285744db50cc60550847d4cc5 100644 (file)
   - type: Projectile
     damage:
       types:
-        Heat: 3
+        Heat: 5
   - type: TimedDespawn
     lifetime: 3
 
+
+- type: entity
+  parent: AnomalousParticleDelta
+  id: AnomalousParticleDeltaStrong
+  noSpawn: true
+  components:
+  - type: AnomalousParticle
+    particleType: Delta
+    severityPerSeverityHit: 0.05
+    stabilityPerDestabilizingHit: 0.08
+    healthPerWeakeningeHit: -0.1
+    stabilityPerWeakeningeHit: -0.2
+
 - type: entity
   parent: AnomalousParticleDelta
   id: AnomalousParticleEpsilon
   - type: AnomalousParticle
     particleType: Epsilon
 
+- type: entity
+  parent: AnomalousParticleEpsilon
+  id: AnomalousParticleEpsilonStrong
+  noSpawn: true
+  components:
+  - type: AnomalousParticle
+    particleType: Epsilon
+    severityPerSeverityHit: 0.05
+    stabilityPerDestabilizingHit: 0.08
+    healthPerWeakeningeHit: -0.1
+    stabilityPerWeakeningeHit: -0.2
+
 - type: entity
   parent: AnomalousParticleDelta
   id: AnomalousParticleZeta
   - type: AnomalousParticle
     particleType: Zeta
 
+- type: entity
+  parent: AnomalousParticleZeta
+  id: AnomalousParticleZetaStrong
+  noSpawn: true
+  components:
+  - type: AnomalousParticle
+    particleType: Zeta
+    severityPerSeverityHit: 0.05
+    stabilityPerDestabilizingHit: 0.08
+    healthPerWeakeningeHit: -0.1
+    stabilityPerWeakeningeHit: -0.2
+
 # Launcher projectiles (grenade / rocket)
 - type: entity
   id: BulletRocket
index 356935d77b8d3bbe56f64cccb983c1b925f693e2..7f8f69e1d7f526074ac1e7ab5dde893b32327a01 100644 (file)
     capacity: 5
     chambers: [ True, True, True, True, True ]
     ammoSlots: [ null, null, null, null, null ]
+
+- type: entity
+  id: WeaponPistolCHIMP
+  parent: BaseWeaponRevolver
+  name: C.H.I.M.P. handcannon
+  description: Just because it's a little C.H.I.M.P. doesn't mean it can't punch like an A.P.E.
+  components:
+  - type: Sprite
+    sprite: Objects/Weapons/Guns/Revolvers/chimp.rsi
+    layers:
+    - state: base
+      map: ["enum.GunVisualLayers.Base"]
+    - state: mag-unshaded-1
+      visible: false
+      map: ["enum.GunVisualLayers.MagUnshaded"]
+      shader: unshaded
+  - type: Appearance
+  - type: MagazineVisuals
+    magState: mag
+    steps: 3
+    zeroVisible: false
+  - type: Clothing
+    sprite: Objects/Weapons/Guns/Revolvers/chimp.rsi
+  - type: RevolverAmmoProvider
+    whitelist:
+      tags:
+        - CartridgeCHIMP
+    proto: CartridgeAnomalousParticleDelta #when revolvers stop sucking cock, make this spawn empty
+    capacity: 10
+    chambers: [ True, True, True, True, True, True, True, True, True, True ]
+    ammoSlots: [ null, null, null, null, null, null, null, null, null, null ]
+    soundEject:
+      path: /Audio/Weapons/Guns/MagOut/revolver_magout.ogg
+    soundInsert:
+      path: /Audio/Weapons/Guns/MagIn/revolver_magin.ogg
+  - type: Gun
+    fireRate: 1.5
+    soundGunshot:
+      path: /Audio/Weapons/Guns/Gunshots/taser2.ogg
index 05ed6926d3be704542a50529e9c41573f44a9b53..51cd4e7a94876d31e48081af9ffc3470544a2910 100644 (file)
       - PowerCellSmall
       - PowerCellMedium
       - PowerCellHigh
+      - WeaponPistolCHIMP
+      - CartridgeAnomalousParticleDelta
+      - CartridgeAnomalousParticleEpsilon
+      - CartridgeAnomalousParticleZeta
       - SynthesizerInstrument
       - RPED
       - ClothingShoesBootsMag
index 36b66a7cc427e8b24613d3c5138d3fcdc866785f..00adffa50a3b676eefccd4672d463f5d4e83a01d 100644 (file)
   completetime: 2
   materials:
     Plastic: 200
-    Glass: 150
\ No newline at end of file
+    Glass: 150
+
+- type: latheRecipe
+  id: WeaponPistolCHIMP
+  result: WeaponPistolCHIMP
+  completetime: 5
+  materials:
+    Steel: 500
+    Glass: 400
\ No newline at end of file
index fa10006ca9ebcba76d85a8982cf68094f6bc70aa..cc0f870dd7a1f62ebb0cb747cd78397bc794f370 100644 (file)
     Steel: 10
     Glass: 5
 
+- type: latheRecipe
+  id: CartridgeAnomalousParticleDelta
+  result: CartridgeAnomalousParticleDelta
+  completetime: 2
+  materials:
+    Plastic: 25
+
+- type: latheRecipe
+  id: CartridgeAnomalousParticleEpsilon
+  result: CartridgeAnomalousParticleEpsilon
+  completetime: 2
+  materials:
+    Plastic: 25
+
+- type: latheRecipe
+  id: CartridgeAnomalousParticleZeta
+  result: CartridgeAnomalousParticleZeta
+  completetime: 2
+  materials:
+    Plastic: 25
+
 - type: latheRecipe
   id: TargetHuman
   result: TargetHuman
index 10b18809854ab9830f6fcbab4cced134d16d6394..f80c8482e86ac62dab2387a2df30294d907dcf2a 100644 (file)
@@ -94,6 +94,9 @@
 - type: Tag
   id: CartridgeCaselessRifle
 
+- type: Tag
+  id: CartridgeCHIMP
+
 - type: Tag
   id: CartridgeHeavyRifle
 
diff --git a/Resources/Textures/Objects/Weapons/Guns/Ammunition/Casings/anomalous_casing.rsi/base-spent.png b/Resources/Textures/Objects/Weapons/Guns/Ammunition/Casings/anomalous_casing.rsi/base-spent.png
new file mode 100644 (file)
index 0000000..165c06c
Binary files /dev/null and b/Resources/Textures/Objects/Weapons/Guns/Ammunition/Casings/anomalous_casing.rsi/base-spent.png differ
diff --git a/Resources/Textures/Objects/Weapons/Guns/Ammunition/Casings/anomalous_casing.rsi/base.png b/Resources/Textures/Objects/Weapons/Guns/Ammunition/Casings/anomalous_casing.rsi/base.png
new file mode 100644 (file)
index 0000000..c10f0a8
Binary files /dev/null and b/Resources/Textures/Objects/Weapons/Guns/Ammunition/Casings/anomalous_casing.rsi/base.png differ
diff --git a/Resources/Textures/Objects/Weapons/Guns/Ammunition/Casings/anomalous_casing.rsi/meta.json b/Resources/Textures/Objects/Weapons/Guns/Ammunition/Casings/anomalous_casing.rsi/meta.json
new file mode 100644 (file)
index 0000000..8a12710
--- /dev/null
@@ -0,0 +1,20 @@
+{
+  "version": 1,
+  "license": "CC0-1.0",
+  "copyright": "Created by EmoGarbage404 (github) for Space Station 14.",
+  "size": {
+    "x": 32,
+    "y": 32
+  },
+  "states": [
+    {
+      "name": "base"
+    },
+    {
+      "name": "base-spent"
+    },
+    {
+      "name": "overlay"
+    }
+  ]
+}
diff --git a/Resources/Textures/Objects/Weapons/Guns/Ammunition/Casings/anomalous_casing.rsi/overlay.png b/Resources/Textures/Objects/Weapons/Guns/Ammunition/Casings/anomalous_casing.rsi/overlay.png
new file mode 100644 (file)
index 0000000..832b60e
Binary files /dev/null and b/Resources/Textures/Objects/Weapons/Guns/Ammunition/Casings/anomalous_casing.rsi/overlay.png differ
diff --git a/Resources/Textures/Objects/Weapons/Guns/Revolvers/chimp.rsi/base.png b/Resources/Textures/Objects/Weapons/Guns/Revolvers/chimp.rsi/base.png
new file mode 100644 (file)
index 0000000..9aff531
Binary files /dev/null and b/Resources/Textures/Objects/Weapons/Guns/Revolvers/chimp.rsi/base.png differ
diff --git a/Resources/Textures/Objects/Weapons/Guns/Revolvers/chimp.rsi/equipped-BELT.png b/Resources/Textures/Objects/Weapons/Guns/Revolvers/chimp.rsi/equipped-BELT.png
new file mode 100644 (file)
index 0000000..5a38166
Binary files /dev/null and b/Resources/Textures/Objects/Weapons/Guns/Revolvers/chimp.rsi/equipped-BELT.png differ
diff --git a/Resources/Textures/Objects/Weapons/Guns/Revolvers/chimp.rsi/inhand-left.png b/Resources/Textures/Objects/Weapons/Guns/Revolvers/chimp.rsi/inhand-left.png
new file mode 100644 (file)
index 0000000..547f6f9
Binary files /dev/null and b/Resources/Textures/Objects/Weapons/Guns/Revolvers/chimp.rsi/inhand-left.png differ
diff --git a/Resources/Textures/Objects/Weapons/Guns/Revolvers/chimp.rsi/inhand-right.png b/Resources/Textures/Objects/Weapons/Guns/Revolvers/chimp.rsi/inhand-right.png
new file mode 100644 (file)
index 0000000..41aaf68
Binary files /dev/null and b/Resources/Textures/Objects/Weapons/Guns/Revolvers/chimp.rsi/inhand-right.png differ
diff --git a/Resources/Textures/Objects/Weapons/Guns/Revolvers/chimp.rsi/mag-unshaded-1.png b/Resources/Textures/Objects/Weapons/Guns/Revolvers/chimp.rsi/mag-unshaded-1.png
new file mode 100644 (file)
index 0000000..2254251
Binary files /dev/null and b/Resources/Textures/Objects/Weapons/Guns/Revolvers/chimp.rsi/mag-unshaded-1.png differ
diff --git a/Resources/Textures/Objects/Weapons/Guns/Revolvers/chimp.rsi/mag-unshaded-2.png b/Resources/Textures/Objects/Weapons/Guns/Revolvers/chimp.rsi/mag-unshaded-2.png
new file mode 100644 (file)
index 0000000..029a509
Binary files /dev/null and b/Resources/Textures/Objects/Weapons/Guns/Revolvers/chimp.rsi/mag-unshaded-2.png differ
diff --git a/Resources/Textures/Objects/Weapons/Guns/Revolvers/chimp.rsi/meta.json b/Resources/Textures/Objects/Weapons/Guns/Revolvers/chimp.rsi/meta.json
new file mode 100644 (file)
index 0000000..e5f6d6c
--- /dev/null
@@ -0,0 +1,32 @@
+{
+  "version": 1,
+  "license": "CC-BY-SA-3.0",
+  "copyright": "Taken from cev-eris at https://github.com/discordia-space/CEV-Eris/raw/e1a3cbe9ba2e6e29b7f1cad1bb456b390aac936d/icons/obj/guns/projectile.dmi",
+  "size": {
+    "x": 32,
+    "y": 32
+  },
+  "states": [
+    {
+      "name": "base"
+    },
+    {
+      "name": "mag-unshaded-1"
+    },
+    {
+      "name": "mag-unshaded-2"
+    },
+    {
+      "name": "inhand-left",
+      "directions": 4
+    },
+    {
+      "name": "inhand-right",
+      "directions": 4
+    },
+       {
+         "name": "equipped-BELT",
+         "directions": 4
+       }
+  ]
+}