/* called by: entrance ctrl of the object 'track'
4 k' K8 m4 \4 [& M# J8 ^*/; ?! ~3 m: H2 }3 k$ b
is$ C. Q9 T. E. U) w
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
, p7 a# O0 \' P' a& E2 P0 Xdo
' @" `3 ]1 g* } Lan := rootfolder.Internal.Tools.AOLlanguage;) ~; }" H L( G0 f5 ? @1 S
if current = @.Destination -- else return, O! Z) }, t6 s# i: {2 S- b. N
then
U$ r! y9 n& B, m D @.Destination := void;5 S" u% t2 O" F$ J( z
if @.occupied then
8 R' `7 p3 B( g6 r$ _3 |9 R part := @.cont;
+ K6 Q( _( r5 Q7 d9 t# Z @.transpOrder := void;! C5 o! Z0 y" z5 [5 p$ ]9 p/ ?
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
( P% G q2 r9 ]! H/ A' P, j J @,root.eventcontroller.simTime);
- U8 p$ V; ?# t' M @.HasOrder := false;
7 p" b2 j! @8 p' n @.DrivingHome := true;% f9 C3 g( T8 a& [0 \, ]; r
rgManager.tryToStartTransOrder;
, c0 ~& C5 y/ b7 `2 Z V6 N if @.Destination = void/ l8 M9 f5 | i) n! S1 t
then -- no transport order for vehicle @& \0 t& J3 ?. g! S. T& `6 ?$ J' ~
@.Destination :=
5 u* D- S; \$ @4 f5 w- b; D( q% q rgManager.nearestFreeStation(@,track.~);
! g3 x8 _1 Y' Z+ ^0 K newDirection(@);
" I5 V5 l: t( n) W if @.Destination /= void then ~# V9 j* _: o# l" B
@.Destination.NumReservation :=
( d# T, L4 A3 h+ N5 A# ^' m @.Destination.NumReservation + 1;
, l: W! b" {7 V1 N: z end;" Z3 S: Z% u9 y) x9 C
@.CurrIcon := "drivingHome";2 C5 q+ f+ |* i* I* `8 ` R- y8 g
@.DrivingHome := true;5 F, P$ S( Q$ W; h0 L- ^
end;: E$ g( |7 X" Z8 w
else -- the vehicle @ is empty, both vehicle and part are in the same dock station. b' _: s. v+ E# D, I
part := @.transpOrder;2 @$ }# ^5 a& i/ K# k. h
part.move(@);-- load part* q% n- ^0 k, w- ~# Q
@.CurrIcon := "load";
% _" z: E$ c: z7 r1 U GlobalDistObj := part.globDestination;0 L! e y4 X* W! P0 ?+ C8 _& D
assignLObj := rgmanager.rgAssignL;
. @ [+ J' ?, W) U3 L row := assignLObj.getRowNo(GlobalDistObj);) O/ B- {$ S# d" F
if Row = -1 then -- since 70
- t2 s% j( @( p+ j* J9 y2 |% G8 N if lan=1 then- y7 @' J8 h/ o) ^
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),+ \$ b+ P1 z0 z0 L
to_str("in der Andockstation: \"",?.~.name,"\""));
1 p* P, Z# g3 f( U1 n( | else
/ b: l% S, X* n( p/ O/ b promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),! J0 [0 ]2 P3 }- Z! f# t/ ? Z. a
to_str("in docking station: \"",?.~.name,"\"")); 4 Q! x7 ]& y# X( B, k. ]* o
end;
) j* C0 R' r. F" @( K+ g4 W8 _ else
& t2 T/ s! O& Q' w* q @.Destination := assignLObj[1,row];
9 D' L. t, a5 V" O2 L$ J end; 5 e8 ^% x: P6 A" d/ y7 C
newDirection(@);
J6 y& r! E2 V& `/ Q4 @ @.HasOrder := true;4 K! r, H' u" x1 Q
end;" b) z) a" v" I) c
end;
) y4 r" P4 r+ w% _end; -- of the method
& u7 @( j; w: { W* X& r |