/* called by: entrance ctrl of the object 'track'# n) E m" i. F/ O
*/9 C6 z! m/ ?! Z, r
is
' ?. ], m" s/ y+ |1 @2 Z/ i part, GlobalDistObj, assignLObj:object;row,Lan:integer;
, j+ j, }' m y% g/ Ldo
h ]( l: ?( b; A+ ` Lan := rootfolder.Internal.Tools.AOLlanguage;
8 V5 G5 v% s8 L2 {) D3 r' X if current = @.Destination -- else return
O8 S! [2 e% y! V! Y then
1 Z4 g+ i. Y3 _" B @.Destination := void;
* A( P& q/ D3 q { if @.occupied then
: q" X% l; L6 E; e, j part := @.cont;' l. Y: \- h' K$ C, G. R7 \4 Z
@.transpOrder := void;
v- R7 d) ~7 i9 I9 d6 n part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
* L: m0 U0 t f6 q6 ^3 `" [* R$ x; J @,root.eventcontroller.simTime);
4 g# D9 E5 G8 T- S @.HasOrder := false;
/ J7 W, A" c1 Q5 ]( h" }2 ?" } @.DrivingHome := true;5 q" u9 b* t8 `- g2 k& I& n" V S
rgManager.tryToStartTransOrder;9 u5 f- s# t8 _3 O
if @.Destination = void
) `& D# k2 R% j. z6 i u, |7 b then -- no transport order for vehicle @
: z8 v' b" i# S @.Destination :=" J. ^" |4 `9 X7 u3 ^1 ]: E" D
rgManager.nearestFreeStation(@,track.~);; r# t4 a2 a3 d
newDirection(@);
1 b7 z/ G9 b7 c6 g8 I# R; ] if @.Destination /= void then: W$ @: u+ s2 M( [2 ~2 U; u. [! X
@.Destination.NumReservation :=2 _ D2 X. Q) I; T9 U
@.Destination.NumReservation + 1;
' x8 k/ U, R' Y end;5 C% r l1 x8 B6 d/ l# f
@.CurrIcon := "drivingHome";3 c0 v0 d4 Z4 G8 w
@.DrivingHome := true;
0 |7 V6 |. }0 _3 R- _ end;
$ J" b0 ?2 R& m else -- the vehicle @ is empty, both vehicle and part are in the same dock station
8 z$ X& I6 `4 u6 ]" s part := @.transpOrder;
& A! T2 {4 G7 a u5 F7 a! y part.move(@);-- load part* R) o8 K1 ^* Y( y9 W8 ?
@.CurrIcon := "load";6 y7 e. H0 N% E* U
GlobalDistObj := part.globDestination; v7 |+ x5 X8 r7 R3 p
assignLObj := rgmanager.rgAssignL;
9 B5 p( ?$ S/ d0 D5 v" [( x7 ` row := assignLObj.getRowNo(GlobalDistObj);+ D& ^ `5 g2 Y6 ?2 A& t8 z0 @
if Row = -1 then -- since 70
$ F( L0 Z, T& d7 n5 A8 ]. C" w if lan=1 then7 {5 j6 C( O3 @6 U* e! K3 S1 M- v
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),' {; R5 }; [8 _6 R6 K- M
to_str("in der Andockstation: \"",?.~.name,"\""));/ t J4 A- b ]$ i
else
/ _' }+ s( U+ a" R promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
0 U- S7 \1 G. W- w% u to_str("in docking station: \"",?.~.name,"\"")); 1 v3 f# ]) I6 {
end;0 A. U, F. ?3 i3 C- t
else
8 ?+ [. ^8 [3 Z+ B' [ @.Destination := assignLObj[1,row];
0 P7 w$ |- ]; f0 d end;
# J" M6 m3 h3 g2 `0 ? newDirection(@);8 }" B% w9 I3 |7 X. g6 }& F" N4 P
@.HasOrder := true;' j) M2 z2 Q8 a$ d. h! N
end;4 e* C& |; [6 U
end; _! C' ~& i( t O
end; -- of the method
5 A( a' ?% Y8 H4 m3 i |