RobustToolbox icon indicating copy to clipboard operation
RobustToolbox copied to clipboard

remove obsolete EntityUid methods in favor of Entity<T> pattern

Open MilonPL opened this issue 9 months ago • 3 comments

entityuid casts to entity<T> so in 99% of cases it was being marked as obsolete despite being fine

Entity<T> truly is the best thing ever since sliced bread

MilonPL avatar Feb 12 '25 09:02 MilonPL

We can't remove these methods for a good while yet.

@PJB3005 I think the container ones would be fine to remove? Otherwise the new ones end up getting incorrectly marked as obsolete in new PRs because of EntityUid casting to Entity<T?>.

MilonPL avatar Feb 16 '25 06:02 MilonPL

I know that at least the container method has been marked as obsolete for a decent time now (about a year, #5136), so I think its fine being removed by now. Though all of these breaking changes are pretty similar and I'd rather just do them all at once anyways. But I also know I'm also just generally more trigger happy with making breaking changes. So I guess its up to @PJB3005

ElectroJr avatar Mar 27 '25 02:03 ElectroJr

I have no idea what's causing the assert to fail, it's just not present in the non-entity variant, and even if we pass in the grid entity as null it fails to anchor it and fails at a later assert. Might want to make sure the behavior is the same before removing those, or when we finally remove transformcomponent methods. Needs another content PR because one of these has sneaked in, and also evil (ent, null) removed.

MilonPL avatar Apr 20 '25 09:04 MilonPL