/* called by: entrance ctrl of the object 'track'
: X8 o Z3 y5 H# t p; U*/
+ Q' |5 X" A5 o% G3 O$ b! _# ^4 Ris3 g: x. t8 y! c5 b+ j- X
part, GlobalDistObj, assignLObj:object;row,Lan:integer;' W8 ?4 c9 R! t( Z9 U' D( K% y8 |8 N
do7 @% q) c! g1 Y2 k
Lan := rootfolder.Internal.Tools.AOLlanguage;
' d& n3 s# `) Z l$ ? if current = @.Destination -- else return
# t: ]( R$ t* ?0 _ then: K4 E3 b* K2 C. q: {2 n
@.Destination := void;
; U( H' P/ ?; E( Z. ^ if @.occupied then+ f5 W8 A! Q) B- h
part := @.cont;
5 t! E) b8 s2 T. ^; t8 q @.transpOrder := void;# S6 |5 E' a! T: ~+ C# W* h
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,9 z( g2 j' t7 q6 S# T
@,root.eventcontroller.simTime);% D% b' D2 ^: P% j5 L
@.HasOrder := false;( e0 E x q/ I& j+ `% F
@.DrivingHome := true;
9 F# P: e K+ t% b3 [( f4 U rgManager.tryToStartTransOrder;
1 |% b! r/ I. Y4 y5 c( [1 l* } if @.Destination = void
* q7 n2 w1 k1 y o9 X% o5 j then -- no transport order for vehicle @1 O& T* I+ x6 _% `& ~
@.Destination :=
4 D9 D' ^4 ^0 Y* T% | rgManager.nearestFreeStation(@,track.~);$ i! |6 `) j8 \8 ^7 ?. U
newDirection(@); ! ?* H" }' n0 w" G$ f
if @.Destination /= void then
3 o2 | k, f' X. R. [' V @.Destination.NumReservation :=% p; }# B6 T" F/ Y3 f
@.Destination.NumReservation + 1;
7 l/ Z* o% p1 @4 G end;6 C% \, d1 H3 a# _* y
@.CurrIcon := "drivingHome";
; t6 `3 I3 U! X& E4 l/ ` @.DrivingHome := true;
, b `9 E# A& o9 e% J9 Z end;
( T7 M* I( v) i6 b7 |7 h else -- the vehicle @ is empty, both vehicle and part are in the same dock station4 N. I5 j' y: s0 ]! U& t
part := @.transpOrder;( G& i! L7 S- p h `1 x
part.move(@);-- load part
7 N S! m7 i9 n1 d4 b5 n* @0 y @.CurrIcon := "load";
% z1 P m1 V( N5 o( N0 j/ B: P GlobalDistObj := part.globDestination;
* k$ U! v6 J- x1 e2 \( b9 | assignLObj := rgmanager.rgAssignL;$ I7 i2 S/ Q6 u; L
row := assignLObj.getRowNo(GlobalDistObj);; x: a8 H1 `" W( l
if Row = -1 then -- since 704 Q! s# p* T( q( Y3 W
if lan=1 then- \! @7 \4 ^4 g, O
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),' W5 L( s5 I$ V. m3 m7 E$ y
to_str("in der Andockstation: \"",?.~.name,"\""));5 v9 Q( w2 L) s& c; t+ M# L
else
8 p) z# |% j( G& L" K promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
- D5 b+ [% t) {4 b# E to_str("in docking station: \"",?.~.name,"\""));
8 l i# c( N1 R end;( k, m# x5 Y2 U. o
else
) {) t+ J) I8 Z) S; G+ m @.Destination := assignLObj[1,row];
' z9 s3 S% n% c R; D9 O& \+ C! O end;
$ A$ q5 t: p0 ]0 t newDirection(@);
8 P: }$ A3 Y, w9 {8 |7 V8 T @.HasOrder := true;2 F- C" n! L$ z6 `7 C$ Y
end;
: Q0 R2 S0 c8 _' s' X E end;
9 z" A$ z5 m0 ]3 aend; -- of the method
. Q( v0 x+ Q# ~- g8 q3 T |