From 966f244048751fa69a92fefa54231fc50448db22 Mon Sep 17 00:00:00 2001
From: ArtisticRoomba <145879011+ArtisticRoomba@users.noreply.github.com>
Date: Mon, 19 Jan 2026 13:54:12 -0800
Subject: [PATCH] Adjust various traitor explosives (#42477)
* 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 | 8 ++-
.../Trigger/Systems/EmpOnTriggerSystem.cs | 2 +-
.../Trigger/Systems/TriggerOnLandSystem.cs | 2 +-
.../Trigger/Systems/TriggerSystem.cs | 5 +-
Content.Shared/Trigger/TriggerEvent.cs | 3 +-
.../Prototypes/Catalog/uplink_catalog.yml | 43 ++------------
.../Objects/Weapons/Bombs/pipebomb.yml | 2 +-
.../Weapons/Throwable/base_grenades.yml | 56 +++++++++++++------
.../Weapons/Throwable/canister_grenades.yml | 4 +-
.../Objects/Weapons/Throwable/grenades.yml | 30 +++++-----
.../Entities/Structures/Machines/bombs.yml | 4 +-
11 files changed, 77 insertions(+), 82 deletions(-)
diff --git a/Content.Shared/Emp/SharedEmpSystem.cs b/Content.Shared/Emp/SharedEmpSystem.cs
index cc1895b20f..e1ef05c8ce 100644
--- a/Content.Shared/Emp/SharedEmpSystem.cs
+++ b/Content.Shared/Emp/SharedEmpSystem.cs
@@ -68,7 +68,8 @@ public abstract class SharedEmpSystem : EntitySystem
/// The amount of energy consumed by the EMP pulse.
/// The duration of the EMP effects.
/// The player that caused the effect. Used for predicted audio.
- public void EmpPulse(EntityCoordinates coordinates, float range, float energyConsumption, TimeSpan duration, EntityUid? user = null)
+ /// Whether this pulse is being replicated on the client.
+ 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);
}
///
diff --git a/Content.Shared/Trigger/Systems/EmpOnTriggerSystem.cs b/Content.Shared/Trigger/Systems/EmpOnTriggerSystem.cs
index 6cefafcadc..a77cddd738 100644
--- a/Content.Shared/Trigger/Systems/EmpOnTriggerSystem.cs
+++ b/Content.Shared/Trigger/Systems/EmpOnTriggerSystem.cs
@@ -9,7 +9,7 @@ public sealed class EmpOnTriggerSystem : XOnTriggerSystem
protected override void OnTrigger(Entity 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;
}
}
diff --git a/Content.Shared/Trigger/Systems/TriggerOnLandSystem.cs b/Content.Shared/Trigger/Systems/TriggerOnLandSystem.cs
index 64e2e5a5c1..3852e09efc 100644
--- a/Content.Shared/Trigger/Systems/TriggerOnLandSystem.cs
+++ b/Content.Shared/Trigger/Systems/TriggerOnLandSystem.cs
@@ -14,6 +14,6 @@ public sealed partial class TriggerOnLandSystem : TriggerOnXSystem
private void OnLand(Entity ent, ref LandEvent args)
{
- Trigger.Trigger(ent.Owner, args.User, ent.Comp.KeyOut);
+ Trigger.Trigger(ent.Owner, args.User, ent.Comp.KeyOut, predicted: false);
}
}
diff --git a/Content.Shared/Trigger/Systems/TriggerSystem.cs b/Content.Shared/Trigger/Systems/TriggerSystem.cs
index a5fb509eed..1e7261043f 100644
--- a/Content.Shared/Trigger/Systems/TriggerSystem.cs
+++ b/Content.Shared/Trigger/Systems/TriggerSystem.cs
@@ -67,15 +67,16 @@ public sealed partial class TriggerSystem : EntitySystem
/// The entity that has the components that should be triggered.
/// The user of the trigger. Some effects may target the user instead of the trigger entity.
/// A key string to allow multiple, independent triggers on the same entity. If null then all triggers will activate.
+ /// Whether or not this trigger is being predicted
/// Whether or not the trigger has sucessfully activated an effect.
- 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;
}
diff --git a/Content.Shared/Trigger/TriggerEvent.cs b/Content.Shared/Trigger/TriggerEvent.cs
index e65e3b48a8..9217a4907b 100644
--- a/Content.Shared/Trigger/TriggerEvent.cs
+++ b/Content.Shared/Trigger/TriggerEvent.cs
@@ -9,8 +9,9 @@ namespace Content.Shared.Trigger;
/// Setting this to null will activate all triggers.
///
/// Marks the event as handled if at least one trigger effect was activated.
+/// Marks that this trigger is being replicated on the client.
[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);
///
/// Raised before a trigger is activated.
diff --git a/Resources/Prototypes/Catalog/uplink_catalog.yml b/Resources/Prototypes/Catalog/uplink_catalog.yml
index 2636b80d42..2e9510b337 100644
--- a/Resources/Prototypes/Catalog/uplink_catalog.yml
+++ b/Resources/Prototypes/Catalog/uplink_catalog.yml
@@ -286,16 +286,11 @@
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
@@ -355,7 +350,7 @@
discountDownTo:
Telecrystal: 3
cost:
- Telecrystal: 5
+ Telecrystal: 4
categories:
- UplinkExplosives
conditions:
@@ -466,19 +461,6 @@
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
@@ -505,19 +487,6 @@
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
diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Bombs/pipebomb.yml b/Resources/Prototypes/Entities/Objects/Weapons/Bombs/pipebomb.yml
index a661224f31..45edf92759 100644
--- a/Resources/Prototypes/Entities/Objects/Weapons/Bombs/pipebomb.yml
+++ b/Resources/Prototypes/Entities/Objects/Weapons/Bombs/pipebomb.yml
@@ -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.
diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Throwable/base_grenades.yml b/Resources/Prototypes/Entities/Objects/Weapons/Throwable/base_grenades.yml
index 8f2f7547c0..b681bdbd0b 100644
--- a/Resources/Prototypes/Entities/Objects/Weapons/Throwable/base_grenades.yml
+++ b/Resources/Prototypes/Entities/Objects/Weapons/Throwable/base_grenades.yml
@@ -14,26 +14,10 @@
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
@@ -48,6 +32,46 @@
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
diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Throwable/canister_grenades.yml b/Resources/Prototypes/Entities/Objects/Weapons/Throwable/canister_grenades.yml
index 31cb00f164..255bb884c3 100644
--- a/Resources/Prototypes/Entities/Objects/Weapons/Throwable/canister_grenades.yml
+++ b/Resources/Prototypes/Entities/Objects/Weapons/Throwable/canister_grenades.yml
@@ -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!
diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Throwable/grenades.yml b/Resources/Prototypes/Entities/Objects/Weapons/Throwable/grenades.yml
index 7cce1d49ca..bdb3e01f24 100644
--- a/Resources/Prototypes/Entities/Objects/Weapons/Throwable/grenades.yml
+++ b/Resources/Prototypes/Entities/Objects/Weapons/Throwable/grenades.yml
@@ -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
@@ -74,12 +74,12 @@
- 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
@@ -108,7 +108,7 @@
- type: entity
name: self destruct
description: Go out on your own terms!
- parent: GrenadeBase
+ parent: TimerGrenadeBase
id: SelfDestructSeq
categories: [ HideSpawnMenu ]
components:
@@ -134,7 +134,7 @@
- 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.
@@ -267,7 +267,7 @@
- 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
@@ -348,30 +348,26 @@
- 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
@@ -402,7 +398,7 @@
- type: entity
name: trick grenade
description: All the grenade without any of the boom.
- parent: GrenadeBase
+ parent: TimerGrenadeBase
id: GrenadeDummy
components:
- type: Sprite
diff --git a/Resources/Prototypes/Entities/Structures/Machines/bombs.yml b/Resources/Prototypes/Entities/Structures/Machines/bombs.yml
index dc3aa359f4..3790aba581 100644
--- a/Resources/Prototypes/Entities/Structures/Machines/bombs.yml
+++ b/Resources/Prototypes/Entities/Structures/Machines/bombs.yml
@@ -126,8 +126,8 @@
- type: Explosive
explosionType: HardBomb
totalIntensity: 4000.0
- intensitySlope: 3
- maxIntensity: 400
+ intensitySlope: 10
+ maxIntensity: 75
- type: StaticPrice
price: 10000 # Good luck!
--
2.52.0