/* called by: entrance ctrl of the object 'track'
* q1 H8 V. o) ]# \* N! t8 @*/+ N: C3 }( i" L7 l# L4 J" V
is
) ~. L+ v5 B2 W+ h* R7 e, [# j part, GlobalDistObj, assignLObj:object;row,Lan:integer;
+ U" ~* b5 B' u. b$ e$ Jdo3 Z* w+ D% ]' G2 P
Lan := rootfolder.Internal.Tools.AOLlanguage;
% p8 K. j7 a: s! C- U: l" Q if current = @.Destination -- else return* R$ r! E4 U ~5 d. `/ F
then
4 z& H6 m; M) Z! d' h+ E. p @.Destination := void;
' f4 D5 _) Q' g7 o% M( K2 \1 A5 ?& E2 Z3 K if @.occupied then0 A8 p2 A4 y' L c0 R
part := @.cont;
2 G* A# A3 ~3 @+ W( E" g @.transpOrder := void;
! c- N/ t z9 r& r part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
, W( l# i7 \. g/ Y1 Z( i" r' E @,root.eventcontroller.simTime);+ B5 _0 S; k! @% o
@.HasOrder := false;
/ V" w/ C' u j @.DrivingHome := true;
* j1 n/ E& Z! m, C9 s rgManager.tryToStartTransOrder;
4 q, [# x* {/ e( i t% Z+ g if @.Destination = void* Z# R# e3 F% q, h
then -- no transport order for vehicle @4 q: S% r* P. k4 K& ~
@.Destination :=& R# O, l5 [) ^9 y( i+ k O% `
rgManager.nearestFreeStation(@,track.~);$ f! f6 e: |/ N$ B+ R! r5 ~
newDirection(@);
% U( f* _$ T8 Y! h8 S if @.Destination /= void then& C* V# f: g2 I* {% F
@.Destination.NumReservation :=
: G8 E. D/ z7 A4 k. O) ^% [ o @.Destination.NumReservation + 1;
5 C( @/ A z6 A& D7 U. d" F end;
/ ~0 B2 p- N' d7 G3 O6 [ @.CurrIcon := "drivingHome";
& x \; u7 u" R& `/ V @.DrivingHome := true;3 P b( x; [+ X& Q* b% U2 O! ^
end;9 P( v; ^; q6 a6 ^% V
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
4 L; z2 ?1 E, V4 `5 C- F( j part := @.transpOrder;4 z! S2 o8 W& D' ^" J( A
part.move(@);-- load part- N# {2 c `! O0 C
@.CurrIcon := "load";% e2 k8 J0 R) R2 F* L% h" d
GlobalDistObj := part.globDestination;. B( |8 j) ]1 Y7 D! z
assignLObj := rgmanager.rgAssignL;( }: F8 V; C1 W% Z4 l
row := assignLObj.getRowNo(GlobalDistObj);$ V' j9 {" {$ n" y- e. Z1 q
if Row = -1 then -- since 70
' d0 l- m0 \" f' G& J' a3 U6 m+ _ if lan=1 then9 T$ C& M0 ^8 J/ E) Z. ^( z) c2 F- G4 M
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
- N( G9 {- G+ a4 P; t2 @ to_str("in der Andockstation: \"",?.~.name,"\""));
5 ~6 X" j- Y) `- W6 J: H else x2 a: k; [' H
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),+ f0 A" M: X' S+ W0 u3 r
to_str("in docking station: \"",?.~.name,"\"")); " n( ]: y+ D# X1 D, \( T2 T
end;% Q Z7 c+ v8 z# F h
else! ^/ e2 `7 g" n Q1 b
@.Destination := assignLObj[1,row];; Q* {/ d' ^& X- q2 k. c$ N
end;
# t/ i6 b, H: `7 ]- C newDirection(@);
9 T/ z' c H" p( S; H5 v, k @.HasOrder := true;
2 l2 ?6 _; y% h( ?0 n1 Y end;$ A" W8 {* h& x0 e4 `
end;
- d5 A, n0 X/ ]4 l Rend; -- of the method
0 k K% W! b- ~* D9 k; x |