@@ -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)
|
||||||
|
|||||||
@@ -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);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user