/* called by: entrance ctrl of the object 'track'
$ F! j' K, Z! s0 \: \; i8 A*/
. ^& l! _( z) Z# b3 wis0 p$ j: E% \- W' E8 d8 E7 [
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
/ P% ]: ~4 j% t% @do z) O$ X( z( Z& p9 X4 Y5 Z
Lan := rootfolder.Internal.Tools.AOLlanguage;
/ F* h- K0 P$ `& h" X if current = @.Destination -- else return
* x/ @7 \+ a, L3 E* J% g then: G) T+ n: f2 C$ ]" N
@.Destination := void;% A7 O4 D: k* M6 N3 \% e
if @.occupied then t, p* B3 q& W3 y6 K! V$ j1 z1 h- |
part := @.cont;
/ B8 Z! X9 G) A( A2 t; ?# ^ @.transpOrder := void;
% v1 o- J0 \! z8 u' H6 u part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,$ D9 \7 l- u. r1 F. e& v3 Z
@,root.eventcontroller.simTime);
9 g0 v2 j, [# [$ F, _: y7 Z @.HasOrder := false;' C6 R, z9 k/ g; V% {
@.DrivingHome := true;( Z4 d6 T) c% k2 U# o+ x' j, u4 F
rgManager.tryToStartTransOrder;
% M8 c* m% K: _+ t3 c if @.Destination = void2 Z. g+ X8 }, ?4 q# N
then -- no transport order for vehicle @! D( `# [/ @' q4 e
@.Destination :=
* N" A& y9 t# O. s7 W3 ` rgManager.nearestFreeStation(@,track.~);
( M4 P, ]% I( @7 v+ ?% x' { newDirection(@);
) Y) c! E/ K/ R if @.Destination /= void then! ^" j9 s) ], }2 X. I% c
@.Destination.NumReservation :=
* U1 n7 {8 C+ n! @ @.Destination.NumReservation + 1;
; b% [5 |+ x0 I: g end;
5 m; W3 M9 h/ B% U7 I6 v/ W: o( c @.CurrIcon := "drivingHome";6 m( b9 M4 a! N/ W; t+ m
@.DrivingHome := true;
# M8 v! d- n- M, |3 @2 v end; a& D: `- f8 g5 e: P
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
; l9 U; Q* k$ M9 g9 ^ part := @.transpOrder;% ` D( w k, G' d& B* u
part.move(@);-- load part
: ]% C9 \8 K6 p: l8 J @.CurrIcon := "load";9 p0 W; A+ x+ m1 e0 ~
GlobalDistObj := part.globDestination;
9 Q t) b* u+ t, }. @' H Q2 Y, L* a2 { assignLObj := rgmanager.rgAssignL;
/ ?! T, R ~) N" }" x( ?! d5 D row := assignLObj.getRowNo(GlobalDistObj);! ]9 \& M: Z' n3 f
if Row = -1 then -- since 70$ w; z$ c! m$ l6 B$ t: z. I
if lan=1 then
/ q: E8 f% K- A% \; |5 q9 ` promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
8 Y3 G2 ?! `0 X0 g to_str("in der Andockstation: \"",?.~.name,"\""));
; k5 i3 d0 f1 V1 ~ else
, z* R( P" R9 D3 ~* K! [8 `5 U V promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
p3 o: ?% B }9 Z% d9 A to_str("in docking station: \"",?.~.name,"\"")); 1 Y5 \ Y \* N! {
end;
: }$ s) i# B! S# B else" l8 b( L" h+ q1 P
@.Destination := assignLObj[1,row];
2 C9 a+ D J7 C( Y end;
) P; i6 h- F2 P' r+ [ newDirection(@);
5 c; U' R0 t( @( _ @.HasOrder := true;
) U( w. ]) h# U0 \/ S1 C/ j end;& K, K$ N3 \- C* A/ Q9 i
end;8 V) O: G4 v4 u9 h
end; -- of the method
- G; a6 Q1 c3 s- h! f0 R. q |