/* called by: entrance ctrl of the object 'track'/ w$ W8 g9 T6 i
*/( n3 |8 u: F- @# r
is9 Q- g# O/ g5 H c
part, GlobalDistObj, assignLObj:object;row,Lan:integer;! Q2 R/ F2 @$ U9 D; q( x
do8 B; f* \3 n* G2 |2 h# E5 r
Lan := rootfolder.Internal.Tools.AOLlanguage;
0 {- k; c1 F! {( V) z6 n if current = @.Destination -- else return
, J+ I) |0 D n then- L) C5 c0 V* q
@.Destination := void;
# m5 a- u% X& X6 Q if @.occupied then# c* }" U! t- m V3 X4 z& Z
part := @.cont;
0 e' U5 @2 o3 `% N% u @.transpOrder := void;( V9 U0 m" q; ^: z
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
, y% D( L1 e5 Y: i% H6 `) T @,root.eventcontroller.simTime);- \) g1 {$ M& X" K4 G+ i5 O
@.HasOrder := false;' k+ c& }! P5 R# X9 R! t
@.DrivingHome := true;& c, k8 y0 N9 d7 d+ v
rgManager.tryToStartTransOrder;+ H \0 ?/ v3 ~8 u& k* a
if @.Destination = void
- Q' |% { D# b6 f+ A then -- no transport order for vehicle @
! e6 x7 a* c7 w; R5 [ @.Destination :=
+ [: q, u. I% _! ^9 Q, i( s2 Z- G rgManager.nearestFreeStation(@,track.~);$ a; `8 q- ^+ x" U6 g# F* r) w
newDirection(@);
, ]$ _ g X- N1 C0 X, o @: S- | if @.Destination /= void then" B+ v6 e5 O# a9 M, B
@.Destination.NumReservation :=
9 m) a C, h5 k @.Destination.NumReservation + 1;2 n7 i6 k, T! o9 F+ { L
end;& F: }0 J/ I5 N' t+ ^
@.CurrIcon := "drivingHome";
8 g9 i' w, w9 g h @.DrivingHome := true;4 X. V- h1 I) y/ X
end;7 U. }1 M( D+ R0 ?+ R
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
" x: M/ R: t1 l part := @.transpOrder;
0 [& f5 [7 p: {: z, k part.move(@);-- load part% c- p' B. x, U& Y4 n! Q3 e* ?5 h$ k
@.CurrIcon := "load";
' c9 _0 s- M4 Q7 l# @. U' F X GlobalDistObj := part.globDestination;
& G7 `. s5 g1 T9 K8 f, V4 g assignLObj := rgmanager.rgAssignL;4 E9 l7 l) N$ Q. n: o- H
row := assignLObj.getRowNo(GlobalDistObj);4 b V3 L! `! o0 s4 W, F0 L% w/ I5 L
if Row = -1 then -- since 70
7 I3 q5 F6 H3 I8 W if lan=1 then8 n0 n* F# j. J( B& v C4 l
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),' @; k: B) e6 C. S% ?
to_str("in der Andockstation: \"",?.~.name,"\""));# P& P8 \7 U: H( s0 k7 `
else% f" \7 F) l: o
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),/ p. y% h! N5 ?+ o0 {+ }4 p
to_str("in docking station: \"",?.~.name,"\"")); 3 u: B1 b* l9 o( w+ z
end;
) j' P i! j5 \& e/ T else+ @* S2 C! G9 a" t+ _2 H' z* N# A, P& d
@.Destination := assignLObj[1,row];5 T2 T { i+ T0 s# Q
end;
, o( v: a1 f6 v- e newDirection(@);
5 i) M% v( `4 `3 w$ B- a* w @.HasOrder := true;0 {- g0 e6 ^7 G+ p
end;3 K h# Q J! o3 k1 [4 v
end;
( k. u0 F. G `( o. ]end; -- of the method: I! |4 s' k& L8 J( c( j' j% B5 R. o
|