using Content.Shared.Random.Helpers;
using Content.Shared.Silicons.Laws;
using Content.Shared.Silicons.Laws.Components;
-using Content.Shared.Station.Components;
using Robust.Shared.Prototypes;
using Robust.Shared.Random;
[ValidatePrototypeId<DatasetPrototype>]
private const string Foods = "IonStormFoods";
- public void IonStormTarget(EntityUid ent, SiliconLawBoundComponent lawBound, TransformComponent xform, IonStormTargetComponent target, EntityUid? chosenStation, bool ignoreStation = false, bool adminlog = true)
+ public void IonStormTarget(EntityUid ent, SiliconLawBoundComponent lawBound, TransformComponent xform, IonStormTargetComponent target, EntityUid? chosenStation, bool adminlog = true)
{
- // only affect law holders on the station unless ignoreStation is true.
- if (CompOrNull<StationMemberComponent>(xform.GridUid)?.Station != chosenStation && !ignoreStation)
- return;
-
if (!_robustRandom.Prob(target.Chance))
return;
for (int currentIonStorm = 0; currentIonStorm < component.IonStormAmount; currentIonStorm++)
{
- _ionStorm.IonStormTarget(uid, lawBound, xform, target, null, true, false);
+ _ionStorm.IonStormTarget(uid, lawBound, xform, target, null, false);
}
var laws = _siliconLaw.GetLaws(uid, lawBound);
using Content.Shared.GameTicking.Components;
using Content.Shared.Silicons.Laws;
using Content.Shared.Silicons.Laws.Components;
+using Content.Shared.Station.Components;
namespace Content.Server.StationEvents.Events;
var query = EntityQueryEnumerator<SiliconLawBoundComponent, TransformComponent, IonStormTargetComponent>();
while (query.MoveNext(out var ent, out var lawBound, out var xform, out var target))
{
+ // only affect law holders on the station
+ if (CompOrNull<StationMemberComponent>(xform.GridUid)?.Station != chosenStation)
+ continue;
+
_ionStorm.IonStormTarget(ent, lawBound, xform, target, chosenStation);
}
}