/* called by: entrance ctrl of the object 'track'+ A; C& ?: ^" s; f
*/
1 Q+ |! @! F- I9 I/ c. |$ qis
1 F) ?" m7 h u! Y0 n$ i2 Z! { part, GlobalDistObj, assignLObj:object;row,Lan:integer;2 s0 D$ ^$ y9 C; B5 v
do
% n/ |) N1 F3 K$ C1 ~ Lan := rootfolder.Internal.Tools.AOLlanguage;
" L& w- i, m9 H: A+ ~: c. t. w if current = @.Destination -- else return
) D- P0 K; t! V; Y then7 u5 d9 g8 C# N+ E- w1 H
@.Destination := void;2 V& e$ D" C& ~! d7 T
if @.occupied then2 x q3 n. e1 \% O# D
part := @.cont; v2 @. k5 F1 t3 ^8 {- a
@.transpOrder := void;# E0 c8 j, O, ~. k
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
' U. K$ d: n! v* d& j @,root.eventcontroller.simTime);
1 ?* D Q. X9 r4 V" Z, K* w @.HasOrder := false;
" K3 g) l) T7 R7 k* k9 u1 x @.DrivingHome := true;' k2 _3 N$ H1 M2 w/ `
rgManager.tryToStartTransOrder; v: X" P9 r' s: w0 s
if @.Destination = void
1 B" K; I* `# T0 R, _ then -- no transport order for vehicle @
* E" D# ^( O8 w# f @.Destination :=
9 c2 n( E- F1 \0 _ rgManager.nearestFreeStation(@,track.~);# A7 x+ {2 H: U( H6 |3 N- e# i
newDirection(@);
6 g5 U" v6 O& q if @.Destination /= void then# b% a8 S, x2 k* _8 [
@.Destination.NumReservation :=
+ B5 w, S9 ~- ]2 x7 S @.Destination.NumReservation + 1;, U% E8 i, X. D
end;$ h g" e! U5 {6 E" u9 Q9 t$ l
@.CurrIcon := "drivingHome";! E" _0 p/ }8 X) t N
@.DrivingHome := true;" ~7 B% Q& w7 u" E
end;
3 m7 {# l! }! m4 j else -- the vehicle @ is empty, both vehicle and part are in the same dock station0 c% \1 ^. Q) k5 d2 }1 a) M; t
part := @.transpOrder;) g( h) G( F6 e0 w. z: l; D
part.move(@);-- load part0 D! `& c% X/ F; N# M% G8 _
@.CurrIcon := "load";
9 j& ~# E0 a; E1 n: {% ~ GlobalDistObj := part.globDestination;) D/ ~9 T8 x# i x, C
assignLObj := rgmanager.rgAssignL;9 x9 }, J6 m8 P8 f3 a- {, R
row := assignLObj.getRowNo(GlobalDistObj);
~6 x3 e+ I" s' `3 ^2 w. s if Row = -1 then -- since 702 P) j4 D( f4 u, ]- Q/ ~
if lan=1 then
; Q: o& o( j/ K( |$ |, Z promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
. e" x+ X+ b3 i- r to_str("in der Andockstation: \"",?.~.name,"\""));9 |- B, [0 _" ^- s$ Y
else. ^( k9 G; @9 ]8 p6 b. w9 e
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),- R+ `. w8 K7 _# W" T' o
to_str("in docking station: \"",?.~.name,"\"")); 3 e6 |1 u/ p9 J# V. \- C
end;
' [6 @4 E% V1 p else
( G7 t; |% Z2 N @.Destination := assignLObj[1,row];$ n7 Y- c; U* D+ Y# l
end; 0 ^; L" L6 g( G8 b9 Y6 K7 [8 \: A
newDirection(@);2 }, x, V2 K* m( @# a/ s. z
@.HasOrder := true;- o5 O9 d- ~4 f' @ N4 K9 R7 M# v
end;) ?9 K: o) I' X6 p
end;
" `" Y4 H5 [5 |- ~: Z, kend; -- of the method
# m0 o) P# t- h$ c0 w3 X5 F |