]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Adjust various traitor explosives (#42477)
authorArtisticRoomba <145879011+ArtisticRoomba@users.noreply.github.com>
Mon, 19 Jan 2026 21:54:12 +0000 (13:54 -0800)
committerGitHub <noreply@github.com>
Mon, 19 Jan 2026 21:54:12 +0000 (21:54 +0000)
* adj explosions

* yuuup

* next release

* cleanup and EMP changes

* minibomb revert, wait until gib experiment

---------

Co-authored-by: Princess Cheeseballs <66055347+Pronana@users.noreply.github.com>
Content.Shared/Emp/SharedEmpSystem.cs
Content.Shared/Trigger/Systems/EmpOnTriggerSystem.cs
Content.Shared/Trigger/Systems/TriggerOnLandSystem.cs
Content.Shared/Trigger/Systems/TriggerSystem.cs
Content.Shared/Trigger/TriggerEvent.cs
Resources/Prototypes/Catalog/uplink_catalog.yml
Resources/Prototypes/Entities/Objects/Weapons/Bombs/pipebomb.yml
Resources/Prototypes/Entities/Objects/Weapons/Throwable/base_grenades.yml
Resources/Prototypes/Entities/Objects/Weapons/Throwable/canister_grenades.yml
Resources/Prototypes/Entities/Objects/Weapons/Throwable/grenades.yml
Resources/Prototypes/Entities/Structures/Machines/bombs.yml

index cc1895b20ff43ea1473a030c29b2cac162ae4d84..e1ef05c8cec7ea51bc632e4d68f6744742b31471 100644 (file)
@@ -68,7 +68,8 @@ public abstract class SharedEmpSystem : EntitySystem
     /// <param name="energyConsumption">The amount of energy consumed by the EMP pulse.</param>
     /// <param name="duration">The duration of the EMP effects.</param>
     /// <param name="user">The player that caused the effect. Used for predicted audio.</param>
-    public void EmpPulse(EntityCoordinates coordinates, float range, float energyConsumption, TimeSpan duration, EntityUid? user = null)
+    /// <param name="predicted">Whether this pulse is being replicated on the client.</param>
+    public void EmpPulse(EntityCoordinates coordinates, float range, float energyConsumption, TimeSpan duration, EntityUid? user = null, bool predicted = true)
     {
         _entSet.Clear();
         _lookup.GetEntitiesInRange(coordinates, range, _entSet);
@@ -80,7 +81,10 @@ public abstract class SharedEmpSystem : EntitySystem
         if (_net.IsServer)
             Spawn(EmpPulseEffectPrototype, coordinates);
 
-        _audio.PlayPredicted(EmpSound, coordinates, user);
+        if (predicted)
+            _audio.PlayPredicted(EmpSound, coordinates, user);
+        else
+            _audio.PlayPvs(EmpSound, coordinates);
     }
 
     /// <summary>
index 6cefafcadcf3edd7fc8a3e1c7350894150431565..a77cddd73883bfa85049b1d5c3edd340b1e5b57e 100644 (file)
@@ -9,7 +9,7 @@ public sealed class EmpOnTriggerSystem : XOnTriggerSystem<EmpOnTriggerComponent>
 
     protected override void OnTrigger(Entity<EmpOnTriggerComponent> ent, EntityUid target, ref TriggerEvent args)
     {
-        _emp.EmpPulse(Transform(target).Coordinates, ent.Comp.Range, ent.Comp.EnergyConsumption, ent.Comp.DisableDuration, args.User);
+        _emp.EmpPulse(Transform(target).Coordinates, ent.Comp.Range, ent.Comp.EnergyConsumption, ent.Comp.DisableDuration, args.User, predicted: args.Predicted);
         args.Handled = true;
     }
 }
index 64e2e5a5c10d16c56c854185894f8dedf93bf4b8..3852e09efc0ffdb8946cae41ed0ff6fa78ec31e6 100644 (file)
@@ -14,6 +14,6 @@ public sealed partial class TriggerOnLandSystem : TriggerOnXSystem
 
     private void OnLand(Entity<TriggerOnLandComponent> ent, ref LandEvent args)
     {
-        Trigger.Trigger(ent.Owner, args.User, ent.Comp.KeyOut);
+        Trigger.Trigger(ent.Owner, args.User, ent.Comp.KeyOut, predicted: false);
     }
 }
