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
@@ -64,7 +64,8 @@ namespace Content.Client.Tabletop
|
||||
return;
|
||||
|
||||
// If there is no player entity, return
|
||||
if (_playerManager.LocalPlayer is not { ControlledEntity: { } playerEntity }) return;
|
||||
if (_playerManager.LocalEntity is not { } playerEntity)
|
||||
return;
|
||||
|
||||
if (!CanSeeTable(playerEntity, _table))
|
||||
{
|
||||
@@ -85,7 +86,7 @@ namespace Content.Client.Tabletop
|
||||
// If the dragged entity has another dragging player, drop the item
|
||||
// This should happen if the local player is dragging an item, and another player grabs it out of their hand
|
||||
if (draggableComponent.DraggingPlayer != null &&
|
||||
draggableComponent.DraggingPlayer != _playerManager.LocalPlayer?.Session.UserId)
|
||||
draggableComponent.DraggingPlayer != _playerManager.LocalSession!.UserId)
|
||||
{
|
||||
StopDragging(false);
|
||||
return;
|
||||
@@ -186,7 +187,7 @@ namespace Content.Client.Tabletop
|
||||
private bool OnMouseDown(in PointerInputCmdArgs args)
|
||||
{
|
||||
// Return if no player entity
|
||||
if (_playerManager.LocalPlayer is not {ControlledEntity: { } playerEntity})
|
||||
if (_playerManager.LocalEntity is not { } playerEntity)
|
||||
return false;
|
||||
|
||||
var entity = args.EntityUid;
|
||||
|
||||
Reference in New Issue
Block a user