Resolve 'TransformComponent.MapPosition' is obsolete in content (#27939)
* Resolve `'TransformComponent.MapPosition' is obsolete: 'Use TransformSystem.GetMapCoordinates'` in content * build?
This commit is contained in:
@@ -31,6 +31,7 @@ using Robust.Shared.Audio;
|
||||
using Robust.Shared.Audio.Systems;
|
||||
using Robust.Shared.Utility;
|
||||
using System.Linq;
|
||||
using Robust.Server.GameObjects;
|
||||
|
||||
namespace Content.Server.Nutrition.EntitySystems;
|
||||
|
||||
@@ -52,6 +53,7 @@ public sealed class FoodSystem : EntitySystem
|
||||
[Dependency] private readonly SharedHandsSystem _hands = default!;
|
||||
[Dependency] private readonly SharedInteractionSystem _interaction = default!;
|
||||
[Dependency] private readonly SolutionContainerSystem _solutionContainer = default!;
|
||||
[Dependency] private readonly TransformSystem _transform = default!;
|
||||
[Dependency] private readonly StackSystem _stack = default!;
|
||||
[Dependency] private readonly StomachSystem _stomach = default!;
|
||||
[Dependency] private readonly UtensilSystem _utensil = default!;
|
||||
@@ -150,7 +152,7 @@ public sealed class FoodSystem : EntitySystem
|
||||
return (false, true);
|
||||
|
||||
// TODO make do-afters account for fixtures in the range check.
|
||||
if (!Transform(user).MapPosition.InRange(Transform(target).MapPosition, MaxFeedDistance))
|
||||
if (!_transform.GetMapCoordinates(user).InRange(_transform.GetMapCoordinates(target), MaxFeedDistance))
|
||||
{
|
||||
var message = Loc.GetString("interaction-system-user-interaction-cannot-reach");
|
||||
_popup.PopupEntity(message, user, user);
|
||||
@@ -325,7 +327,7 @@ public sealed class FoodSystem : EntitySystem
|
||||
}
|
||||
|
||||
//We're empty. Become trash.
|
||||
var position = Transform(food).MapPosition;
|
||||
var position = _transform.GetMapCoordinates(food);
|
||||
var finisher = Spawn(component.Trash, position);
|
||||
|
||||
// If the user is holding the item
|
||||
|
||||
Reference in New Issue
Block a user