Remove ion damage (#5960)
* comment out borg ion damage * remove ion damage from disabler * actually nuke it * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Additional removals. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Vanessa <vanessalouwagie@gmail.com>
This commit is contained in:
parent
4b0b6ff16e
commit
70c0494061
|
|
@ -1,5 +0,0 @@
|
|||
using Content.Shared._DV.Silicons;
|
||||
|
||||
namespace Content.Client._DV.Silicons;
|
||||
|
||||
public sealed class SiliconEmpSystem : SharedSiliconEmpSystem;
|
||||
|
|
@ -1,5 +1,4 @@
|
|||
using Content.Server.Explosion.EntitySystems;
|
||||
using Content.Shared.Damage; // DeltaV - EMP damage
|
||||
using Content.Server.Power.EntitySystems;
|
||||
using Content.Server.Radio;
|
||||
using Content.Server.SurveillanceCamera;
|
||||
|
|
|
|||
|
|
@ -75,8 +75,7 @@ public sealed partial class CosmicFinaleComponent : Component
|
|||
{ "Blunt", 2.25},
|
||||
{ "Cold", 2.25},
|
||||
{ "Radiation", 2.25},
|
||||
{ "Asphyxiation", 2.25},
|
||||
{ "Ion", 2.25}
|
||||
{ "Asphyxiation", 2.25}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -174,7 +174,7 @@ public sealed partial class CosmicCultSystem : SharedCosmicCultSystem
|
|||
if (!EntityIsCultist(args.Equipee))
|
||||
{
|
||||
_statusEffects.TryAddStatusEffect<CosmicEntropyDebuffComponent>(args.Equipee, EntropicDegen, TimeSpan.FromDays(1), true); // TimeSpan.MaxValue causes a crash here, so we use FromDays(1) instead.
|
||||
if (TryComp<CosmicEntropyDebuffComponent>(args.Equipee, out var comp)) comp.Degen = new(){DamageDict = new(){{"Cold", 0.5}, {"Asphyxiation", 1.5}, {"Ion", 1.5}}};
|
||||
if (TryComp<CosmicEntropyDebuffComponent>(args.Equipee, out var comp)) comp.Degen = new(){DamageDict = new(){{"Cold", 0.5}, {"Asphyxiation", 1.5}}};
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -188,7 +188,7 @@ public sealed partial class CosmicCultSystem : SharedCosmicCultSystem
|
|||
if (!EntityIsCultist(args.User))
|
||||
{
|
||||
_statusEffects.TryAddStatusEffect<CosmicEntropyDebuffComponent>(args.User, EntropicDegen, TimeSpan.FromDays(1), true);
|
||||
if (TryComp<CosmicEntropyDebuffComponent>(args.User, out var comp)) comp.Degen = new(){DamageDict = new(){{"Cold", 0.5}, {"Asphyxiation", 1.5}, {"Ion", 1.5}}};
|
||||
if (TryComp<CosmicEntropyDebuffComponent>(args.User, out var comp)) comp.Degen = new(){DamageDict = new(){{"Cold", 0.5}, {"Asphyxiation", 1.5}}};
|
||||
_popup.PopupEntity(Loc.GetString("cosmiccult-gear-pickup", ("ITEM", args.Equipped)), args.User, args.User, PopupType.MediumCaution);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -75,8 +75,7 @@ public sealed class CosmicRiftSystem : EntitySystem
|
|||
if (TryComp<CosmicEntropyDebuffComponent>(mob, out var debuff)) debuff.Degen =
|
||||
new(){DamageDict = new(){
|
||||
{"Cold", 0.05 * damageMultiplier},
|
||||
{"Asphyxiation", 0.15 * damageMultiplier},
|
||||
{"Ion", 0.15 * damageMultiplier}
|
||||
{"Asphyxiation", 0.15 * damageMultiplier}
|
||||
}};
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +0,0 @@
|
|||
using Content.Shared._DV.Silicons;
|
||||
|
||||
namespace Content.Server._DV.Silicons;
|
||||
|
||||
public sealed class SiliconEmpSystem : SharedSiliconEmpSystem;
|
||||
|
|
@ -25,12 +25,6 @@ public abstract class SharedEmpSystem : EntitySystem
|
|||
[Dependency] private readonly SharedPvsOverrideSystem _pvs = default!; // Frontier
|
||||
[Dependency] private readonly IConfigurationManager _cfg = default!; // Frontier: EMP Blast PVS
|
||||
|
||||
/// <summary>
|
||||
/// DeltaV. Default damage of EMPs, as dertermined by direction. There's no good component to put
|
||||
/// this on so its defined here.
|
||||
/// </summary>
|
||||
private static readonly DamageSpecifier? DefaultEmpDamage = new() { DamageDict = new() { { "Ion", 130 } } };
|
||||
|
||||
private HashSet<EntityUid> _entSet = new();
|
||||
private EntityQuery<EmpResistanceComponent> _resistanceQuery;
|
||||
|
||||
|
|
@ -59,12 +53,11 @@ public abstract class SharedEmpSystem : EntitySystem
|
|||
/// <param name="energyConsumption">The amount of energy consumed by the EMP pulse. In Joule.</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>
|
||||
/// <param name="damage">DeltaV - The damage that that EMP will do. If not specified or null, will do 130 Ion damage. To do no damage, pass in a DamageSpecifier with no damage types.</param>
|
||||
public void EmpPulse(MapCoordinates mapCoordinates, float range, float energyConsumption, TimeSpan duration, EntityUid? user = null, DamageSpecifier? damage = null) // DeltaV - Add Ion Damage
|
||||
public void EmpPulse(MapCoordinates mapCoordinates, float range, float energyConsumption, TimeSpan duration, EntityUid? user = null)
|
||||
{
|
||||
foreach (var uid in _lookup.GetEntitiesInRange(mapCoordinates, range))
|
||||
{
|
||||
TryEmpEffects(uid, energyConsumption, duration, user, damage ?? DefaultEmpDamage); // DeltaV - Add Ion Damage
|
||||
TryEmpEffects(uid, energyConsumption, duration, user);
|
||||
}
|
||||
|
||||
// TODO: replace with PredictedSpawn once it works with animated sprites
|
||||
|
|
@ -92,15 +85,13 @@ 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>'
|
||||
/// <param name="damage">DeltaV - The damage that that EMP will do. If not specified or null, will do 130 Ion damage. To do no damage, pass in a DamageSpecifier with no damage types.</param>
|
||||
/// <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, DamageSpecifier? damage = null, bool predicted = true) // Delta V - Add ion damage
|
||||
public void EmpPulse(EntityCoordinates coordinates, float range, float energyConsumption, TimeSpan duration, EntityUid? user = null, bool predicted = true)
|
||||
{
|
||||
_entSet.Clear();
|
||||
_lookup.GetEntitiesInRange(coordinates, range, _entSet);
|
||||
foreach (var uid in _entSet)
|
||||
{
|
||||
TryEmpEffects(uid, energyConsumption, duration, user, damage ?? DefaultEmpDamage); // DeltaV - Add Ion Damage
|
||||
TryEmpEffects(uid, energyConsumption, duration, user);
|
||||
}
|
||||
// TODO: replace with PredictedSpawn once it works with animated sprites
|
||||
if (_net.IsServer)
|
||||
|
|
@ -123,37 +114,31 @@ public abstract class SharedEmpSystem : EntitySystem
|
|||
|
||||
/// <summary>
|
||||
/// Attempts to apply the effects of an EMP pulse onto an entity by first raising an <see cref="EmpAttemptEvent"/>, followed by raising a <see cref="EmpPulseEvent"/> on it.
|
||||
/// <br/>
|
||||
/// <br/>DeltaV - In most cases, you will want to use <see cref="EmpPulse"/> instead.
|
||||
/// </summary>
|
||||
/// <param name="uid">The entity to apply the EMP effects on.</param>
|
||||
/// <param name="energyConsumption">The amount of energy consumed by the EMP.</param>
|
||||
/// <param name="duration">The duration of the EMP effects.</param>
|
||||
/// <param name="user">The player that caused the EMP. For prediction purposes.</param>
|
||||
/// <param name="damage">DeltaV - The damage that that EMP will do. If null, no damage is done.</param>
|
||||
/// <returns>If the entity was affected by the EMP.</returns>
|
||||
public bool TryEmpEffects(EntityUid uid, float energyConsumption, TimeSpan duration, EntityUid? user = null, DamageSpecifier? damage = null) // DeltaV - Add Ion Damage
|
||||
public bool TryEmpEffects(EntityUid uid, float energyConsumption, TimeSpan duration, EntityUid? user = null)
|
||||
{
|
||||
var attemptEv = new EmpAttemptEvent();
|
||||
RaiseLocalEvent(uid, ref attemptEv);
|
||||
if (attemptEv.Cancelled)
|
||||
return false;
|
||||
|
||||
return DoEmpEffects(uid, energyConsumption, duration, user, damage); // DeltaV - Add Ion Damage
|
||||
return DoEmpEffects(uid, energyConsumption, duration, user);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Applies the effects of an EMP pulse onto an entity by raising a <see cref="EmpPulseEvent"/> on it.
|
||||
/// <br/>
|
||||
/// <br/>DeltaV - In most cases, you will want to use <see cref="EmpPulse"/> instead.
|
||||
/// </summary>
|
||||
/// <param name="uid">The entity to apply the EMP effects on.</param>
|
||||
/// <param name="energyConsumption">The amount of energy consumed by the EMP.</param>
|
||||
/// <param name="duration">The duration of the EMP effects.</param>
|
||||
/// <param name="user">The player that caused the EMP. For prediction purposes.</param>
|
||||
/// <param name="damage">DeltaV - The damage that that EMP will do. If null, no damage is done.</param>
|
||||
/// <returns>If the entity was affected by the EMP.</returns>
|
||||
public bool DoEmpEffects(EntityUid uid, float energyConsumption, TimeSpan duration, EntityUid? user = null, DamageSpecifier? damage = null) // DeltaV - Add Ion Damage
|
||||
public bool DoEmpEffects(EntityUid uid, float energyConsumption, TimeSpan duration, EntityUid? user = null)
|
||||
{
|
||||
var strMultiplier = 1f;
|
||||
var durMultiplier = 1f;
|
||||
|
|
@ -162,7 +147,7 @@ public abstract class SharedEmpSystem : EntitySystem
|
|||
strMultiplier = resistance.StrengthMultiplier;
|
||||
durMultiplier = resistance.DurationMultiplier;
|
||||
}
|
||||
var ev = new EmpPulseEvent(energyConsumption * strMultiplier, false, false, duration * durMultiplier, user, damage); // DeltaV - Add Ion Damage
|
||||
var ev = new EmpPulseEvent(energyConsumption * strMultiplier, false, false, duration * durMultiplier, user);
|
||||
RaiseLocalEvent(uid, ref ev);
|
||||
|
||||
// TODO: replace with PredictedSpawn once it works with animated sprites
|
||||
|
|
@ -235,7 +220,7 @@ public record struct EmpAttemptEvent(bool Cancelled);
|
|||
/// <param name="User">The player that caused the EMP. For prediction purposes.</param>
|
||||
|
||||
[ByRefEvent]
|
||||
public record struct EmpPulseEvent(float EnergyConsumption, bool Affected, bool Disabled, TimeSpan Duration, EntityUid? User, DamageSpecifier? Damage = null); // DeltaV - Added Damage
|
||||
public record struct EmpPulseEvent(float EnergyConsumption, bool Affected, bool Disabled, TimeSpan Duration, EntityUid? User);
|
||||
|
||||
/// <summary>
|
||||
/// Raised on an entity after <see cref="EmpDisabledComponent"/> is removed.
|
||||
|
|
|
|||
|
|
@ -28,10 +28,4 @@ public sealed partial class EmpOnTriggerComponent : BaseXOnTriggerComponent
|
|||
/// </summary>
|
||||
[DataField, AutoNetworkedField]
|
||||
public TimeSpan DisableDuration = TimeSpan.FromSeconds(60);
|
||||
|
||||
/// <summary>
|
||||
/// DeltaV - The damage dealt to silicons instead of draining their power cells
|
||||
/// </summary>
|
||||
[DataField, AutoNetworkedField]
|
||||
public DamageSpecifier? Damage;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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, ent.Comp.Damage, predicted: args.Predicted); // Delta V - Silicon Damage
|
||||
_emp.EmpPulse(Transform(target).Coordinates, ent.Comp.Range, ent.Comp.EnergyConsumption, ent.Comp.DisableDuration, args.User, predicted: args.Predicted);
|
||||
args.Handled = true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +0,0 @@
|
|||
namespace Content.Shared._DV.Silicons.Components;
|
||||
|
||||
///<summary>
|
||||
///This components prevents the normal EMP effects on an entity, and makes it take ion damage instead
|
||||
///</summary>
|
||||
[RegisterComponent]
|
||||
public sealed partial class SiliconEmpComponent : Component;
|
||||
|
|
@ -1,40 +0,0 @@
|
|||
using Content.Shared.Emp;
|
||||
using Content.Shared.Damage;
|
||||
using Content.Shared.Damage.Systems;
|
||||
using Content.Shared.Damage.Components;
|
||||
using Content.Shared._DV.Silicons.Components;
|
||||
|
||||
namespace Content.Shared._DV.Silicons;
|
||||
|
||||
public abstract class SharedSiliconEmpSystem : EntitySystem
|
||||
{
|
||||
[Dependency] private readonly DamageableSystem _damageable = default!;
|
||||
|
||||
/// <summary>
|
||||
/// If the entity has the <see cref="SiliconEmpComponent"/>, then it should take damage instead of draining its battery.
|
||||
/// </summary>
|
||||
/// <param name="entity">The entity to check</param>
|
||||
/// <returns>true if the entity has <see cref="SiliconEmpComponent"/></returns>
|
||||
public bool ShouldTakeDamageInsteadOfPowerDrain(Entity<SiliconEmpComponent?> entity)
|
||||
{
|
||||
if (!Resolve(entity, ref entity.Comp, false))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
|
||||
SubscribeLocalEvent<SiliconEmpComponent, EmpPulseEvent>(OnEmpPulse);
|
||||
}
|
||||
|
||||
private void OnEmpPulse(Entity<SiliconEmpComponent> ent, ref EmpPulseEvent args)
|
||||
{
|
||||
if (args.Damage is not { } damage)
|
||||
return;
|
||||
|
||||
_damageable.TryChangeDamage(ent.Owner, damage, false);
|
||||
}
|
||||
}
|
||||
|
|
@ -1 +0,0 @@
|
|||
damage-group-electronic = Electronic
|
||||
|
|
@ -30,7 +30,6 @@
|
|||
id: Silicon
|
||||
supportedGroups:
|
||||
- Brute
|
||||
- Electronic # DeltaV
|
||||
supportedTypes:
|
||||
- Heat
|
||||
- Shock
|
||||
|
|
|
|||
|
|
@ -227,7 +227,6 @@
|
|||
Slash: 0.8
|
||||
Piercing: 0.8
|
||||
Heat: 0.8
|
||||
Ion: 0 # DeltaV - I love self gibbing as ninja IPC!!
|
||||
# phase cloak
|
||||
- type: ToggleClothing
|
||||
action: ActionTogglePhaseCloak
|
||||
|
|
|
|||
|
|
@ -276,15 +276,6 @@
|
|||
- Normal
|
||||
- type: JetpackUser # DeltaV: Lets cyborgs fly in space
|
||||
- type: PreventDropOnDowned # Frontier: borgs don't drop items when falling (e.g. critical/dead)
|
||||
- type: PassiveDamage # DeltaV - electric damage disappears over time
|
||||
allowedStates:
|
||||
- Alive
|
||||
- Critical
|
||||
- Dead
|
||||
damage:
|
||||
types:
|
||||
Shock: -0.5
|
||||
- type: SiliconEmp # DeltaV - EMP damage
|
||||
- type: BypassLock
|
||||
openWiresPanel: true
|
||||
- type: BypassLockRequiresMobState
|
||||
|
|
|
|||
|
|
@ -200,9 +200,6 @@
|
|||
range: 2.75
|
||||
energyConsumption: 50000
|
||||
disableDuration: 10
|
||||
damage: # DeltaV - EMP damage
|
||||
types:
|
||||
Ion: 80 # Would take 2 charges if you want to actually kill with it
|
||||
|
||||
- type: entity
|
||||
parent: BaseSubdermalImplant
|
||||
|
|
@ -435,4 +432,4 @@
|
|||
- type: SubdermalImplant
|
||||
- type: RadioImplant
|
||||
radioChannels:
|
||||
- CentCom
|
||||
- CentCom
|
||||
|
|
|
|||
|
|
@ -326,7 +326,6 @@
|
|||
damage:
|
||||
types:
|
||||
Heat: 0
|
||||
Ion: 10 # DeltaV
|
||||
soundHit:
|
||||
collection: WeakHit
|
||||
forceSound: true
|
||||
|
|
@ -369,7 +368,6 @@
|
|||
damage:
|
||||
types:
|
||||
Heat: 0
|
||||
Ion: 5 # DeltaV
|
||||
soundHit:
|
||||
collection: WeakHit
|
||||
forceSound: true
|
||||
|
|
@ -1181,7 +1179,6 @@
|
|||
damage:
|
||||
types:
|
||||
Heat: 0
|
||||
Ion: 4 # DeltaV
|
||||
soundHit:
|
||||
collection: WeakHit
|
||||
forceSound: true
|
||||
|
|
|
|||
|
|
@ -382,7 +382,7 @@
|
|||
keysIn:
|
||||
- trigger
|
||||
range: 5.5
|
||||
energyConsumption: 100000 # Delta V, Was 50000
|
||||
energyConsumption: 50000
|
||||
- type: DeleteOnTrigger
|
||||
keysIn:
|
||||
- trigger
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@
|
|||
Asphyxiation: 12
|
||||
Cold: 12
|
||||
Structural: 15
|
||||
Ion: 15
|
||||
soundHit:
|
||||
path: /Audio/_DV/CosmicCult/cosmicsword_hit.ogg
|
||||
params:
|
||||
|
|
@ -101,7 +100,6 @@
|
|||
Piercing: 12
|
||||
Asphyxiation: 10
|
||||
Cold: 10
|
||||
Ion: 12
|
||||
soundHit:
|
||||
path: /Audio/_DV/CosmicCult/cosmiclance_hit.ogg
|
||||
params:
|
||||
|
|
@ -219,7 +217,6 @@
|
|||
Asphyxiation: 6
|
||||
Cold: 6
|
||||
Structural: 15
|
||||
Ion: 8
|
||||
soundHit:
|
||||
path: /Audio/_DV/CosmicCult/cosmicsword_hit.ogg
|
||||
params:
|
||||
|
|
|
|||
|
|
@ -59,7 +59,6 @@
|
|||
activationDamage:
|
||||
types:
|
||||
Asphyxiation: 60
|
||||
Ion: 60
|
||||
- type: CosmicCultExamine
|
||||
cultistText: cosmic-examine-glyph-truth
|
||||
|
||||
|
|
@ -79,7 +78,6 @@
|
|||
activationDamage:
|
||||
types:
|
||||
Asphyxiation: 40
|
||||
Ion: 40
|
||||
- type: CosmicCultExamine
|
||||
cultistText: cosmic-examine-glyph-knowledge
|
||||
|
||||
|
|
@ -99,7 +97,6 @@
|
|||
activationDamage:
|
||||
types:
|
||||
Asphyxiation: 25
|
||||
Ion: 25
|
||||
- type: CosmicCultExamine
|
||||
cultistText: cosmic-examine-glyph-cessation
|
||||
|
||||
|
|
@ -119,7 +116,6 @@
|
|||
activationDamage:
|
||||
types:
|
||||
Asphyxiation: 50
|
||||
Ion: 50
|
||||
- type: CosmicCultExamine
|
||||
cultistText: cosmic-examine-glyph-blades
|
||||
|
||||
|
|
@ -139,7 +135,6 @@
|
|||
activationDamage:
|
||||
types:
|
||||
Asphyxiation: 50
|
||||
Ion: 50
|
||||
- type: CosmicCultExamine
|
||||
cultistText: cosmic-examine-glyph-warding
|
||||
|
||||
|
|
@ -160,6 +155,5 @@
|
|||
activationDamage:
|
||||
types:
|
||||
Asphyxiation: 25
|
||||
Ion: 25
|
||||
- type: CosmicCultExamine
|
||||
cultistText: cosmic-examine-glyph-projection
|
||||
|
|
|
|||
|
|
@ -110,14 +110,12 @@
|
|||
types:
|
||||
Cold: 15
|
||||
Asphyxiation: 10
|
||||
Ion: 15
|
||||
- type: Projectile
|
||||
impactEffect: BulletImpactEffectCosmic
|
||||
damage:
|
||||
types:
|
||||
Cold: 10
|
||||
Asphyxiation: 5
|
||||
Ion: 8
|
||||
|
||||
- type: entity
|
||||
id: BulletImpactEffectCosmic
|
||||
|
|
|
|||
|
|
@ -1,5 +0,0 @@
|
|||
- type: damageGroup
|
||||
id: Electronic
|
||||
name: damage-group-electronic
|
||||
damageTypes:
|
||||
- Ion
|
||||
|
|
@ -1,9 +1,3 @@
|
|||
- type: damageType
|
||||
id: Ion
|
||||
name: damage-type-ion
|
||||
armorCoefficientPrice: 1
|
||||
armorFlatPrice: 1
|
||||
|
||||
- type: damageType
|
||||
id: Soul
|
||||
name: damage-type-soul
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
parent: SyndiCrewMonitor
|
||||
id: SyndiCrewMonitorRecharging
|
||||
name: syndicate crew monitor recharging
|
||||
description: The syndicated version of crew monitor, intercepts information from the server.
|
||||
description: The syndicate version of crew monitor, which intercepts suit coordinate information from the server.
|
||||
components:
|
||||
- type: PowerCellDraw
|
||||
useCharge: 10
|
||||
|
|
|
|||
Loading…
Reference in New Issue