/* called by: entrance ctrl of the object 'track'
' E- i3 b) | ~9 C6 D/ q% [3 `*/
* U# B8 ?9 \! M4 e2 X; ~! Zis
) R) {) j& z* g u/ E! \" `0 V9 @0 u part, GlobalDistObj, assignLObj:object;row,Lan:integer;
$ U2 a3 _. q3 A8 t: ~do
6 N+ {: v/ _# U7 x" e2 l" x" P Lan := rootfolder.Internal.Tools.AOLlanguage;+ D% w2 a2 t; M5 U. H$ j0 t
if current = @.Destination -- else return* W2 X, j3 j) ~4 s
then
- v+ [7 J6 v4 G0 X: ~ ~, ] @.Destination := void;
' ^# B+ ?& U( h' d' {6 z if @.occupied then
+ V) P5 ^* O$ o |+ h1 T9 X part := @.cont;
1 P6 S- O. K3 k/ |+ P G @.transpOrder := void;
7 J$ Z$ ]6 A# D6 h" @ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
$ Y- r/ ^% z) v' C+ j* {( x @,root.eventcontroller.simTime);
0 z4 w) ~4 ?$ {; Q; W+ B- u @.HasOrder := false;
5 N+ X/ x# L# z0 a: z @.DrivingHome := true;
1 x2 \ w) y* y0 R$ w, I rgManager.tryToStartTransOrder;! `( F& r0 M( }6 j3 A) d3 X
if @.Destination = void1 X& C5 d* c e6 l9 }3 o7 k/ c* }
then -- no transport order for vehicle @
! [" U/ G3 k' B9 r; O @.Destination :=; F0 N/ O- O& W/ l* D
rgManager.nearestFreeStation(@,track.~);8 K" f, @8 l2 u# v2 K5 T7 ]+ K% ?
newDirection(@); + N$ h4 `; X8 p/ n) s" g- P6 t
if @.Destination /= void then3 o; _" G) }7 j% P8 V, i. p( `3 r* s
@.Destination.NumReservation :=
% b9 s2 v" O$ _ @.Destination.NumReservation + 1;; ?, x9 B: j% Q( E
end;
5 U$ I! T- t9 O. p- q1 |0 {0 {. X @.CurrIcon := "drivingHome";2 N" F# P& X8 C+ `/ _: K! \
@.DrivingHome := true;5 P" Q& ~; J9 b$ O7 n& h* v8 F; {0 G
end;
6 s% N$ w, F" b: G* t* Y5 X else -- the vehicle @ is empty, both vehicle and part are in the same dock station3 z7 _% `& e) {: L* L
part := @.transpOrder;7 n: g$ |' _9 \+ o/ D X
part.move(@);-- load part
$ m2 c: k! y9 o3 B# d: C @.CurrIcon := "load";; Y4 I8 P" u# `- S$ n
GlobalDistObj := part.globDestination;
8 O* E/ z- h/ ~/ M, c. Y9 K assignLObj := rgmanager.rgAssignL;
( {0 e( N3 ^% m1 F row := assignLObj.getRowNo(GlobalDistObj);
0 |% K3 F% i$ _3 Z# ]9 k2 B if Row = -1 then -- since 70
6 Q: D! q& f) u& B6 ` Y2 ~; q if lan=1 then
, Z8 C4 o8 G) N9 O9 O9 o' B promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),% `1 S) T/ j9 M% d- g+ O
to_str("in der Andockstation: \"",?.~.name,"\""));
4 P' y; _. V' r; q* M& j else
3 u5 a! C- y2 | promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
: j/ g" _* K( ]! S2 a9 O0 A8 d to_str("in docking station: \"",?.~.name,"\""));
% W( X# r9 I+ ?. g$ { end;2 b* U$ N( ~) w2 k n, x! v
else7 ]$ E! C# F6 c" X
@.Destination := assignLObj[1,row];! x3 j9 J( ]1 e' ^
end; 9 }6 ^3 v' B) }$ Z
newDirection(@);: B' R9 a b& A$ B
@.HasOrder := true;6 e/ s' L, E, X7 s& g& d
end;, @% t) y% d* P. g, E
end;; \2 K8 c$ `9 y1 ?" _' V6 o
end; -- of the method
5 o8 m0 ]& a2 Q% E' F2 X |