/* called by: entrance ctrl of the object 'track'
7 v Y Y p( G*/
7 t3 h( d& c+ ]; X# O8 q# g! H yis
( }* x' v/ }) E0 T5 t part, GlobalDistObj, assignLObj:object;row,Lan:integer;# P- V W" }! T3 m& n
do# B. z9 y" s: s2 Q7 S" P
Lan := rootfolder.Internal.Tools.AOLlanguage;2 d: y/ ^+ A- e3 {! U, C7 _
if current = @.Destination -- else return, l- N# ?( P+ Z3 z* m( o9 u P( w
then; v- e4 t. \2 ]/ z' u8 H
@.Destination := void;% I9 c2 r- }, p4 e7 V( j; D
if @.occupied then# I- e: M' F3 }( `% p
part := @.cont;* |7 U! X8 k5 I1 s
@.transpOrder := void;$ H0 S$ J' [6 y7 x# L' h6 b
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
7 D& F$ j. L- D4 B- A5 [ @,root.eventcontroller.simTime);# Z8 T/ Q0 K T& G. l1 M2 E
@.HasOrder := false;
# q9 p0 b! R5 |; d% T K7 f9 v @.DrivingHome := true;
z: L. e5 b' `+ C3 W8 { rgManager.tryToStartTransOrder;
( r$ ~" N d' c3 d+ ^ if @.Destination = void% M; S. A; k. w0 }% F; u0 }
then -- no transport order for vehicle @: G1 O" w* @ R% u
@.Destination :=+ G7 \" B; }! E) S: @$ H
rgManager.nearestFreeStation(@,track.~);
, }# }4 \: t4 Q9 I+ U5 e newDirection(@); 3 e1 ? P& e- M2 W7 v
if @.Destination /= void then; r3 {( r4 T; N/ x& y
@.Destination.NumReservation :=
, [7 l* ~* y7 q: R/ h @.Destination.NumReservation + 1;* n3 h0 L) o c+ v: w4 a* y. Z
end;
x6 `; c6 ]( b% h6 V( o' N0 F @.CurrIcon := "drivingHome";! E/ d' }% R# g6 r
@.DrivingHome := true;
2 s+ g& }9 X: [% |2 f end;
8 `2 G3 c# g8 w: @8 L else -- the vehicle @ is empty, both vehicle and part are in the same dock station
/ j) j' @* k& x part := @.transpOrder;
' h. [( [. a+ E9 v5 v5 D! Y part.move(@);-- load part2 x; s8 Z* c0 ?
@.CurrIcon := "load";% w1 e( R! {% O9 O) J
GlobalDistObj := part.globDestination;
0 i4 W- y; c3 n- A assignLObj := rgmanager.rgAssignL;2 }* a- j; e. o2 j {
row := assignLObj.getRowNo(GlobalDistObj);
7 l: a- o. W% ?( m$ V9 a# | if Row = -1 then -- since 70! C) N( c2 v5 `1 D; s! K
if lan=1 then- P/ F r ^' ?1 [% D8 \
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
# d/ c* D# k! o0 O [( Q! U6 Y& S to_str("in der Andockstation: \"",?.~.name,"\""));
, W5 T; d; n M/ @ else
, j# Z5 e$ `: _; w% r# T) l promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),5 H! R4 Z% f* X
to_str("in docking station: \"",?.~.name,"\"")); Z/ b8 ~; ]/ w; Y! \4 v0 k
end;8 i, U. H# ^9 i* p
else
2 w3 `+ D6 h/ n. Q @.Destination := assignLObj[1,row];
3 L3 @1 P1 V9 a; p3 C end;
9 s7 T5 q' b: [% ^: `1 R newDirection(@);1 _7 P- [: l9 ^/ B# ~
@.HasOrder := true;
5 t5 J' W$ `' `* ~: L end;
. K2 z. i) @, ?. Y2 o* t end;
5 f, ]" h" B7 v/ K: f7 ?end; -- of the method
8 _0 t" O1 X" _: x: e/ o |