xenoarch: artifacts no longer irradiate themselves (much) (#4976)

This commit is contained in:
Charlie Morley 2025-12-15 15:10:17 -08:00 committed by GitHub
parent ef1653c20a
commit 3fcd73eb29
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 15 additions and 1 deletions

View File

@ -16,5 +16,11 @@ public sealed partial class RadiationReceiverComponent : Component
/// </summary>
[ViewVariables(VVAccess.ReadOnly)]
public float CurrentRadiation;
/// <summary>
/// DeltaV - multiplier on the rads received if the RadiationSource is the same entity as this RadiationReceiver
/// </summary>
[DataField]
public float SelfSourceMultiplier = 1.0f;
}

View File

@ -79,7 +79,8 @@ public partial class RadiationSystem
// add rads to total rad exposure
if (ray.ReachedDestination)
rads += ray.Rads;
// DeltaV - apply a modifier if you are irradiating yourself
rads += ray.Rads * (source.Entity.Owner == destUid ? (source.Entity.Comp1.SelfReceiverMultiplier * dest.SelfSourceMultiplier) : 1f);
if (!debug)
continue;

View File

@ -26,4 +26,10 @@ public sealed partial class RadiationSourceComponent : Component
[DataField, ViewVariables(VVAccess.ReadWrite)]
public bool Enabled = true;
/// <summary>
/// DeltaV - multiplier on the rads delivered if the RadiationReceiver is the same entity as this RadiationSource
/// </summary>
[DataField]
public float SelfReceiverMultiplier = 1.0f;
}

View File

@ -45,6 +45,7 @@
- type: Psionic # DeltaV - sentient artifacts are psionic
# These components are needed for certain triggers to work.
- type: RadiationReceiver
selfSourceMultiplier: 0.1 # DeltaV - a radiation effect triggering a radiation trigger on the same artifact is often annoying
- type: Reactive
groups:
Flammable: [Touch]