перенос файлов сервера из папки White в _White
This commit is contained in:
27
Content.Server/_White/Flamethrower/FlamethrowerSystem.cs
Normal file
27
Content.Server/_White/Flamethrower/FlamethrowerSystem.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
using Content.Server.IgnitionSource;
|
||||
using Content.Shared.Temperature;
|
||||
using Content.Shared.Weapons.Ranged.Systems;
|
||||
|
||||
namespace Content.Server._White.Flamethrower;
|
||||
|
||||
public sealed class FlamethrowerSystem : EntitySystem
|
||||
{
|
||||
public override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
|
||||
SubscribeLocalEvent<FlamethrowerComponent, GunShotEvent>(OnShoot);
|
||||
}
|
||||
|
||||
private void OnShoot(EntityUid uid, FlamethrowerComponent component, ref GunShotEvent args)
|
||||
{
|
||||
var hasIgnition = TryComp(uid, out IgnitionSourceComponent? ignition);
|
||||
var isHotEvent = new IsHotEvent {IsHot = hasIgnition && ignition!.Ignited};
|
||||
|
||||
foreach (var (shotUid, _) in args.Ammo)
|
||||
{
|
||||
if(shotUid is not null)
|
||||
RaiseLocalEvent(shotUid.Value, isHotEvent);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user