* Hardsuits and softsuits count as having shoes for step triggers * Add softsuit tag prototype * Change to suitEVA tag * Get rid of softsuit tag, found suitEVA tag * Full pass of ShoesRequiredStepTriggerImmune * Adds check to outerClothing for ShoesRequiredStepTriggerImmune * return * fuck Dionas * Convert to comp, space dragons immune as well * Merge conflict * Merge conflict * fix leftover tags * empty spaces * turns out the dragon didn't need it * minor optimization * Add access for system, add comp to baseShoes, check slotflags for every slot besides pockets * fix * fuck it we ball --------- Co-authored-by: Plykiya <plykiya@protonmail.com> Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
38 lines
1.4 KiB
C#
38 lines
1.4 KiB
C#
using Content.Shared.Examine;
|
|
using Content.Shared.Inventory;
|
|
using Content.Shared.StepTrigger.Components;
|
|
using Content.Shared.Tag;
|
|
|
|
namespace Content.Shared.StepTrigger.Systems;
|
|
|
|
public sealed class StepTriggerImmuneSystem : EntitySystem
|
|
{
|
|
[Dependency] private readonly InventorySystem _inventory = default!;
|
|
|
|
/// <inheritdoc/>
|
|
public override void Initialize()
|
|
{
|
|
SubscribeLocalEvent<StepTriggerImmuneComponent, StepTriggerAttemptEvent>(OnStepTriggerAttempt);
|
|
SubscribeLocalEvent<ClothingRequiredStepTriggerComponent, StepTriggerAttemptEvent>(OnStepTriggerClothingAttempt);
|
|
SubscribeLocalEvent<ClothingRequiredStepTriggerComponent, ExaminedEvent>(OnExamined);
|
|
}
|
|
|
|
private void OnStepTriggerAttempt(Entity<StepTriggerImmuneComponent> ent, ref StepTriggerAttemptEvent args)
|
|
{
|
|
args.Cancelled = true;
|
|
}
|
|
|
|
private void OnStepTriggerClothingAttempt(EntityUid uid, ClothingRequiredStepTriggerComponent component, ref StepTriggerAttemptEvent args)
|
|
{
|
|
if (_inventory.TryGetInventoryEntity<ClothingRequiredStepTriggerImmuneComponent>(args.Tripper, out _))
|
|
{
|
|
args.Cancelled = true;
|
|
}
|
|
}
|
|
|
|
private void OnExamined(EntityUid uid, ClothingRequiredStepTriggerComponent component, ExaminedEvent args)
|
|
{
|
|
args.PushMarkup(Loc.GetString("clothing-required-step-trigger-examine"));
|
|
}
|
|
}
|