/* called by: entrance ctrl of the object 'track'
3 e, X( G }. Z1 N*/" ^$ T; O1 l& J; v0 i2 ?6 H
is: j0 K. f# C- O F1 j6 g" k
part, GlobalDistObj, assignLObj:object;row,Lan:integer;( V) _! i- v3 Q/ m! ~2 y& f3 h- d
do
! d" j5 B; P: p# M Lan := rootfolder.Internal.Tools.AOLlanguage;' W1 C3 N8 o4 H( T
if current = @.Destination -- else return
1 q9 |6 T4 X5 u$ t. u) A5 J- ~ then3 x: m3 N9 g U0 ~$ F+ D) j3 p
@.Destination := void;
# w1 Q z. t" }- M6 M! s if @.occupied then7 l/ i8 N' q) }5 ]( ^+ b3 w. n
part := @.cont;
) F, R; f% i: O5 D% t6 s' b' A3 c @.transpOrder := void;7 \& t) S( X; [# t
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
( N; Q. S: J& H' s8 F& H) o" R @,root.eventcontroller.simTime);, M6 i3 s9 T4 w1 \ Z5 T
@.HasOrder := false;
! q$ ]; `3 u. M7 N) [! ?6 |3 m @.DrivingHome := true;( F. [* q3 j( e
rgManager.tryToStartTransOrder;0 F4 q% O1 i& A8 O
if @.Destination = void( e- ?) X; d" ?( I9 }; Z8 e: L
then -- no transport order for vehicle @9 p/ G6 ^: y1 @( s( Q% ^: a1 E: h
@.Destination :=
7 D% }# i' i" ^ rgManager.nearestFreeStation(@,track.~);
5 q V! c5 r, k9 ] newDirection(@);
6 j m. |* k# J B4 \9 L, r+ V if @.Destination /= void then0 `& x7 ?9 A0 |4 l s
@.Destination.NumReservation :=6 `% ?# G* L2 ^5 W6 l) n1 M
@.Destination.NumReservation + 1;
9 n) w9 Z7 @1 {( O! t end;* ~) Q( D+ @8 m1 v6 G
@.CurrIcon := "drivingHome";! N7 J6 J3 a0 ~; Z4 w2 p/ ?1 x9 b
@.DrivingHome := true;
; k. \( N$ W! U3 h$ }$ F end;+ Y. @( k' t0 K5 q. i/ p. f" W
else -- the vehicle @ is empty, both vehicle and part are in the same dock station/ E+ k0 ?0 F5 H \6 n% K- P
part := @.transpOrder;! L) A$ J) M, W5 c3 X# y5 ]- b
part.move(@);-- load part* r! |7 g6 G$ R/ U* G
@.CurrIcon := "load";
" @2 O4 m1 t3 Y6 h1 P H5 m. s GlobalDistObj := part.globDestination;6 g' S& Z: K% s9 R2 x. a
assignLObj := rgmanager.rgAssignL;
0 G" i% Q H: e R' Y row := assignLObj.getRowNo(GlobalDistObj);9 p$ S8 I3 S1 u* P% I$ }' @0 Z2 f
if Row = -1 then -- since 70
6 f* F7 E5 ^* v3 f+ S if lan=1 then, M( A& n3 b: l9 d$ f
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
8 c! j+ r8 v# O0 `! C to_str("in der Andockstation: \"",?.~.name,"\""));
q `0 b t# V4 n else
0 @7 K, ^! l; V8 } V s; }: ` promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),6 Q# D! o& l$ @9 s8 K! b' U9 ^5 M# o
to_str("in docking station: \"",?.~.name,"\""));
/ i7 W) M' b# f7 E C9 @2 X1 H end;8 |0 c2 X* C0 v9 X9 x
else+ E( Q- l2 M/ P" D+ k0 Z! w
@.Destination := assignLObj[1,row];1 _7 ^: Z4 X# n' w7 w4 v2 f- t- l9 V
end;
! ~" _# k ~- w$ _* j/ n newDirection(@);0 H! w& h( g9 r1 ?
@.HasOrder := true;% p/ t) `2 T+ }1 i
end;
$ G1 L2 d* y. z6 c4 ] end;# d5 ]. Y2 t$ C: e
end; -- of the method* e+ f8 z# v6 U4 ^
|