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:
Tayrtahn
2025-07-10 14:12:24 -04:00
committed by GitHub
parent a97223bc70
commit ecbff409b6
14 changed files with 231 additions and 271 deletions

View File

@@ -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;
}
}
}