Skip to content

Commit

Permalink
#2379 Added more debug lines to help fixing MDT import issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Wotuu committed May 16, 2024
1 parent cdad636 commit bdfec1a
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/Service/MDT/Logging/MDTImportStringServiceLogging.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@

class MDTImportStringServiceLogging extends StructuredLogging implements MDTImportStringServiceLoggingInterface
{
public function parseObjectCommentAfterConversionFloorStillOnFacade(array $latLngWithFloor): void
{
$this->warning(__METHOD__, get_defined_vars());
}


public function getDetailsStart(): void
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

interface MDTImportStringServiceLoggingInterface
{
public function parseObjectCommentAfterConversionFloorStillOnFacade(array $latLngWithFloor): void;

public function getDetailsStart(): void;

public function getDetailsEnd(): void;
Expand Down
13 changes: 13 additions & 0 deletions app/Service/MDT/MDTImportStringService.php
Original file line number Diff line number Diff line change
Expand Up @@ -798,6 +798,19 @@ private function parseObjectComment(
);
}

if ($latLng->getFloor()->facade) {
$this->log->parseObjectCommentAfterConversionFloorStillOnFacade($latLng->toArrayWithFloor());

$importStringObjects->getWarnings()->push(
new ImportWarning(
__('logic.mdt.io.import_string.category.object'),
__('logic.mdt.io.import_string.object_out_of_bounds', ['comment' => (string)$details['4']])
)
);

return;
}

$ingameXY = $this->coordinatesService->calculateIngameLocationForMapLocation($latLng);

// Try to see if we can import this comment and apply it to our pulls directly instead
Expand Down
1 change: 1 addition & 0 deletions lang/en_US/logic.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
'pull' => 'Pull %d',
'object' => 'Object %d',
],
'object_out_of_bounds' => 'Unable to place comment: could not place comment ":comment" object is out of bounds.',
'limit_reached_pulls' => 'Unable to import route: more than the max of :limit pulls.',
'limit_reached_brushlines' => 'Unable to import route: more than the max of :limit lines.',
'limit_reached_paths' => 'Unable to import route: more than the max of :limit paths.',
Expand Down

0 comments on commit bdfec1a

Please sign in to comment.