Replace AdvertiseComponent with DatasetVocalizerComponent (#38887)
* Replace AdvertiseComponent with DatasetVocalizerComponent * No vocalizing while broken or without power * Kill AdvertiseComponent/System * This really shouldn't be here * xmldoc for VocalizerRequiresPowerComponent * TryIndex -> Index
This commit is contained in:
@@ -4,6 +4,7 @@ using Content.Server.Cargo.Systems;
|
||||
using Content.Server.Emp;
|
||||
using Content.Server.Power.Components;
|
||||
using Content.Server.Power.EntitySystems;
|
||||
using Content.Server.Vocalization.Systems;
|
||||
using Content.Shared.Cargo;
|
||||
using Content.Shared.Damage;
|
||||
using Content.Shared.Destructible;
|
||||
@@ -42,6 +43,7 @@ namespace Content.Server.VendingMachines
|
||||
SubscribeLocalEvent<VendingMachineComponent, DamageChangedEvent>(OnDamageChanged);
|
||||
SubscribeLocalEvent<VendingMachineComponent, PriceCalculationEvent>(OnVendingPrice);
|
||||
SubscribeLocalEvent<VendingMachineComponent, EmpPulseEvent>(OnEmpPulse);
|
||||
SubscribeLocalEvent<VendingMachineComponent, TryVocalizeEvent>(OnTryVocalize);
|
||||
|
||||
SubscribeLocalEvent<VendingMachineComponent, ActivatableUIOpenAttemptEvent>(OnActivatableUIOpenAttempt);
|
||||
|
||||
@@ -309,5 +311,10 @@ namespace Content.Server.VendingMachines
|
||||
component.NextEmpEject = _timing.CurTime;
|
||||
}
|
||||
}
|
||||
|
||||
private void OnTryVocalize(Entity<VendingMachineComponent> ent, ref TryVocalizeEvent args)
|
||||
{
|
||||
args.Cancelled |= ent.Comp.Broken;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user