/* called by: entrance ctrl of the object 'track'. [9 N5 g" ]4 G0 A7 S) y
*/
5 a$ L, d. c8 Z. n& ?is6 G, k3 c- [$ j/ u/ s
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
# M1 W) f0 @# f; ~; p5 Mdo3 T q6 I% E# `( R/ B3 j' J {6 \& W
Lan := rootfolder.Internal.Tools.AOLlanguage;
$ {/ p4 G ]1 T- P if current = @.Destination -- else return
, d& O7 C5 y" G9 J: `9 K then7 ?+ P$ x* n7 p
@.Destination := void;
& e+ E6 l4 _3 k! j# M2 d- a" E if @.occupied then. Q5 X* M1 M3 I! [
part := @.cont;
5 ~/ r8 y2 t+ R4 l: O# F, Q @.transpOrder := void;9 Z! @! p$ G7 h
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,2 Q% U! x' `! S3 O) { i8 }. F- X
@,root.eventcontroller.simTime);
W% t2 i* U6 _) r! B% b3 c2 o1 C @.HasOrder := false;
E8 ^$ w* o j @.DrivingHome := true;* E0 Z7 z/ H- X! ]/ V
rgManager.tryToStartTransOrder;
6 c/ d( g3 }# R" l% E* q$ H4 J' S if @.Destination = void
0 e' G( a# B- v/ S: I6 g# @; x( W then -- no transport order for vehicle @; D$ }! V7 t$ ?8 C- b& ^
@.Destination :=
: X$ H' @' n9 H3 B, Y( |9 d5 [ rgManager.nearestFreeStation(@,track.~);
0 c! ~ S+ |, F3 d6 n* w( B newDirection(@);
- M+ \ s" J/ k6 b if @.Destination /= void then
( L! n6 \* s2 ?) W2 Y2 w' S8 j" @ @.Destination.NumReservation :=
! A+ F& r( H) L# }" p @.Destination.NumReservation + 1;
& R3 E- P, I9 Z& {7 C' n end;
Z8 _$ j, U" c6 |" Q/ V0 n1 T @.CurrIcon := "drivingHome";
, V5 R! M( N: Z: ^1 ~5 o% U @.DrivingHome := true;
}3 ~% s+ B6 l# b* V end;, ?6 x- X& w; I
else -- the vehicle @ is empty, both vehicle and part are in the same dock station! s. Z& f' i& V" A
part := @.transpOrder;- j+ x" A P; c) d4 G
part.move(@);-- load part2 U; g0 K# m9 u1 W# c( O
@.CurrIcon := "load";: T- X3 h+ p9 u2 |: U5 S1 v
GlobalDistObj := part.globDestination;: r2 N7 e' j. P( P
assignLObj := rgmanager.rgAssignL;2 V7 f; b1 C, T
row := assignLObj.getRowNo(GlobalDistObj);8 y4 c$ ^7 ~ P6 P# e
if Row = -1 then -- since 70: g6 b, g* V2 k. K
if lan=1 then/ a- w% G# h7 k9 n
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),# C: d% I' n8 P1 a1 e# S
to_str("in der Andockstation: \"",?.~.name,"\""));# S% c* h1 L9 r3 a
else4 N( i' l' ^- u* S
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),0 C) p- ?( `# b. U
to_str("in docking station: \"",?.~.name,"\""));
. K. y; `) K, \/ C end;
' ^6 X- @- Z5 X, E, X else
* y6 O3 G# E- b! w @.Destination := assignLObj[1,row];
7 N, m d" Q& R& n3 i; x7 w end; & w0 v" s2 _8 p
newDirection(@);& \5 O- q# c# J K
@.HasOrder := true;
- U; B, j1 s7 ~( r$ Y end;2 \* H8 m/ o8 t2 @6 H6 Y
end;: v$ ]1 T m& Q- s8 z
end; -- of the method
8 k* F9 j1 p4 W6 ^" n |