/* called by: entrance ctrl of the object 'track'
8 U% r) A4 @$ r: M1 D*/
& _# b; C7 A% f4 v! J* T4 kis0 F: ]2 L2 n2 @: I1 }8 G7 l4 x0 }
part, GlobalDistObj, assignLObj:object;row,Lan:integer;! ?# z7 y7 C8 f$ Z: @( }
do
2 h$ V2 m6 ?$ W9 c1 ?) F Lan := rootfolder.Internal.Tools.AOLlanguage;
3 Z+ J. Y, e; R0 v# O if current = @.Destination -- else return9 Q8 ]2 k2 R* p/ ]
then, f$ a3 b, x' G+ C4 D& b9 K
@.Destination := void;- k0 [% a0 R- {& Y* J/ j1 h
if @.occupied then( ~4 c. w+ ~" p1 p
part := @.cont;0 c% @9 p O2 `" c
@.transpOrder := void;/ S- R; o4 X& U+ L% T, b" l
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
0 |' J! t& N( i& b M @,root.eventcontroller.simTime);
Y5 B3 }, r$ ]: I, U @.HasOrder := false;' b4 E5 q+ y& r+ a- F
@.DrivingHome := true;
' q$ ?) ]* u0 J/ M rgManager.tryToStartTransOrder;+ N& \+ F1 q$ m( a; D& F
if @.Destination = void
3 `$ [+ t1 R1 C then -- no transport order for vehicle @
7 k8 ^! h+ K! M S) e! B @.Destination :=% r& _1 }7 a4 u
rgManager.nearestFreeStation(@,track.~);
# c- X6 k. }" m9 F' Q. A newDirection(@);
4 C @2 H& j& ^, d1 v if @.Destination /= void then* A, ?, K1 x* |# @- A* J
@.Destination.NumReservation :=
( b' `- K" a0 K z& Z @.Destination.NumReservation + 1;0 A! q/ S% m$ X
end;: Y( Q9 y3 W0 `% e
@.CurrIcon := "drivingHome";8 H: T% j% s' e5 x
@.DrivingHome := true;# K$ g* y# w1 K! p& \% j. Z2 C
end;9 a! h& B" A. g2 U9 H
else -- the vehicle @ is empty, both vehicle and part are in the same dock station8 F- F! }; O z5 m" E' Q
part := @.transpOrder;
1 H$ H4 I0 k" t1 h* g% | part.move(@);-- load part8 o& _2 g& [! Y% U) u
@.CurrIcon := "load";9 m" i$ z" O* R$ K* m# X
GlobalDistObj := part.globDestination;& Q+ j- B, r: J7 ~' M3 a0 h
assignLObj := rgmanager.rgAssignL;' y; @7 U# {. m
row := assignLObj.getRowNo(GlobalDistObj);
, u/ C4 B* r. n. W4 C( y$ ` if Row = -1 then -- since 70
7 A7 M% k0 F/ B* ` if lan=1 then
7 \) M! q: V3 I7 @1 T promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
/ D- B' U; ^' O3 D | to_str("in der Andockstation: \"",?.~.name,"\""));
. e& E2 S) |. S# h( y" Z8 L$ Y else0 c% X: x! ~# W8 X U0 f# M5 W
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),& q* ` \; S4 \% y
to_str("in docking station: \"",?.~.name,"\"")); $ d0 }7 X8 D+ Y9 B
end;
$ N( M& h5 O$ t5 X/ M5 g" k1 {- e6 z else( g: H) ]5 V0 R& d7 O% {
@.Destination := assignLObj[1,row];; U! n7 [0 M0 L2 q$ p1 C8 i
end; 3 ?7 y* |1 l6 ?. E+ |+ s: C
newDirection(@);
: Y7 E3 h. x6 Y @.HasOrder := true;
5 ?' c* R5 C4 A7 V, y& @ end;8 h5 W9 ~2 y3 ?2 k1 i- V9 [ C
end;
0 @* K( m1 O1 F" P0 Wend; -- of the method+ Y* s: S) k+ o. Q
|