Skip to content

Commit

Permalink
Borg shard fix (#1384)
Browse files Browse the repository at this point in the history
* borg shard fix

* fix using
  • Loading branch information
MiraHell authored Jul 18, 2024
1 parent 99a11c6 commit ea6d365
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions Content.Shared/StepTrigger/Systems/StepTriggerImmuneSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,20 @@ public sealed class StepTriggerImmuneSystem : EntitySystem
/// <inheritdoc/>
public override void Initialize()
{
SubscribeLocalEvent<StepTriggerImmuneComponent, StepTriggerAttemptEvent>(OnStepTriggerAttempt);
// SubscribeLocalEvent<StepTriggerImmuneComponent, StepTriggerAttemptEvent>(OnStepTriggerAttempt); 220 borg shard fix
SubscribeLocalEvent<ClothingRequiredStepTriggerComponent, StepTriggerAttemptEvent>(OnStepTriggerClothingAttempt);
SubscribeLocalEvent<ClothingRequiredStepTriggerComponent, ExaminedEvent>(OnExamined);
}

private void OnStepTriggerAttempt(Entity<StepTriggerImmuneComponent> ent, ref StepTriggerAttemptEvent args)
{
args.Cancelled = true;
}

// start 220 borg shard fix
// private void OnStepTriggerAttempt(Entity<StepTriggerImmuneComponent> ent, ref StepTriggerAttemptEvent args)
// {
// args.Cancelled = true;
// }
// end 220 borg shard fix
private void OnStepTriggerClothingAttempt(EntityUid uid, ClothingRequiredStepTriggerComponent component, ref StepTriggerAttemptEvent args)
{
if (_inventory.TryGetInventoryEntity<ClothingRequiredStepTriggerImmuneComponent>(args.Tripper, out _))
if (_inventory.TryGetInventoryEntity<ClothingRequiredStepTriggerImmuneComponent>(args.Tripper, out _)
|| TryComp<StepTriggerImmuneComponent>(args.Tripper, out _)) // 220 borg shard fix
{
args.Cancelled = true;
}
Expand Down

0 comments on commit ea6d365

Please sign in to comment.