]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Juice that makes you go boom (#34730)
authorVelken <8467292+Velken@users.noreply.github.com>
Thu, 30 Jan 2025 11:34:32 +0000 (08:34 -0300)
committerGitHub <noreply@github.com>
Thu, 30 Jan 2025 11:34:32 +0000 (12:34 +0100)
* Juice that makes you go boom

* moved explosive juice to fun yml - fixed ExplosionReactionEffect.cs not having TileBreakScale parameter - made Drazil plushie major contraband (they are evil!!!!!)

* removed JASON!!!! JASOOON!!! JASON!!!

* don't do commits at 1am

* Update fun.yml

fix ident

* no more bullying the server (only 1 explosion)

Content.Server/EntityEffects/Effects/ExplosionReactionEffect.cs
Resources/Prototypes/Reagents/fun.yml

index 689757d04408214df3541dde47ac6485e9c2f6f1..24c58898c6521cdbf2efdee51de3a82e8ed12461 100644 (file)
@@ -15,7 +15,6 @@ public sealed partial class ExplosionReactionEffect : EntityEffect
     ///     The type of explosion. Determines damage types and tile break chance scaling.
     /// </summary>
     [DataField(required: true, customTypeSerializer: typeof(PrototypeIdSerializer<ExplosionPrototype>))]
-    [JsonIgnore]
     public string ExplosionType = default!;
 
     /// <summary>
@@ -23,14 +22,12 @@ public sealed partial class ExplosionReactionEffect : EntityEffect
     ///     chance.
     /// </summary>
     [DataField]
-    [JsonIgnore]
     public float MaxIntensity = 5;
 
     /// <summary>
     ///     How quickly intensity drops off as you move away from the epicenter
     /// </summary>
     [DataField]
-    [JsonIgnore]
     public float IntensitySlope = 1;
 
     /// <summary>
@@ -41,15 +38,20 @@ public sealed partial class ExplosionReactionEffect : EntityEffect
     ///     A slope of 1 and MaxTotalIntensity of 100 corresponds to a radius of around 4.5 tiles.
     /// </remarks>
     [DataField]
-    [JsonIgnore]
     public float MaxTotalIntensity = 100;
 
     /// <summary>
     ///     The intensity of the explosion per unit reaction.
     /// </summary>
     [DataField]
-    [JsonIgnore]
     public float IntensityPerUnit = 1;
+       
+    /// <summary>
+    ///     Factor used to scale the explosion intensity when calculating tile break chances. Allows for stronger
+    ///     explosives that don't space tiles, without having to create a new explosion-type prototype.
+    /// </summary>
+    [DataField]
+    public float TileBreakScale = 1f;
 
     public override bool ShouldLog => true;
 
@@ -72,6 +74,7 @@ public sealed partial class ExplosionReactionEffect : EntityEffect
             ExplosionType,
             intensity,
             IntensitySlope,
-            MaxIntensity);
+            MaxIntensity,
+                       TileBreakScale);
     }
 }
index 00d31cbd102429302964c7a5782d92c03673c7ac..2215b6f33da2dea28ed4c2e48cc4db4ee8efd182 100644 (file)
         conditions:
         - !type:ReagentThreshold
           min: 50
+
+- type: reaction
+  id: WehHewExplosion
+  impact: High
+  priority: 20
+  reactants:
+    JuiceThatMakesYouWeh:
+      amount: 1
+    JuiceThatMakesYouHew:
+      amount: 1
+  effects:
+  - !type:ExplosionReactionEffect
+      explosionType: Radioactive
+      maxIntensity: 200
+      intensityPerUnit: 2
+      intensitySlope: 1
+      maxTotalIntensity: 250
+      tileBreakScale: 0.00001