Predict stripping (#32478)

* Predict stripping

Stops mob verbs from getting moved around again.

* Bola

* Fix ftl
This commit is contained in:
metalgearsloth
2024-09-27 17:12:10 +10:00
committed by GitHub
parent 2e03787b6c
commit bc461b91a5
12 changed files with 858 additions and 921 deletions

View File

@@ -2,7 +2,7 @@ using Content.Shared.Ensnaring;
using Content.Shared.Ensnaring.Components;
using Robust.Client.GameObjects;
namespace Content.Client.Ensnaring.Visualizers;
namespace Content.Client.Ensnaring;
public sealed class EnsnareableSystem : SharedEnsnareableSystem
{
@@ -12,13 +12,14 @@ public sealed class EnsnareableSystem : SharedEnsnareableSystem
{
base.Initialize();
SubscribeLocalEvent<EnsnareableComponent, ComponentInit>(OnComponentInit);
SubscribeLocalEvent<EnsnareableComponent, AppearanceChangeEvent>(OnAppearanceChange);
}
private void OnComponentInit(EntityUid uid, EnsnareableComponent component, ComponentInit args)
protected override void OnEnsnareInit(Entity<EnsnareableComponent> ent, ref ComponentInit args)
{
if(!TryComp<SpriteComponent>(uid, out var sprite))
base.OnEnsnareInit(ent, ref args);
if(!TryComp<SpriteComponent>(ent.Owner, out var sprite))
return;
// TODO remove this, this should just be in yaml.