Replace AttachToGridOrMap with DropNextTo (#27950)
This commit is contained in:
@@ -110,15 +110,8 @@ namespace Content.Server.Nutrition.EntitySystems
|
||||
|
||||
// try putting the slice into the container if the food being sliced is in a container!
|
||||
// this lets you do things like slice a pizza up inside of a hot food cart without making a food-everywhere mess
|
||||
if (_containerSystem.TryGetContainingContainer(uid, out var container) && _containerSystem.CanInsert(sliceUid, container))
|
||||
{
|
||||
_containerSystem.Insert(sliceUid, container);
|
||||
}
|
||||
else // puts it down "right-side up"
|
||||
{
|
||||
_xformSystem.AttachToGridOrMap(sliceUid);
|
||||
_xformSystem.SetLocalRotation(sliceUid, 0);
|
||||
}
|
||||
_xformSystem.DropNextTo(sliceUid, (uid, transform));
|
||||
_xformSystem.SetLocalRotation(sliceUid, 0);
|
||||
|
||||
return sliceUid;
|
||||
}
|
||||
@@ -143,15 +136,8 @@ namespace Content.Server.Nutrition.EntitySystems
|
||||
var trashUid = Spawn(foodComp.Trash, _xformSystem.GetMapCoordinates(uid));
|
||||
|
||||
// try putting the trash in the food's container too, to be consistent with slice spawning?
|
||||
if (_containerSystem.TryGetContainingContainer(uid, out var container) && _containerSystem.CanInsert(trashUid, container))
|
||||
{
|
||||
_containerSystem.Insert(trashUid, container);
|
||||
}
|
||||
else // puts it down "right-side up"
|
||||
{
|
||||
_xformSystem.AttachToGridOrMap(trashUid);
|
||||
_xformSystem.SetLocalRotation(trashUid, 0);
|
||||
}
|
||||
_xformSystem.DropNextTo(trashUid, uid);
|
||||
_xformSystem.SetLocalRotation(trashUid, 0);
|
||||
|
||||
QueueDel(uid);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user