index a5fb509eed63c7a0cb37946e674fe609ac59781d..1e7261043f4195c07c6d1a42b4fa195e146d104c 100644 (file)
@@ -67,15 +67,16 @@ public sealed partial class TriggerSystem : EntitySystem
     /// <param name="trigger">The entity that has the components that should be triggered.</param>
     /// <param name="user">The user of the trigger. Some effects may target the user instead of the trigger entity.</param>
     /// <param name="key">A key string to allow multiple, independent triggers on the same entity. If null then all triggers will activate.</param>
+    /// <param name="predicted">Whether or not this trigger is being predicted</param>
     /// <returns>Whether or not the trigger has sucessfully activated an effect.</returns>
-    public bool Trigger(EntityUid trigger, EntityUid? user = null, string? key = null)
+    public bool Trigger(EntityUid trigger, EntityUid? user = null, string? key = null, bool predicted = true)
     {
         var attemptTriggerEvent = new AttemptTriggerEvent(user, key);
         RaiseLocalEvent(trigger, ref attemptTriggerEvent);
         if (attemptTriggerEvent.Cancelled)
             return false;
 
-        var triggerEvent = new TriggerEvent(user, key);
+        var triggerEvent = new TriggerEvent(user, key, predicted);
         RaiseLocalEvent(trigger, ref triggerEvent, true);
         return triggerEvent.Handled;
     }
index e65e3b48a8750a20ab5f01b135699ea826bdd400..9217a4907b102a746851d901ef37451241922bc6 100644 (file)
@@ -9,8 +9,9 @@ namespace Content.Shared.Trigger;
 /// Setting this to null will activate all triggers.
 /// </param>
 /// <param name="Handled">Marks the event as handled if at least one trigger effect was activated.</param>
+/// <param name="Predicted">Marks that this trigger is being replicated on the client.</param>
 [ByRefEvent]
-public record struct TriggerEvent(EntityUid? User = null, string? Key = null, bool Handled = false);
+public record struct TriggerEvent(EntityUid? User = null, string? Key = null, bool Predicted = true, bool Handled = false);
 
 /// <summary>
 /// Raised before a trigger is activated.
index 2636b80d4299cfcfa392a38a39902e89ad09648d..2e9510b33754fb06770f50602f285c60df8ae75f 100644 (file)
     Telecrystal: 4
   categories:
   - UplinkExplosives
-
-- type: listing
-  id: UplinkExplosiveGrenadeFlash
-  name: uplink-flash-grenade-name
-  description: uplink-flash-grenade-desc
-  productEntity: GrenadeFlashBang
-  cost:
-    Telecrystal: 1
-  categories:
-  - UplinkExplosives
+  conditions:
+  - !type:StoreWhitelistCondition
+    whitelist:
+      tags:
+      - NukeOpsUplink
 
 - type: listing
   id: UplinkSmokeGrenade
   discountDownTo:
     Telecrystal: 3
   cost:
-    Telecrystal: 5
+    Telecrystal: 4
   categories:
     - UplinkExplosives
   conditions:
       tags:
       - NukeOpsUplink
 
-- type: listing
-  id: UplinkClusterGrenade
-  name: uplink-cluster-grenade-name
-  description: uplink-cluster-grenade-desc
-  productEntity: ClusterGrenade
-  discountCategory: usualDiscounts
-  discountDownTo:
-    Telecrystal: 5
-  cost:
-    Telecrystal: 8
-  categories:
-  - UplinkExplosives
-
 - type: listing
   id: UplinkGrenadeShrapnel
   name: uplink-shrapnel-grenade-name
   categories:
   - UplinkExplosives
 
-- type: listing
-  id: UplinkEmpKit
-  name: uplink-emp-kit-name
-  description: uplink-emp-kit-desc
-  productEntity: ElectricalDisruptionKit
-  discountCategory: veryRareDiscounts
-  discountDownTo:
-    Telecrystal: 4
-  cost:
-    Telecrystal: 6
-  categories:
-    - UplinkExplosives
-
 # Ammo
 
 - type: listing
