/* called by: entrance ctrl of the object 'track'( x# E0 q$ ^. W5 @0 r; `& l7 R( ]
*/
" G. [5 u! }4 v+ D5 wis# Z) U' J; }5 s* U
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
9 u8 _+ b7 Z s& ]% H& Y0 C: vdo7 x% Y/ V. S5 R7 e: Y2 `/ L" {' L
Lan := rootfolder.Internal.Tools.AOLlanguage;; p! F4 ?+ s8 i4 U
if current = @.Destination -- else return
/ l+ o8 d# H' c1 N6 U. K" [% c then
) f& i1 z/ B7 e# P5 X @.Destination := void;
. [5 T) M9 q" ~$ d1 k% z" s if @.occupied then5 N0 k2 b4 E* s6 x5 F/ ]) p
part := @.cont;
; T& m5 Z; k$ ]. y B, y+ ~ @.transpOrder := void;6 {: m) h$ V" g; k2 Y! Z
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,0 v6 U/ _# |1 K
@,root.eventcontroller.simTime);
7 x1 N) L' h6 N+ ? @.HasOrder := false;4 D; `5 \. |( c3 t; c f
@.DrivingHome := true;
1 C( ^5 \( m. A/ H9 u% E( m$ h rgManager.tryToStartTransOrder;) a+ @- p6 Y9 w3 z
if @.Destination = void! H: o' o2 [3 o6 I, a& ~% q
then -- no transport order for vehicle @2 n, m P, V" ]+ Z5 W
@.Destination :=
# [- F j0 t8 F3 g2 e( l% o6 Z rgManager.nearestFreeStation(@,track.~);
6 w5 Q0 g2 x1 X- X8 [) D newDirection(@); 6 f' d5 `1 [! M
if @.Destination /= void then
+ f4 J! O- U9 g* s( o4 U @.Destination.NumReservation :=
8 \- h, s8 u" n' X1 c3 ^ @.Destination.NumReservation + 1;6 ] f1 t: D) J/ h. o
end;
4 `/ P/ b& F+ X( m0 ~) n" x! a @.CurrIcon := "drivingHome";: N! _) t; ^7 E5 }9 \: [* C7 P/ T) g$ u$ ]
@.DrivingHome := true;3 @ d& E( C& _. V |, i$ c
end;, k; z( K' B9 {) q. i w8 h; n
else -- the vehicle @ is empty, both vehicle and part are in the same dock station8 C) ]& {% H# R! ]
part := @.transpOrder;# l5 V" ~+ C |8 ~' C
part.move(@);-- load part( r0 E. _$ c: N0 S. ]% h
@.CurrIcon := "load";" s* N- r2 ~5 g9 J- T- f
GlobalDistObj := part.globDestination;
O0 g: n8 D' l) p& Z8 ^' { assignLObj := rgmanager.rgAssignL;
$ A4 V9 G6 b0 g4 h row := assignLObj.getRowNo(GlobalDistObj);; R7 L3 G( B( h- A8 D
if Row = -1 then -- since 70
0 F0 A5 {9 A2 _% R7 j if lan=1 then
7 f4 D6 o0 U) A. J: I+ @. x promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
& b7 ~3 Z4 A- L' x" u- ]: o3 R3 N to_str("in der Andockstation: \"",?.~.name,"\""));
2 J. _( i/ ?, e d$ l* R7 U else
6 X+ P, C ~. ^) J" Q* B8 Y3 l promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
' L8 c/ U7 e' @0 A+ e* X9 s5 T7 X, G0 n to_str("in docking station: \"",?.~.name,"\"")); & u3 F( O9 k3 j1 E+ o
end;0 ~7 f3 o \. U0 b9 o8 d
else
4 y/ w& L. r2 | n& h7 q7 g @.Destination := assignLObj[1,row];/ }5 j% H6 V! O: A1 p" x3 Q" G
end;
' J0 R0 ?2 \" M' c7 ^ newDirection(@);
6 v! r+ T: y1 X+ X1 U) h @.HasOrder := true;$ v; j+ x6 Y$ F: R
end;, D- a; \' Y( @
end;) p& \! V+ Z8 K! z
end; -- of the method3 `8 Y$ T$ O4 \8 C
|