Misc implant fixes (#17172)

This commit is contained in:
Leon Friedrich
2023-06-07 15:53:11 +12:00
committed by GitHub
parent 1a3f8f2c2c
commit 677ef07aa2
8 changed files with 132 additions and 79 deletions

View File

@@ -48,10 +48,12 @@ public sealed partial class ImplanterSystem : SharedImplanterSystem
}
else
{
if (!CanImplant(args.User, args.Target.Value, uid, component, out _, out _))
return;
//Implant self instantly, otherwise try to inject the target.
if (args.User == args.Target)
Implant(uid, args.Target.Value, component);
Implant(args.User, args.Target.Value, uid, component);
else
TryImplant(component, args.User, args.Target.Value, uid);
}
@@ -117,7 +119,7 @@ public sealed partial class ImplanterSystem : SharedImplanterSystem
if (args.Cancelled || args.Handled || args.Target == null || args.Used == null)
return;
Implant(args.Used.Value, args.Target.Value, component);
Implant(args.User, args.Target.Value, args.Used.Value, component);
args.Handled = true;
}