index a661224f318b7c87946547ed1948a7edf57972cc..45edf9275923a40330f2b017978d3fea7683b35e 100644 (file)
@@ -1,5 +1,5 @@
 - type: entity
-  parent: [ GrenadeBase, BaseMinorContraband ]
+  parent: [ TimerGrenadeBase, BaseMinorContraband ]
   id: PipeBomb
   name: pipe bomb
   description: An improvised explosive made from pipes and wire.
index 8f2f7547c0f036fa34bf2bbddd607242958a4021..b681bdbd0bfbf36414aa99e9294834bd41c992e7 100644 (file)
     quickEquip: false
     slots:
     - Belt
-  - type: TriggerOnUse
-  - type: TimerTrigger
-    delay: 3
   - type: Damageable
     damageContainer: Inorganic
-  - type: Destructible
-    thresholds:
-    - trigger: # Start fuse
-        !type:DamageTrigger
-        damage: 10
-      behaviors:
-      - !type:TimerStartBehavior
   - type: Appearance
   - type: AnimationPlayer
-  - type: GenericVisualizer
-    visuals:
-      enum.Trigger.TriggerVisuals.VisualState:
-        enum.ConstructionVisuals.Layer:
-          Primed: { state: primed }
-          Unprimed: { state: icon }
   - type: Tag
     tags:
     - HandGrenade
         restitution: 0.3
         friction: 0.2
 
+- type: entity # Starts fuse after taking 10 damage.
+  parent: GrenadeBase
+  abstract: true
+  id: TimerGrenadeBase
+  components:
+  - type: TriggerOnUse
+  - type: TimerTrigger
+    delay: 3
+  - type: Destructible
+    thresholds:
+    - trigger: # Start fuse
+        !type:DamageTrigger
+        damage: 10
+      behaviors:
+      - !type:TimerStartBehavior
+  - type: GenericVisualizer
+    visuals:
+      enum.Trigger.TriggerVisuals.VisualState:
+        enum.ConstructionVisuals.Layer:
+          Primed: { state: primed }
+          Unprimed: { state: icon }
+
+- type: entity # Starts fuse after taking 10 damage.
+  parent: GrenadeBase
+  abstract: true
+  id: ImpactGrenadeBase
+  components:
+  - type: TriggerOnLand
+  - type: LandAtCursor
+  - type: Destructible
+    thresholds:
+    - trigger: # immediately explode
+        !type:DamageTrigger
+        damage: 45
+      behaviors:
+      - !type:TriggerBehavior
+        keyOut: timer
+      - !type:DoActsBehavior
+        acts: [ "Destruction" ]
+
 - type: entity # Starts fuse after taking 10 damage, instantly detonates/activates after taking 45 damage.
   abstract: true
   id: VolatileGrenadeBase
index 31cb00f1640f98336d3254e8d26d4ba7f4c8493e..255bb884c31fe742a962727f23239c443297a6a2 100644 (file)
@@ -1,5 +1,5 @@
 - type: entity
-  parent: [VolatileGrenadeBase, GrenadeBase, BaseSecurityContraband ]
+  parent: [VolatileGrenadeBase, TimerGrenadeBase, BaseSecurityContraband ]
   id: SmokeGrenade
   name: smoke grenade
   description: A tactical grenade that releases a large, long-lasting cloud of smoke when used.
@@ -81,7 +81,7 @@
     price: 350
 
 - type: entity
-  parent: [ BaseEngineeringContraband, VolatileGrenadeBase, GrenadeBase ] # Prevent inheriting DeleteOnTrigger from SmokeGrenade
+  parent: [ BaseEngineeringContraband, VolatileGrenadeBase, TimerGrenadeBase ] # Prevent inheriting DeleteOnTrigger from SmokeGrenade
   id: AirGrenade
   name: air grenade
   description: A special solid state chemical grenade used for quickly releasing standard air into a spaced area. Fills up to 30 tiles!
index 7cce1d49caf3faaf516d0760afa9a1a7f170374b..bdb3e01f24cde222a6c12237c0e5bf3408eee7ef 100644 (file)
@@ -1,7 +1,7 @@
 - type: entity
   name: explosive grenade
   description: Grenade that creates a small but devastating explosion.
