Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Autodocking 2/AntennaHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public void SendPositionUpdateRequest(long target_platform)

public bool blockIsOnMyGrid(IMyTerminalBlock block)
{
return block.CubeGrid.EntityId == parent_program.Me.CubeGrid.EntityId;
return block.IsSameConstructAs(parent_program.Me);
}

public void HandleMessage()
Expand Down
2 changes: 1 addition & 1 deletion Autodocking 2/IOHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public void FindOutputBlocks()

public bool blockIsOnMyGrid(IMyTerminalBlock block)
{
return block.CubeGrid.EntityId == parent_program.Me.CubeGrid.EntityId;
return block.IsSameConstructAs(parent_program.Me);
}

/// <summary>
Expand Down
4 changes: 2 additions & 2 deletions Autodocking 2/ShipSystemsAnalyzer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ public void GatherBasicData()
/// <returns>bool</returns>
public bool blockIsOnMyGrid(IMyTerminalBlock block)
{
return block.CubeGrid.EntityId == parent_program.Me.CubeGrid.EntityId;
return block.IsSameConstructAs(parent_program.Me);
}

public static double GetRadiusOfConnector(IMyShipConnector con)
Expand Down Expand Up @@ -398,7 +398,7 @@ public IMyShipConnector FindMyConnectedConnector()
var found_connected_connector = false;
var found_connectable_connector = false;
foreach (var connector in Connectors)
if ((cockpit.CubeGrid.ToString() == connector.CubeGrid.ToString() &&
if ((cockpit.IsSameConstructAs(connector) &&
!connector.CustomName.ToLower().Contains("[recall dock]") && !parent_program.allow_connector_on_seperate_grid) || (parent_program.allow_connector_on_seperate_grid && connector.CustomName.ToLower().Contains("[dock]")))
{
if (connector.Status == MyShipConnectorStatus.Connected)
Expand Down