/* called by: entrance ctrl of the object 'track'
! v) f7 ^. ^; l4 Z2 [*/* {. A k w; _1 g( h8 ~3 E
is7 d. `% ?! K4 R1 v; l1 m+ ~
part, GlobalDistObj, assignLObj:object;row,Lan:integer;+ i$ P0 w! Q& U1 E4 s! h
do" q* j! M2 ^7 ^. ]
Lan := rootfolder.Internal.Tools.AOLlanguage;- w1 G# M8 K6 t; `3 R
if current = @.Destination -- else return; J' m! x; H# G0 S8 |6 U
then7 S: k P5 f% G6 w0 S
@.Destination := void;
$ G9 V' Y- T& M" B: z) |& f8 \ if @.occupied then
) N U3 L, w% V! L. K part := @.cont;
2 r$ g+ L+ r" y C% v9 H" x @.transpOrder := void;8 u: e9 T" o* m' H/ J# }
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,5 x! ^& l7 r7 ]) M
@,root.eventcontroller.simTime);; k- \8 U, b+ Q F
@.HasOrder := false;
[0 p: T- y, z# @( q6 f8 J C @.DrivingHome := true;4 F* M9 W( k% W6 f, V. V
rgManager.tryToStartTransOrder;, {6 T2 ~$ g3 [' X9 q
if @.Destination = void
7 v6 T4 X- i6 }; t/ R+ A- m) | a then -- no transport order for vehicle @7 U9 y6 N0 O" _% v7 s
@.Destination :=' L( Q8 ?9 G6 s; B5 N, B
rgManager.nearestFreeStation(@,track.~);
1 x1 ?+ U* ^7 [1 s. ` newDirection(@);
# J9 N# r4 a& x3 [6 ?2 R% i if @.Destination /= void then; B6 T, W) D/ P3 P& E' ]3 `
@.Destination.NumReservation :=# ?8 f. L+ l5 f* r: J3 |; {
@.Destination.NumReservation + 1;
9 b2 }$ e5 `/ O0 G3 x) m end;) U% s/ p# H+ ^( ~+ M
@.CurrIcon := "drivingHome";7 v$ h7 ]1 Y/ Y( A9 b3 B
@.DrivingHome := true;
; L# m% f) s* a0 G' U; d+ Q! ] end;
3 ~$ _* `8 K6 O2 U/ n else -- the vehicle @ is empty, both vehicle and part are in the same dock station0 S3 J6 m5 p- H4 L
part := @.transpOrder;7 j+ h- g' i/ O q2 L3 m9 s$ M
part.move(@);-- load part7 p$ k! J+ M# U
@.CurrIcon := "load";
# W! W1 x4 Y- A% K! u' V2 ^7 m GlobalDistObj := part.globDestination;
9 P7 {, |/ t* b% Q- H+ ?6 E assignLObj := rgmanager.rgAssignL;3 b: [2 C* ~; R& \
row := assignLObj.getRowNo(GlobalDistObj);
( J% J" u. i; o( Q- W9 b9 ]* \' w if Row = -1 then -- since 70) C8 n' O3 p% n3 A5 \& T' n
if lan=1 then
. @3 ]( o; Z% @# C promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
. R7 m. x8 q( ]2 t2 Y to_str("in der Andockstation: \"",?.~.name,"\""));, l J; u6 c% r3 }4 M
else
5 ~; H# Y" B7 z+ G _ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
& a, H0 A3 }6 I; ?! z to_str("in docking station: \"",?.~.name,"\"")); - l2 k7 N3 G q8 Z9 G) o3 W1 d2 f
end;% f9 r" l3 G; W; D4 E
else/ b* u. `( F. C. Q+ S* n* L
@.Destination := assignLObj[1,row];
: Y/ l6 F0 |. i. v, d end;
" u1 d) [- Q/ l2 `! I0 [/ [ newDirection(@);& g/ ?0 m7 |4 N9 p* Q4 F
@.HasOrder := true;
6 Z- D+ d% u4 N1 K end;
8 J" ]- v& Z0 p' N7 S end;
% C+ H+ S9 x$ H [7 Iend; -- of the method3 x; v9 D: k! K# |9 G8 Q% V
|