/* called by: entrance ctrl of the object 'track'
9 J- c1 Y0 P0 ?# {*/
! }: m; E* L/ A+ u: H: jis. d. {: q8 v: j( F# {! |5 q: ]8 c
part, GlobalDistObj, assignLObj:object;row,Lan:integer;% P5 G6 ~, L& A8 P* A# ]( u
do( N9 M: b+ T* b J
Lan := rootfolder.Internal.Tools.AOLlanguage;
% W6 [ @% o0 r! b1 o2 S7 x- v if current = @.Destination -- else return# b/ O3 R& J8 [: ^: o/ t- ^
then, D% j! G$ d z J% u+ s
@.Destination := void;
/ W2 Y& D; t. J* _5 i3 P if @.occupied then
q c, o: f0 \3 x. e part := @.cont;
. v3 ]. b: ?* \! M @.transpOrder := void;
& f7 w8 ]) {" N& U" U% g part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,' m- y- W) t" I
@,root.eventcontroller.simTime);6 d0 n6 z8 E6 ]) i7 B
@.HasOrder := false;
( l4 O) P7 A* f1 A& D1 n) E @.DrivingHome := true;8 j) L2 r& ]# p
rgManager.tryToStartTransOrder;' g/ d4 q/ e9 q( v
if @.Destination = void
$ y }+ g/ V/ r" }! l% J then -- no transport order for vehicle @ M5 G* l/ G$ W
@.Destination :=
" Z) r5 B9 j' |# R$ D' H rgManager.nearestFreeStation(@,track.~);
* J. I3 a$ B9 y7 V' W newDirection(@); # A; Z. K% a" l* Y" X
if @.Destination /= void then
9 s( {8 c3 X: |9 } @.Destination.NumReservation :=
$ I7 R. p& A0 R% [' Q7 g. ?$ `4 k @.Destination.NumReservation + 1;/ \ m' J& h ^3 E& r" m+ Y, F
end;
% `$ |! I2 W& S: C4 |: r, c& C8 q0 v' b @.CurrIcon := "drivingHome";) t7 K( G0 W! w
@.DrivingHome := true;; g: W9 p" r# b4 `$ f/ _
end;1 [7 h' A9 _9 w+ |5 @/ k
else -- the vehicle @ is empty, both vehicle and part are in the same dock station$ P" p8 s0 j5 u F
part := @.transpOrder;
% q# u6 g8 ?) n7 H7 | part.move(@);-- load part, e. O9 M+ e& r5 t4 d& w; Y
@.CurrIcon := "load";
O9 {. e( B1 D2 W GlobalDistObj := part.globDestination;' D6 S5 ^( H4 ]
assignLObj := rgmanager.rgAssignL;
5 C: d; K8 C, m& {5 z8 E6 ] row := assignLObj.getRowNo(GlobalDistObj);7 ^3 h6 z0 f/ `4 w' @' Z8 _: h
if Row = -1 then -- since 70
. ?0 C$ w* W. ^, N if lan=1 then/ p+ w8 |/ c$ ]! a! ^4 \8 ^* X
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
" [) U: h) b1 {: U1 m% ~# j! } to_str("in der Andockstation: \"",?.~.name,"\""));
% a: ]1 i# w& `- f ^9 ] else& H. ?. h& q1 \
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),$ ?5 v; e/ _+ X/ L5 o
to_str("in docking station: \"",?.~.name,"\"")); 2 `5 f& [$ G9 b+ K
end;
$ b# ^5 Q; V; K4 u$ l# \ else
. J4 b6 H: Y3 a @.Destination := assignLObj[1,row];5 z' }0 C2 c8 H5 w" S& i3 G
end; 6 z, u, ~: s, T- E( s" S0 ]( ~8 {
newDirection(@);
- V5 A1 w) U. I% n' S @.HasOrder := true;+ G' c0 m0 I# Q& M
end;
9 g1 m* r0 L0 U& s/ p! t end;
& [7 ^( ^4 B! p8 e" q/ Oend; -- of the method
! [$ {% L% y. x' i3 G |