-  parent: [VolatileGrenadeBase, GrenadeBase, BaseSyndicateContraband]
+  parent: [VolatileGrenadeBase, TimerGrenadeBase, BaseSyndicateContraband]
   id: ExGrenade
   components:
   - type: ExplodeOnTrigger
@@ -24,7 +24,7 @@
 - type: entity
   name: flashbang
   description: Eeeeeeeeeeeeeeeeeeeeee.
-  parent: [ FragileGrenadeBase, GrenadeBase, BaseSecurityContraband ]
+  parent: [ FragileGrenadeBase, TimerGrenadeBase, BaseSecurityContraband ]
   id: GrenadeFlashBang
   components:
   - type: Sprite
     - type: TimedDespawn
       lifetime: 0.5
 
-#The explosive values for these are pretty god damn mediocre, but SS14's explosion system is hard to understand - this is a good enough approximation of how it was in SS13.
-#Ideally, there should be a weak radius around the bomb outside of its gibbing / spacing range capable of dealing fair damage to players / structures.
+# Tuned to be a general bomb that deals equipment damage without explicitly gibbing, however it will still gladly instakill anyone that mishandles it.
+# One of the few syndie bombs that should punch holes in space.
 - type: entity
   name: syndicate minibomb
   description: A syndicate-manufactured explosive used to stow destruction and cause chaos.
-  parent: [VolatileGrenadeBase, GrenadeBase, BaseSyndicateContraband]
+  parent: [VolatileGrenadeBase, TimerGrenadeBase, BaseSyndicateContraband]
   id: SyndieMiniBomb
   components:
   - type: Sprite
 - type: entity
   name: self destruct
   description: Go out on your own terms!
-  parent: GrenadeBase
+  parent: TimerGrenadeBase
   id: SelfDestructSeq
   categories: [ HideSpawnMenu ]
   components:
 
 
 - type: entity
-  parent: [ FragileGrenadeBase, GrenadeBase, BaseSyndicateContraband ]
+  parent: [ FragileGrenadeBase, TimerGrenadeBase, BaseSyndicateContraband ]
   id: SingularityGrenade
   name: singularity grenade
   description: Grenade that simulates the power of a singularity, pulling things in a heap.
 - type: entity
   name: the nuclear option
   description: Please don't throw it, think of the children.
-  parent: GrenadeBase
+  parent: TimerGrenadeBase
   id: NuclearGrenade
   components:
   - type: Sprite
 - type: entity
   name: EMP grenade
   description: A grenade designed to wreak havoc on electronic systems.
-  parent: [FragileGrenadeBase, GrenadeBase, BaseSyndicateContraband]
+  parent: [ImpactGrenadeBase, BaseSyndicateContraband]
   id: EmpGrenade
   components:
   - type: Sprite
     sprite: Objects/Weapons/Grenades/empgrenade.rsi
   - type: EmpOnTrigger
     keysIn:
-    - timer
+    - trigger
     range: 5.5
     energyConsumption: 50000
   - type: DeleteOnTrigger
     keysIn:
-    - timer
-  - type: Appearance
-  - type: TimerTriggerVisuals
-    primingSound:
-      path: /Audio/Effects/countdown.ogg
+    - trigger
   - type: StaticPrice
     price: 666 # 2000 for 3, I love fractions
 
 - type: entity
   name: holy hand grenade
   description: O Lord, bless this thy hand grenade, that with it thou mayst blow thine enemies to tiny bits, in thy mercy.
-  parent: [GrenadeBase, BaseSyndicateContraband]
+  parent: [TimerGrenadeBase, BaseSyndicateContraband]
   id: HolyHandGrenade
   components:
   - type: Sprite
 - type: entity
   name: trick grenade
   description: All the grenade without any of the boom.
-  parent: GrenadeBase
+  parent: TimerGrenadeBase
   id: GrenadeDummy
   components:
   - type: Sprite
index dc3aa359f44ca5034aa3c8087604bb3201e08bf5..3790aba58127bfe67be9a79e12b243460f5ef75c 100644 (file)
     - type: Explosive
       explosionType: HardBomb
       totalIntensity: 4000.0
-      intensitySlope: 3
-      maxIntensity: 400
+      intensitySlope: 10
+      maxIntensity: 75
     - type: StaticPrice
       price: 10000 # Good luck!