Syringe gun! (#32112)

* Init testing

* copyright

* oops

* Tracking the embed entity uid

* testing stuff for gradual injection

* work

* weh

* god save me

* bleh

* Yippee!

* Again

* Mini syringe ammo

* cleaning up

* mini syringes have a texture for fill amount

* -3 cool points :(

* hitboxes

* init cleanup

* much needed fixes

* Fixes
This commit is contained in:
ScarKy0
2024-10-22 15:03:42 +02:00
committed by GitHub
parent 94bbf7262c
commit 62f5a31c4a
20 changed files with 257 additions and 7 deletions

View File

@@ -71,6 +71,8 @@ public abstract partial class SharedProjectileSystem : EntitySystem
TryComp<PhysicsComponent>(uid, out var physics);
_physics.SetBodyType(uid, BodyType.Dynamic, body: physics, xform: xform);
_transform.AttachToGridOrMap(uid, xform);
component.EmbeddedIntoUid = null;
Dirty(uid, component);
// Reset whether the projectile has damaged anything if it successfully was removed
if (TryComp<ProjectileComponent>(uid, out var projectile))
@@ -127,8 +129,10 @@ public abstract partial class SharedProjectileSystem : EntitySystem
}
_audio.PlayPredicted(component.Sound, uid, null);
component.EmbeddedIntoUid = target;
var ev = new EmbedEvent(user, target);
RaiseLocalEvent(uid, ref ev);
Dirty(uid, component);
}
private void PreventCollision(EntityUid uid, ProjectileComponent component, ref PreventCollideEvent args)