Random spontaneous cleanup PR (#25131)
* Use new Subs.CVar helper Removes manual config OnValueChanged calls, removes need to remember to manually unsubscribe. This both reduces boilerplate and fixes many issues where subscriptions weren't removed on entity system shutdown. * Fix a bunch of warnings * More warning fixes * Use new DateTime serializer to get rid of ISerializationHooks in changelog code. * Get rid of some more ISerializationHooks for enums * And a little more * Apply suggestions from code review Co-authored-by: 0x6273 <0x40@keemail.me> --------- Co-authored-by: 0x6273 <0x40@keemail.me>
This commit is contained in:
committed by
GitHub
parent
d0c174388c
commit
68ce53ae17
@@ -17,6 +17,7 @@ namespace Content.Shared.Examine
|
||||
{
|
||||
public abstract partial class ExamineSystemShared : EntitySystem
|
||||
{
|
||||
[Dependency] private readonly SharedTransformSystem _transform = default!;
|
||||
[Dependency] private readonly SharedContainerSystem _containerSystem = default!;
|
||||
[Dependency] private readonly SharedInteractionSystem _interactionSystem = default!;
|
||||
[Dependency] protected readonly MobStateSystem MobStateSystem = default!;
|
||||
@@ -77,7 +78,7 @@ namespace Content.Shared.Examine
|
||||
if (IsClientSide(examined))
|
||||
return true;
|
||||
|
||||
return !Deleted(examined) && CanExamine(examiner, EntityManager.GetComponent<TransformComponent>(examined).MapPosition,
|
||||
return !Deleted(examined) && CanExamine(examiner, _transform.GetMapCoordinates(examined),
|
||||
entity => entity == examiner || entity == examined, examined);
|
||||
}
|
||||
|
||||
@@ -109,7 +110,7 @@ namespace Content.Shared.Examine
|
||||
return false;
|
||||
|
||||
return InRangeUnOccluded(
|
||||
EntityManager.GetComponent<TransformComponent>(examiner).MapPosition,
|
||||
_transform.GetMapCoordinates(examiner),
|
||||
target,
|
||||
GetExaminerRange(examiner),
|
||||
predicate: predicate,
|
||||
|
||||
Reference in New Issue
Block a user