Fix lubed item smart equip (#17727)

* fix

* left over comment
This commit is contained in:
Slava0135
2023-06-29 12:36:09 +03:00
committed by GitHub
parent dd17ac1b3b
commit cacf26d740
2 changed files with 1 additions and 1 deletions

View File

@@ -23,7 +23,6 @@ public sealed class LubeSystem : EntitySystem
SubscribeLocalEvent<LubeComponent, AfterInteractEvent>(OnInteract); SubscribeLocalEvent<LubeComponent, AfterInteractEvent>(OnInteract);
} }
// When glue bottle is used on item it will apply the glued and unremoveable components.
private void OnInteract(EntityUid uid, LubeComponent component, AfterInteractEvent args) private void OnInteract(EntityUid uid, LubeComponent component, AfterInteractEvent args)
{ {
if (args.Handled) if (args.Handled)

View File

@@ -43,6 +43,7 @@ public sealed class LubedSystem : EntitySystem
args.Cancel(); args.Cancel();
var user = args.Container.Owner; var user = args.Container.Owner;
_transform.SetCoordinates(uid, Transform(user).Coordinates); _transform.SetCoordinates(uid, Transform(user).Coordinates);
_transform.AttachToGridOrMap(uid);
_throwing.TryThrow(uid, _random.NextVector2(), strength: component.SlipStrength); _throwing.TryThrow(uid, _random.NextVector2(), strength: component.SlipStrength);
_popup.PopupEntity(Loc.GetString("lube-slip", ("target", Identity.Entity(uid, EntityManager))), user, user, PopupType.MediumCaution); _popup.PopupEntity(Loc.GetString("lube-slip", ("target", Identity.Entity(uid, EntityManager))), user, user, PopupType.MediumCaution);
} }