/* called by: entrance ctrl of the object 'track'
$ Y( Y0 L* }# [# k0 H: j5 @ C*/
% ^5 Q" b1 y. m( P5 ~$ _/ m: dis1 ~0 ]( a, X# g( ^: P, m! w w
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
/ Q I6 }4 Y- i7 Ndo
) ^3 _1 k% {9 \9 C Lan := rootfolder.Internal.Tools.AOLlanguage;0 q$ O! l- h7 o( H- y( Q
if current = @.Destination -- else return
9 O$ z s' ^! x0 q c- {2 c+ S then( q( B6 f9 S, v/ J7 g
@.Destination := void;
6 q. ~. G7 j9 M$ l5 W if @.occupied then
2 n8 ?) H# P- L( j# P; } part := @.cont;
; l- X7 b, W4 R1 f: R: z @.transpOrder := void;: i4 d" N! g+ o7 c2 g2 }8 q/ `
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,$ ]. ?7 q6 u9 }& T
@,root.eventcontroller.simTime);* ?7 R, D) w/ n- B8 R
@.HasOrder := false;9 b( h; I# q, E3 Z4 H. E# A$ V' U
@.DrivingHome := true;; \$ q4 G6 Q* u+ u
rgManager.tryToStartTransOrder;
* R- w' F( s( F' d if @.Destination = void
9 K) z {/ d6 k. Q& c then -- no transport order for vehicle @5 F! i" V1 v' i9 h, ]* M
@.Destination :=
, g( w: y, _5 K4 ?2 U$ ? rgManager.nearestFreeStation(@,track.~);7 ~7 g, t* ?# f% U3 A c
newDirection(@);
- K6 K3 J4 g" L6 r+ c if @.Destination /= void then
& I( Z3 z8 s0 G7 x) U8 h; t @.Destination.NumReservation :=% T: F* ?/ ]) x4 B3 V
@.Destination.NumReservation + 1;
- {: q: E" }- P; `# Y# R end;' v4 P6 e& c t( _3 j) k
@.CurrIcon := "drivingHome";% i; M& v1 x- F% g* r t
@.DrivingHome := true;
: R; d: \9 R$ f6 u end;5 E2 T$ z, S+ g8 |$ N) t6 t7 Y
else -- the vehicle @ is empty, both vehicle and part are in the same dock station/ T( t' Z2 L" k4 J. O: C9 l
part := @.transpOrder;0 g! Y+ V8 H+ E" S- R/ O
part.move(@);-- load part
9 S0 R- ?& s! I4 \ N @.CurrIcon := "load";
) w: G" \$ w9 s t- x1 U, Z GlobalDistObj := part.globDestination;
4 X, ?8 K3 N# y I3 a0 D assignLObj := rgmanager.rgAssignL;
5 H6 M% f/ F* n1 |% L* h, r row := assignLObj.getRowNo(GlobalDistObj);- u5 a& d& C6 r$ ^& [+ d8 Z
if Row = -1 then -- since 70
4 }7 c7 {* B& w# g) P6 r M$ W& T if lan=1 then
) t* v( ^5 ~6 z$ c; C( L/ B promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
: _7 F6 q8 j T# ? to_str("in der Andockstation: \"",?.~.name,"\""));
9 ~) n, H- y7 U0 [: J2 U else- R) m7 {, ~6 G2 r
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
1 X" Z+ E5 U( O! B' ` to_str("in docking station: \"",?.~.name,"\"")); 1 z4 v& M) `% ^( M
end;! }% G6 Y/ O8 \) s% \
else9 S# B7 W4 G" k
@.Destination := assignLObj[1,row];" f* Z, u3 E+ s" ~. a4 V% J
end; % i$ T; Z. t, C/ e
newDirection(@);4 l) h6 o3 U( C; ^: |6 I
@.HasOrder := true;6 R5 X# [) G, N% p$ r
end;- p: p4 s/ [% m2 c- v S+ t9 y
end;
A* V. x# k" k, k& rend; -- of the method0 [2 Y+ e& s3 q9 v5 {# @- u& q( ^! n
|