Unverified Commit 55c6f1ab authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

Formation: cubePosition is no longer provided by the backend

parent fb3098d2
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -10,7 +10,7 @@ use parent 'Class::Accessor';
our $VERSION = '0.24';

Travel::Status::DE::DBRIS::Formation::Sector->mk_ro_accessors(
	qw(name start_percent end_percent length_percent start_meters end_meters length_meters cube_meters cube_percent)
	qw(name start_percent end_percent length_percent start_meters end_meters length_meters)
);

sub new {
@@ -26,13 +26,10 @@ sub new {
		start_meters  => $section{start},
		end_meters    => $section{end},
		length_meters => $section{end} - $section{start},
		cube_meters   => $section{cubePosition},
		start_percent => ( $section{start} - $platform{start} )
		  * 100 / $platform_length,
		end_percent => ( $section{end} - $platform{start} )
		  * 100 / $platform_length,
		cube_percent => ( $section{cubePosition} - $platform{start} )
		  * 100 / $platform_length,
	};

	$ref->{length_percent} = $ref->{end_percent} - $ref->{start_percent};