/* called by: entrance ctrl of the object 'track'
' K3 p! U8 @* F*/
! T1 x& h+ L% i* ?/ ?is) g: J/ N2 W! r3 E/ J7 L* X
part, GlobalDistObj, assignLObj:object;row,Lan:integer;# g2 O" i8 q0 K0 R# r
do
6 M$ C9 u6 N$ M* w" n Lan := rootfolder.Internal.Tools.AOLlanguage;
0 w- {2 O$ m9 Q& m4 c if current = @.Destination -- else return
) F( c- s" @) G& J1 J- A then5 M' T# W4 O9 h/ T/ P& @7 M
@.Destination := void;1 c( R; S& T7 g# s6 [) E5 U6 ^# W' O
if @.occupied then1 y- d: @% F/ g7 M. x; y# G
part := @.cont;
, x; Q' u+ w n8 g @.transpOrder := void;
: J0 ?, P$ m2 ]$ N/ O- x part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
' y0 f7 m E) |% R5 o. m @,root.eventcontroller.simTime);
/ W- y0 V3 y! C' w) ^0 j3 s @.HasOrder := false;4 p5 w. f" o; a. Q2 O. C0 q
@.DrivingHome := true;
\* s9 E1 f4 ]+ g6 e/ w rgManager.tryToStartTransOrder;
( a, ^2 ]7 a D5 o; @ if @.Destination = void
- | `- R% T* y- U. R, }- t then -- no transport order for vehicle @
2 Z1 Y- {7 c% M9 N @.Destination :=
1 V4 M m$ P0 L# F+ p4 d4 W rgManager.nearestFreeStation(@,track.~);
' h8 O& [* u+ O0 T# L: ? newDirection(@);
0 l) Q0 f6 V; S1 ^& W if @.Destination /= void then
3 j7 z/ p2 ?' A5 T; k @.Destination.NumReservation :=
; o P& E1 Q& |1 x @.Destination.NumReservation + 1;9 [$ @) ]: D. ~% m( w7 A" ~
end;. [! u K4 O6 C1 a. O2 r+ B
@.CurrIcon := "drivingHome";6 ^! I4 [0 }* A, T
@.DrivingHome := true;: s& O/ f; q8 A) s
end;1 q; U& X/ ?* P# o. B
else -- the vehicle @ is empty, both vehicle and part are in the same dock station4 k+ q8 L: J8 J
part := @.transpOrder;1 w0 K/ ?0 w# D
part.move(@);-- load part! ?5 K8 Z6 s" z$ L
@.CurrIcon := "load";
% _; U# G% @6 \ C4 Q GlobalDistObj := part.globDestination;" f* I, n$ ?" B8 l3 r
assignLObj := rgmanager.rgAssignL;
* e0 F- F% c9 V. g* f- t. h/ i* x row := assignLObj.getRowNo(GlobalDistObj);
0 e# }* N) G. ~" t0 b0 B if Row = -1 then -- since 70" e9 g o3 l" H2 E
if lan=1 then
$ {' X# N3 x0 b7 q, i. b; N promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),, t6 n( y# \' Z4 |1 Y$ S. @; T
to_str("in der Andockstation: \"",?.~.name,"\""));9 L: `, D( e. t/ ?" _) ^ m
else& W: e( z7 ^) ]: d5 H
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
; t. ]1 j7 V; [2 N6 H to_str("in docking station: \"",?.~.name,"\"")); 3 K* ^) n0 t1 s- M9 G
end;
) p& x0 Q+ G% Z+ k1 K: D8 z else
8 \, B8 m# J8 @( m n& A9 [$ s @.Destination := assignLObj[1,row];
! J) e: T- D, [* a% h6 j j end;
% r. r! Z8 G+ ^& Y6 Z newDirection(@);5 R' r6 {* v# g
@.HasOrder := true;
1 T. ^7 O1 Q( }& u- F' b end;% `& \; n7 C# H& q8 b
end;: c$ n; ^" E' n! ]$ h. O9 G( e
end; -- of the method7 j; I) F Z% K2 u
|