/* called by: entrance ctrl of the object 'track'- U) X! W3 M- S
*/5 @4 r) n$ i, b6 {" ^
is
3 d3 r5 r* I) q2 b9 J8 k part, GlobalDistObj, assignLObj:object;row,Lan:integer;
$ d' _8 i* w! H) n0 }) edo" } ~' I8 o6 X# A( L
Lan := rootfolder.Internal.Tools.AOLlanguage;
+ W% g2 \; k# } if current = @.Destination -- else return. u6 C& W7 x4 K* M- ^! f
then
9 E9 N7 H& v3 Q+ i @.Destination := void;) [+ Z. t0 Z* q
if @.occupied then8 g6 A. l1 a$ S. k4 a- O% Z
part := @.cont;' B r4 N# Q; q0 G2 }
@.transpOrder := void;0 a; ]! F2 d% U' J
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
! W7 A1 L/ j$ V1 r" l @,root.eventcontroller.simTime);1 Y/ w- {) l. y, K: U7 p
@.HasOrder := false;$ a. y& C+ i/ m+ l. V
@.DrivingHome := true;
2 a) f# o- A0 A6 G- G% m rgManager.tryToStartTransOrder;
1 b' U5 R8 t* t# ` if @.Destination = void9 p/ q9 V, h: a8 S6 ^1 C7 O
then -- no transport order for vehicle @
: l3 U9 k/ ?9 P* z- } @.Destination :=
" L- P M, g0 Y rgManager.nearestFreeStation(@,track.~);5 @! l9 W. |8 r1 C! s
newDirection(@);
7 E% g& N6 U" K6 f8 A3 X if @.Destination /= void then
+ h8 ~1 F( R3 v& G @.Destination.NumReservation :=3 T: Z" V% V! H4 N' `9 w9 r4 \: J
@.Destination.NumReservation + 1;
/ L2 ]- Y4 H; Q) ?0 C- t end;& i2 z8 {& n/ U1 L) p
@.CurrIcon := "drivingHome";
* W4 E- r+ Z. S) o! g% ^( E5 P, x5 q @.DrivingHome := true; }' R. ~; l6 Q6 Y; D: G
end;1 _1 D! q! V' q d+ ^2 f) { W
else -- the vehicle @ is empty, both vehicle and part are in the same dock station# E. @7 K! K" |5 _) X
part := @.transpOrder;
* @ }' Z3 G x z9 h# h8 W part.move(@);-- load part
: @# l4 I/ r/ [% x. L' Z @.CurrIcon := "load";
2 c. i; t4 i! X' b2 y. X2 n2 X1 k. O e GlobalDistObj := part.globDestination;( |5 n- P; c% {5 Y$ [) \+ p
assignLObj := rgmanager.rgAssignL;
9 W. b( J) Z# a6 t- Y( s row := assignLObj.getRowNo(GlobalDistObj);7 B) w7 \- Y; a0 k! [" g1 g
if Row = -1 then -- since 702 d* v! a5 a. O! W, o( H p
if lan=1 then0 }; l# b+ Z: \* ~
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
* J; r! k; H$ n2 `9 c. c+ T to_str("in der Andockstation: \"",?.~.name,"\""));. z6 K$ p2 F/ h4 P! Z6 N
else$ [ Q6 ?0 u1 ?: P; w* e0 F
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""), `. [* c5 E7 T3 o: E) T
to_str("in docking station: \"",?.~.name,"\"")); 2 b: b8 C/ j$ @! v1 s
end;# n2 T' ]0 w0 z7 }) Y S3 M& W+ \
else4 z' ~* L+ O+ Q9 \! {1 V
@.Destination := assignLObj[1,row];( h* d7 C# ^1 }4 e! ^; P
end;
$ i/ V2 [, i) ^1 z4 s2 x9 m; `* H newDirection(@);6 @3 {: {+ _' g7 ?# p! F) r: b, Y9 v" Q
@.HasOrder := true;
0 u6 L: x1 [. h4 E& | end;4 P% p3 f) K0 L0 }
end;
: a; @ v; c- Y# |4 [/ Uend; -- of the method! U s9 d0 z1 X
|