New Aspect
This commit is contained in:
18
Content.Server/_Honk/Aspects/DeleteVendingMachineAspect.cs
Normal file
18
Content.Server/_Honk/Aspects/DeleteVendingMachineAspect.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using Content.Server._White.AspectsSystem.Base;
|
||||
using Content.Server.GameTicking.Rules.Components;
|
||||
using Content.Shared.VendingMachines;
|
||||
|
||||
namespace Content.Server._Honk.Aspects;
|
||||
|
||||
public sealed class DeleteVendingMachineAspect : AspectSystem<DeleteVendingMachineComponent>
|
||||
{
|
||||
[Dependency] private readonly EntityManager _entityManager = default!;
|
||||
|
||||
protected override void Started(EntityUid uid, DeleteVendingMachineComponent component, GameRuleComponent gameRule, GameRuleStartedEvent args)
|
||||
{
|
||||
foreach (var entity in _entityManager.EntityQuery<VendingMachineComponent>())
|
||||
{
|
||||
_entityManager.DeleteEntity(entity.Owner);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
namespace Content.Server._Honk.Aspects;
|
||||
|
||||
[RegisterComponent]
|
||||
public sealed partial class DeleteVendingMachineComponent : Component
|
||||
{
|
||||
|
||||
}
|
||||
@@ -364,3 +364,15 @@
|
||||
# startAudio:
|
||||
# path: /Audio/White/Aspects/accent.ogg
|
||||
# - type: SkeletonAspect
|
||||
|
||||
#Honk Start
|
||||
- type: entity
|
||||
id: DeleteVendingMachineAspect
|
||||
parent: BaseGameRule
|
||||
noSpawn: false
|
||||
components:
|
||||
- type: Aspect
|
||||
name: "DeleteVendingMachineAspect"
|
||||
description: "Некий Жабак украл все торговые автоматы!"
|
||||
weight: 3
|
||||
- type: DeleteVendingMachine
|
||||
|
||||
Reference in New Issue
Block a user