Aspects (#399)
* base * remove redudant shit * implement needed * doc * manager * Commands * Update AspectManager.cs * oops, hardcoded! * fix * похуй * да похуй * увфывфывфывфыв * Update AspectManager.cs * RandomAccentAspect * avoid repeating * FastAndFuriousAccent * Update Aspects.yml * Update FastandFuriousAspect.cs * RandomAppearanceAspect * helpers and some shit * Bombassssssss * DrunkAspect * CargoRich * TraitoredAspect * require info and feature to force aspect * add exec only in lobby * deforce command * Update TraitoredAspect.cs * Prepare for Bloody and Weak Aspects. * comments * WeakWallsAspect * tweak * NoEngineAspect * airunlock aspect * BloodyAspect * WeakAspect * BattledAspect * I Have Two Butts But I must Seat * веса * Update WhiteCVars.cs
This commit is contained in:
@@ -5,10 +5,11 @@ using Content.Shared.Camera;
|
||||
using Content.Shared.Damage;
|
||||
using Content.Shared.Database;
|
||||
using Content.Shared.Projectiles;
|
||||
using Robust.Server.GameObjects;
|
||||
using Content.Shared.White;
|
||||
using Robust.Shared.Configuration;
|
||||
using Robust.Shared.Player;
|
||||
using Robust.Shared.Physics.Events;
|
||||
using Content.Shared.Mobs.Components;
|
||||
using Robust.Shared.Player;
|
||||
|
||||
namespace Content.Server.Projectiles;
|
||||
|
||||
@@ -19,10 +20,18 @@ public sealed class ProjectileSystem : SharedProjectileSystem
|
||||
[Dependency] private readonly DamageableSystem _damageableSystem = default!;
|
||||
[Dependency] private readonly GunSystem _guns = default!;
|
||||
[Dependency] private readonly SharedCameraRecoilSystem _sharedCameraRecoil = default!;
|
||||
[Dependency] private readonly IConfigurationManager _cfg = default!;
|
||||
|
||||
private float DamageModifier { get; set; }
|
||||
|
||||
private void SetDamage(float value) => DamageModifier = value;
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
|
||||
_cfg.OnValueChanged(WhiteCVars.DamageModifier, SetDamage, true);
|
||||
|
||||
SubscribeLocalEvent<ProjectileComponent, StartCollideEvent>(OnStartCollide);
|
||||
}
|
||||
|
||||
@@ -48,7 +57,7 @@ public sealed class ProjectileSystem : SharedProjectileSystem
|
||||
|
||||
var otherName = ToPrettyString(target);
|
||||
var direction = args.OurBody.LinearVelocity.Normalized();
|
||||
var modifiedDamage = _damageableSystem.TryChangeDamage(target, ev.Damage, component.IgnoreResistances, origin: component.Shooter);
|
||||
var modifiedDamage = _damageableSystem.TryChangeDamage(target, ev.Damage * DamageModifier, component.IgnoreResistances, origin: component.Shooter);
|
||||
var deleted = Deleted(target);
|
||||
|
||||
if (modifiedDamage is not null && EntityManager.EntityExists(component.Shooter))
|
||||
|
||||
Reference in New Issue
Block a user