/* called by: entrance ctrl of the object 'track'7 u( G+ o; [7 }& x2 ?+ ]
*/" F: h! _$ N; Q5 T, h
is. T1 C# H* V `+ t+ @
part, GlobalDistObj, assignLObj:object;row,Lan:integer;# {- r) D8 U, n" G+ u+ D/ ^! o
do! l, | G# S8 q* v/ c" U" m
Lan := rootfolder.Internal.Tools.AOLlanguage;
; @* F7 }+ ?( s8 E, A$ { if current = @.Destination -- else return
/ `6 c: k( v& k2 i then+ k% \0 E% |+ k! B" X
@.Destination := void;* [' R5 q1 A% }; r" C) i. R/ n
if @.occupied then! p" |, C" g% b: _9 r
part := @.cont;; g) n5 ?7 q6 Z( x9 v' L
@.transpOrder := void;
& P* h) h* q6 I9 z5 \. r3 L part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,# U p* W9 I* _' v
@,root.eventcontroller.simTime);( i* Z) e7 q+ ]2 W( L/ \
@.HasOrder := false;
' w5 w3 a% D& r' { z! e7 g% z6 ? @.DrivingHome := true;3 o. l2 S9 c: i
rgManager.tryToStartTransOrder;
& y& {! A! e1 j8 |$ N( f if @.Destination = void
8 C& N: ?: _' N% }) A( d then -- no transport order for vehicle @
! Q4 ?3 R* t- y, } @.Destination :=7 L% S9 M8 a" P/ H
rgManager.nearestFreeStation(@,track.~);
8 N: B T! l+ D( j newDirection(@); ' u& H* y& M& r& l% b8 w8 B% X! }
if @.Destination /= void then- y. N% y) z9 z( O0 D# w: a- g" u
@.Destination.NumReservation :=
- ^1 P0 i- J2 g( j3 L @.Destination.NumReservation + 1;
% T( h+ F+ ~! o% s# I1 N end;. G. U9 f, S8 s
@.CurrIcon := "drivingHome";6 H' X2 }$ |. H; B
@.DrivingHome := true;6 y: I" \. ~8 L/ x: @
end;7 j# q8 F) q$ j) h5 a8 G# Q
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
3 N; b& k N) H' R% |2 \! p. a part := @.transpOrder;
) R8 O- m6 a" r4 i& o* H) y part.move(@);-- load part
/ l& s# ~9 c- B$ b6 ? @.CurrIcon := "load";4 Z0 P6 e/ B3 X1 _& b5 T
GlobalDistObj := part.globDestination;
# _) n) [, G* U6 Q1 m assignLObj := rgmanager.rgAssignL;
' U/ q2 S; w$ s row := assignLObj.getRowNo(GlobalDistObj);
S9 A( B. Y& J5 n2 r: N+ | if Row = -1 then -- since 70
6 w/ L+ t4 A5 q( W if lan=1 then+ N7 r, _9 h8 ^# u& z
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),; H( Q: r! x0 `3 J4 V
to_str("in der Andockstation: \"",?.~.name,"\""));
! o( ~: W- m1 ^; K- l else
! G0 l: B) U7 M, o$ U3 a; T promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),$ Z, _, x: R# z0 U- N
to_str("in docking station: \"",?.~.name,"\"")); i @8 [3 |6 N0 ^# ~3 x6 q
end;
6 x/ U, o4 r' F' j1 N else8 V1 ]) B1 W: v: Z5 s9 A/ m4 e r2 L
@.Destination := assignLObj[1,row];& j" g6 C3 E9 ?7 y( r0 h7 S, t
end;
/ N3 J1 I3 r+ @! ^ newDirection(@);
/ e# z9 T1 p3 W1 t- k; X/ y @.HasOrder := true;
7 f# w b" k8 ]9 U+ p9 g end;
5 P5 c, Z5 `8 Q end;3 F y. z2 G. i. X" k! c3 r
end; -- of the method0 V7 a! g; ?4 |: y- P4 f
|