/* called by: entrance ctrl of the object 'track'
9 P. u) P7 z+ W; x- R*/) g" U& A3 I/ E; B/ C
is9 |! W* ?7 k3 @( m
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
/ a9 T$ k5 y& E7 W. k, N: p9 @do, r+ v' u. y) V
Lan := rootfolder.Internal.Tools.AOLlanguage;5 ?: k, S7 A! y R# w5 s
if current = @.Destination -- else return" f( S0 f, j% e4 k4 {; X: e" ]
then) `3 K1 g* d9 V4 Z
@.Destination := void;2 O8 {6 y* C' U4 B1 H
if @.occupied then
% k8 B6 \/ G( V( X+ L( ] part := @.cont;
% o) V) V+ C- S7 ~ @.transpOrder := void;
3 l0 `7 [! i, k0 l part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
8 L9 c( U0 ?$ d: ^, n1 \% R/ H @,root.eventcontroller.simTime);6 R" A! Z, r9 G+ B) i* \
@.HasOrder := false;% m( n2 q I( i5 V6 C
@.DrivingHome := true;
# D' ]/ J5 y/ H U% {# k rgManager.tryToStartTransOrder;# v, T' U9 {+ i5 O3 G
if @.Destination = void
2 F4 `7 F2 [$ C6 u. L8 ? then -- no transport order for vehicle @
( s* i+ {$ x) a; w1 o' j% i @.Destination :=
! ?1 K" S# J' v, A+ h; B) [8 v' O. ? rgManager.nearestFreeStation(@,track.~);
: }1 g( U( l% k9 m* C- v8 x4 ]2 K newDirection(@);
; l- c- j/ s8 T! q' N$ ^8 | if @.Destination /= void then
0 p- r9 v! n& s1 L @.Destination.NumReservation :=
) x& G" k# x) J @.Destination.NumReservation + 1;' H0 {6 k/ V0 v0 X% W1 _8 Z5 B' j
end;) y7 z% ] y3 u: v* }
@.CurrIcon := "drivingHome";
; @4 p1 K. D' U4 y0 | ?; p* V( I4 Z @.DrivingHome := true;7 H: ~4 M O# ], L, }7 b5 [
end;6 j; ^( i9 A6 N) N/ g
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
/ a! G) }$ n1 ?1 I' W part := @.transpOrder;
4 S2 \( f: C% B part.move(@);-- load part, `$ e3 G. a2 q: N) L- G
@.CurrIcon := "load";/ P1 n6 k- _9 z
GlobalDistObj := part.globDestination;
) u+ h d5 v' F3 ~% p/ n assignLObj := rgmanager.rgAssignL;
8 Q9 i y+ c8 M+ W4 ~ row := assignLObj.getRowNo(GlobalDistObj);% b# Y) o/ r( b) i
if Row = -1 then -- since 70
7 ~/ M a* E" H; u9 q if lan=1 then* W, q0 Z1 l4 |8 B
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),5 e: W" K; }1 b! K8 k
to_str("in der Andockstation: \"",?.~.name,"\""));
3 W. e: z. _2 A% C else
% s6 T" P/ J" c$ F& | promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
( K& P9 K: q" u& e+ e! h4 n! h* G8 ` to_str("in docking station: \"",?.~.name,"\"")); 5 @ v; O8 r9 Z, |7 ~
end;
& h: [# P$ o u n& X% h0 X ~ else
1 g5 C5 N1 [5 k7 ~: @" i, M# y @.Destination := assignLObj[1,row];, M* F8 I$ n# e8 H( v' W; G
end; " P9 I: o+ O9 f9 y. L
newDirection(@);* G- u2 E. n2 r7 \- U/ S
@.HasOrder := true;
; k( |1 D& `% O3 ` end;
! [6 U5 u/ S7 |8 t( P, |% |/ T end;, N8 R P! s$ a+ |7 b% q7 _$ G3 ~
end; -- of the method, @% R7 {% d& h9 u# e$ U& E. ?
|