Unverified Commit 22a93458 authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

Journey->sanity_check: adjust messages;

parent d0c0c2bc
Loading
Loading
Loading
Loading
+8 −7
Original line number Diff line number Diff line
@@ -1091,14 +1091,14 @@ sub sanity_check {
	if ( defined $journey->{sched_duration}
		and $journey->{sched_duration} <= 0 )
	{
		return
'Die geplante Dauer dieser Fahrt ist ≤ 0. Teleportation und Zeitreisen werden aktuell nicht unterstützt.';
		return 'Die geplante Dauer dieser Fahrt ist ≤ 0.'
		  . ' Teleportation und Zeitreisen werden in diesem Universum nicht unterstützt.';
	}
	if ( defined $journey->{rt_duration}
		and $journey->{rt_duration} <= 0 )
	{
		return
'Die Dauer dieser Fahrt ist ≤ 0. Teleportation und Zeitreisen werden aktuell nicht unterstützt.';
		return 'Die Dauer dieser Fahrt ist ≤ 0.'
		  . ' Teleportation und Zeitreisen werden in diesem Universum nicht unterstützt.';
	}
	if (    $journey->{sched_duration}
		and $journey->{sched_duration} > 60 * 60 * 24 )
@@ -1111,12 +1111,13 @@ sub sanity_check {
		return 'Die Fahrt ist länger als 24 Stunden.';
	}
	if ( $journey->{kmh_route} > 500 or $journey->{kmh_beeline} > 500 ) {
		return 'Fahrten mit über 500 km/h? Schön wär\'s.';
		return 'Die berechnete Geschwindigkeit beträgt über 500 km/h.'
		  . ' Das wirkt unrealistisch.';
	}
	if ( $journey->{route} and @{ $journey->{route} } > 199 ) {
		my $stop_count = @{ $journey->{route} };
		return
"Die Fahrt hat $stop_count Unterwegshalte. Also ich weiß ja nicht so recht.";
		return "Die Fahrt hat $stop_count Unterwegshalte. "
		  . ' Stimmt das wirklich?';
	}
	if ( $journey->{edited} & 0x0010 and not $lax ) {
		my @unknown_stations