Fix throwing.

This commit is contained in:
Pieter-Jan Briers
2020-07-02 23:24:27 +02:00
parent 610ab8bf50
commit bc24a852f9
10 changed files with 149 additions and 90 deletions

View File

@@ -0,0 +1,23 @@
using Content.Shared.GameObjects.Components.Projectiles;
using Robust.Shared.GameObjects;
#nullable enable
namespace Content.Client.GameObjects.Components.Projectiles
{
[RegisterComponent]
public class ProjectileComponent : SharedProjectileComponent
{
protected override EntityUid Shooter => _shooter;
private EntityUid _shooter;
public override void HandleComponentState(ComponentState? curState, ComponentState? nextState)
{
if (curState is ProjectileComponentState compState)
{
_shooter = compState.Shooter;
IgnoreShooter = compState.IgnoreShooter;
}
}
}
}

View File

@@ -0,0 +1,12 @@
using Content.Shared.GameObjects;
using Robust.Shared.GameObjects;
namespace Content.Client.GameObjects.Components.Projectiles
{
[RegisterComponent]
public class ThrownItemComponent : ProjectileComponent
{
public override string Name => "ThrownItem";
public override uint? NetID => ContentNetIDs.THROWN_ITEM;
}
}