перенос файлов сервера из папки White в _White

This commit is contained in:
Remuchi
2024-01-28 18:18:54 +07:00
parent 21dbccfec9
commit 1e4ad59270
309 changed files with 450 additions and 437 deletions

View File

@@ -0,0 +1,33 @@
using Content.Shared.Projectiles;
using Content.Shared.Throwing;
using Content.Shared.Weapons.Ranged.Events;
namespace Content.Server._White.Crossbow;
public sealed class ModifyDamageOnShootSystem : EntitySystem
{
public override void Initialize()
{
base.Initialize();
SubscribeLocalEvent<ModifyDamageOnShootComponent, AmmoShotEvent>(OnShoot);
}
private void OnShoot(EntityUid uid, ModifyDamageOnShootComponent component, AmmoShotEvent args)
{
foreach (var proj in args.FiredProjectiles)
{
var comp = EnsureComp<ThrowDamageModifierComponent>(proj);
comp.Damage += component.Damage;
if (!component.AddEmbedding)
continue;
comp.AddEmbedding = true;
var embed = EnsureComp<EmbeddableProjectileComponent>(proj);
embed.Offset = component.Offset;
embed.PreventEmbedding = false;
Dirty(proj, embed);
}
}
}