/* called by: entrance ctrl of the object 'track'1 K- t3 D; R. n: C$ p$ k+ Y$ \. g3 e
*/
; @4 d6 \ s& p0 V* U: Zis
0 ~* c6 D8 n; ?1 p; d. { part, GlobalDistObj, assignLObj:object;row,Lan:integer;5 v6 R9 v- e. J2 q8 O; k
do4 ]4 T' \# E: ^* C0 {, J; |6 u
Lan := rootfolder.Internal.Tools.AOLlanguage;5 B* |) @' a' |
if current = @.Destination -- else return6 E3 G% F, y' W9 t
then/ _+ }1 f$ Y/ E5 c; s, `% w% Q) x9 @" n) c
@.Destination := void;
2 \) a3 ]- y, l* [- ` if @.occupied then1 n5 H: K7 p9 {9 y5 r, ^' ~
part := @.cont; i5 L5 Q, o% S; r
@.transpOrder := void;5 F/ ^$ }/ O; q$ V: c7 W
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,! O8 ?" G7 D4 l- {, j; X H3 q
@,root.eventcontroller.simTime);2 \! Z, s' a- `8 l" e! q) d! W
@.HasOrder := false;
1 p6 H6 [6 W9 m5 N1 ` @.DrivingHome := true;' w' m ]" R. [$ p% }' ?& S6 Q
rgManager.tryToStartTransOrder;% e+ @4 |- L9 a0 h
if @.Destination = void
6 ]5 b) m; x! ?5 C* o9 M then -- no transport order for vehicle @
/ u, s" D. p% M @.Destination :=
|1 \4 [. \: O9 l- F rgManager.nearestFreeStation(@,track.~);
7 [" y3 D* Q; h+ X# Q% G9 }1 O newDirection(@);
$ i. q, D" P3 W4 l if @.Destination /= void then
( U( ?8 v# \, R @.Destination.NumReservation :=3 T8 h% B0 X: c7 j- A
@.Destination.NumReservation + 1;
. G' c) ?% Q! V5 U; S- M% a b5 t end;9 @3 q0 B6 A! l f- z4 G- [( u
@.CurrIcon := "drivingHome";! r, }( n' o0 n+ `" P
@.DrivingHome := true;( \9 H$ F6 n( D3 J# f( v' E; O ~
end;6 j% X. X, x! e6 n4 s
else -- the vehicle @ is empty, both vehicle and part are in the same dock station' S( L ^# {8 E% F: O" o2 A
part := @.transpOrder;4 r* E( U" u, f2 F, J0 Y
part.move(@);-- load part* K+ B: L: u- ]0 R( S% c' X
@.CurrIcon := "load";
# G- {* q* [" z2 d GlobalDistObj := part.globDestination;
2 n/ }: x/ J. c8 g' ~" w7 U8 X# t assignLObj := rgmanager.rgAssignL;
5 r4 w: x- C9 Q! A$ h) N! N row := assignLObj.getRowNo(GlobalDistObj);
0 v2 t; z' k) @' C V& p3 {& D9 D if Row = -1 then -- since 700 K1 ~; G% f2 n+ u% E! Y$ \9 {. n
if lan=1 then9 o% o, _" s/ p/ c6 J* M# b
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
+ i8 K# r6 ^6 k( u$ c7 E7 N" F2 x to_str("in der Andockstation: \"",?.~.name,"\""));
+ m* v7 A. \1 M$ E( Y1 d& e$ Q1 u else
7 ~) Y; q* k9 c" T8 G d8 _ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),, j3 k4 h: F/ u' X
to_str("in docking station: \"",?.~.name,"\"")); + c1 z4 ?4 N8 ?) S o y
end;# O: {" ^9 B/ b( ]( i
else& W* z+ m t$ X$ x5 f9 w3 q( O/ T
@.Destination := assignLObj[1,row];8 D3 Y. H6 h; C# n8 q) n
end;
/ p4 z1 ]# g9 V! w1 y) d newDirection(@);
) d+ k5 b! z& h; v @.HasOrder := true;
" F+ X1 t# W- J# D' G end;- V1 O$ d1 F9 p l+ {0 m9 R- f( e
end;% W4 ^" Z; a+ R& @
end; -- of the method. e; G* }# C( I: j! Y% J
|