Bows & arrows (#19771)

This commit is contained in:
Kara
2023-09-22 02:45:21 -07:00
committed by GitHub
parent 1ba1ab6d61
commit f8d194b117
51 changed files with 507 additions and 22 deletions

View File

@@ -64,7 +64,7 @@ public abstract class SharedDamageMarkerSystem : EntitySystem
component.Amount <= 0 ||
component.Whitelist?.IsValid(args.OtherEntity, EntityManager) == false ||
!TryComp<ProjectileComponent>(uid, out var projectile) ||
!projectile.Weapon.IsValid())
projectile.Weapon == null)
{
return;
}
@@ -72,7 +72,7 @@ public abstract class SharedDamageMarkerSystem : EntitySystem
// Markers are exclusive, deal with it.
var marker = EnsureComp<DamageMarkerComponent>(args.OtherEntity);
marker.Damage = new DamageSpecifier(component.Damage);
marker.Marker = projectile.Weapon;
marker.Marker = projectile.Weapon.Value;
marker.EndTime = _timing.CurTime + component.Duration;
component.Amount--;
Dirty(marker);