/* called by: entrance ctrl of the object 'track'+ i( z2 F3 x5 P1 y! d
*/& i" t* ^$ X7 e4 s0 @
is; r8 _/ V+ c4 g! n) z
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
/ O. h! z1 S6 odo
$ K7 I' b) E$ M/ c# g: m! H Lan := rootfolder.Internal.Tools.AOLlanguage;# e5 r5 h+ r2 J. Z4 g0 R
if current = @.Destination -- else return
M. V4 s8 T4 q& F8 [) a then
! q, U: J3 A2 F3 }# O @.Destination := void;1 X% w# E5 Y: Z; e; G0 I. x3 A
if @.occupied then; G; S% e \6 I0 V3 {; u
part := @.cont;# V6 e( C4 V% b
@.transpOrder := void;7 l' Y2 j9 l/ L3 z( p9 m! P
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
% \0 A. X( L: q3 A& e @,root.eventcontroller.simTime);' Z2 U# V% A* ?4 q! D Y6 S5 p# z
@.HasOrder := false;: b2 g6 B, b8 s- u! A) q- J
@.DrivingHome := true;8 }& H) x$ h* G. U' F; z
rgManager.tryToStartTransOrder;% {, i# n8 x( V) Z, ]# d/ w6 G+ }
if @.Destination = void
2 v* p# c6 Q$ X8 a' Y: W2 d) \ then -- no transport order for vehicle @
3 H6 U3 o- ?0 M, R- r @.Destination :=( ]9 G. t$ ]& R; z6 l6 X1 j
rgManager.nearestFreeStation(@,track.~);
- U, M, {9 M: b$ | newDirection(@); 9 E g$ ]# Y& q: b6 T3 d3 A
if @.Destination /= void then3 \, f5 A3 S# M6 y- E- Q
@.Destination.NumReservation :=
0 T; M1 M& W, V h+ s7 O! ]) W$ ^" y @.Destination.NumReservation + 1;
* C5 C$ e4 `* h2 ^; ?3 `2 v" {* d end;
/ s* H( h+ ^& J& m& q @.CurrIcon := "drivingHome";
; y! a. v7 z. \, M# j @.DrivingHome := true;
" _; B1 l# m: ` end;
3 N- w% h0 Y* a# d: h else -- the vehicle @ is empty, both vehicle and part are in the same dock station
+ U" d. e2 F7 | part := @.transpOrder;
; e7 V+ Z. P* @ part.move(@);-- load part' C( V- D, t9 l! `5 ^4 w; v# G
@.CurrIcon := "load";
4 ?$ H& O4 b0 Q( L% C GlobalDistObj := part.globDestination;) e: e0 z7 d1 G( i: r0 ~: H
assignLObj := rgmanager.rgAssignL;
4 \! \) @' N( J6 S row := assignLObj.getRowNo(GlobalDistObj);# N5 c* ~5 V x$ r" \
if Row = -1 then -- since 70; o: F! {2 k% y
if lan=1 then
P$ ~# N0 g b/ ] promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),/ j7 N$ \( w' A% e# F8 I
to_str("in der Andockstation: \"",?.~.name,"\""));
7 K" j3 K" D$ i. ^# D8 x; H. e else
% Y6 w" C3 n3 ? promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),0 t, Z6 \% f8 u; o# m3 _& s. S& N2 _
to_str("in docking station: \"",?.~.name,"\"")); 8 R0 @, d6 e; e* S, w* Z) O! I d
end;
2 B1 \: v( [4 k6 ]0 J else4 U% x9 [. s/ N2 ]
@.Destination := assignLObj[1,row];. I" `( }) s3 v$ G6 r) v" W
end;
& x& {& z4 \& d2 E6 H+ V newDirection(@);! R& D* p0 L4 W
@.HasOrder := true;
. L* {9 p2 S( n end;$ `; q$ Q1 b ?! ]" |% S! w y
end;1 x9 z* X ?$ Y6 G- r
end; -- of the method
1 { l% n* T: a: l |