/* called by: entrance ctrl of the object 'track'" C$ o* j% p5 o- A ]6 r
*/
! ]- u N: n* g% a& y) ris) P! ~: R6 x$ P7 k% B" _3 k5 S% O
part, GlobalDistObj, assignLObj:object;row,Lan:integer;: Z9 o# _/ F3 J% T+ j/ o$ O
do
$ f3 |( @' i/ s# b+ ] Lan := rootfolder.Internal.Tools.AOLlanguage;% v7 z8 v/ x+ p/ E
if current = @.Destination -- else return X$ m9 X8 t! ~$ Q
then
" s5 o, {- I7 x" s' a( S) \ @.Destination := void;" E4 N' F. E5 L0 u# G) i% T
if @.occupied then/ ^6 {! l/ R3 q" G- T$ m
part := @.cont;
. O. n. j9 o6 z. f7 o @.transpOrder := void;1 n6 f( t7 v+ e. @5 c
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,8 F* h) I2 z/ w2 m
@,root.eventcontroller.simTime);- c2 L) B1 e* ?9 l/ r/ V
@.HasOrder := false;! j9 a6 t s2 c" m( b& r' m
@.DrivingHome := true;
3 Y/ Z$ f# r) |; Z$ F, @& n rgManager.tryToStartTransOrder;
; b- E+ w$ X( U6 _& ^: Y if @.Destination = void- h4 P4 }- i1 A, [1 n
then -- no transport order for vehicle @
O' y& D( Y3 L3 z2 N# X0 x9 M% X @.Destination :=
5 E2 `4 s# f+ L7 _" ?' V rgManager.nearestFreeStation(@,track.~);
. P# e. b, b. P' C. y% O7 C newDirection(@);
$ W( S% ]! I& d0 b if @.Destination /= void then, B1 p) E; g7 ]' x3 I
@.Destination.NumReservation :=; B) V' v# A, y( ?. h
@.Destination.NumReservation + 1;
! x& ~( T, x. R8 u* p8 i; k$ d8 w end;( | W! G+ x1 s
@.CurrIcon := "drivingHome";' f% \' N) s& q, g7 W
@.DrivingHome := true;( k* C+ F9 c! J7 X% _% |
end;
% n6 X9 p/ Y1 w" f- Y' H9 p$ `1 G6 Z! Q else -- the vehicle @ is empty, both vehicle and part are in the same dock station6 k% I0 `1 W6 ]; J# G
part := @.transpOrder;
) t9 j M# l* g7 \9 \$ U part.move(@);-- load part
) Y# m' I1 p r7 S0 c! G2 j1 P @.CurrIcon := "load";
9 u0 R/ h3 V: G# w1 a7 [ GlobalDistObj := part.globDestination;% W: {. W9 w- s4 l# r
assignLObj := rgmanager.rgAssignL;
3 e: I4 Y! [+ w row := assignLObj.getRowNo(GlobalDistObj);
: s4 Q7 I) r$ P8 Q if Row = -1 then -- since 70* q1 ?8 E; Q u( U, T' ?8 _
if lan=1 then7 x, A6 X9 m/ c( c' j5 k: ]
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),$ a% J' \- E) j5 c
to_str("in der Andockstation: \"",?.~.name,"\""));# V; S- X5 }/ ?
else
0 R* [, l- x% w# A" G/ R promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),6 P0 a5 k- N F6 ~* P# I" E
to_str("in docking station: \"",?.~.name,"\""));
3 G/ A' |, ]3 I/ I- y. @+ Z end;; @* C1 J3 D b* M4 j7 l0 F
else
$ F: b0 g" u6 S4 y4 ? @.Destination := assignLObj[1,row];5 j$ o1 `) S) O& d- [6 D. j
end; 8 r9 o8 }7 G; ~1 A9 }# y
newDirection(@);
6 n' t1 `. {' Y$ Z" s" T @.HasOrder := true;8 h0 [# l0 G6 b4 g" I: q; F: ^8 c' H2 e
end;
7 @, A `2 x4 n F9 R: \ end;
5 h7 W% _* p8 ]6 k5 F2 F( E1 N- v+ {end; -- of the method
7 @/ E. z$ H. i |