/* called by: entrance ctrl of the object 'track'
$ v9 b6 S4 f* w2 Y K*/
! k3 m* e# e* qis
9 U2 H9 @: e1 J+ x! C/ Q part, GlobalDistObj, assignLObj:object;row,Lan:integer;
3 i- Z# S$ U Hdo. j h, O* l. h
Lan := rootfolder.Internal.Tools.AOLlanguage;$ |5 N4 k, x3 B7 T o) W" D$ B: S: ~
if current = @.Destination -- else return4 J( M# o1 G) t
then2 I; g) b" @ m
@.Destination := void;
9 A9 ^- |+ M, L) A! p if @.occupied then$ C i; Y( Y7 l0 |' _
part := @.cont;6 r; C" q! p. C+ E$ Y' `6 V
@.transpOrder := void;
% ]: K1 L; w/ ? part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,8 F( v. D! T. \. r
@,root.eventcontroller.simTime);8 B6 O$ }6 k1 V
@.HasOrder := false;
% Z' [3 P6 M) ]+ ~- B; z6 Y @.DrivingHome := true;8 o" Y8 g6 _4 i0 e7 F T3 B
rgManager.tryToStartTransOrder;
; U. R, T1 b% n if @.Destination = void; i- l f( Y& _1 R! O1 f; h" K
then -- no transport order for vehicle @9 U2 U* |: X$ i8 b# l2 F- z4 k
@.Destination :=& p9 y4 o& S9 m+ i
rgManager.nearestFreeStation(@,track.~);
2 K- n# u% u' ~ N( R newDirection(@); 7 d; c9 c) [8 m C
if @.Destination /= void then
6 `4 r j6 A' @# I: j2 B @.Destination.NumReservation :=
/ N& `9 V0 Z1 I0 n/ G! C8 }( Q. J @.Destination.NumReservation + 1;' Z$ F1 }8 I/ ]! A* E
end;& C( O3 v1 \9 Z+ m
@.CurrIcon := "drivingHome";
3 T7 `2 T" r$ K9 } @.DrivingHome := true;
, t6 \0 m$ L. c! N. }7 y% C2 b6 x end;$ ]( ^# y2 |, C7 l
else -- the vehicle @ is empty, both vehicle and part are in the same dock station. h, T# X e4 }, I @6 H9 ~
part := @.transpOrder;
# d* B1 o* A3 k2 r& r part.move(@);-- load part+ P6 t$ R$ ~3 V" q/ a
@.CurrIcon := "load";
o7 T) E& n" ^5 r: \7 ]% Z GlobalDistObj := part.globDestination;
. F) |1 }0 Z5 b: i! n1 ~ assignLObj := rgmanager.rgAssignL;& i5 U2 o% P/ B8 y& ~2 F$ [
row := assignLObj.getRowNo(GlobalDistObj);
7 Z$ J0 d8 y+ e) y2 A- a# T+ r+ ] if Row = -1 then -- since 70; M7 J! J8 {* u# v( d( \
if lan=1 then2 l& A6 R2 F i& Z
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),) ?" m( f) v: _' [0 h I. Y; F
to_str("in der Andockstation: \"",?.~.name,"\""));, ^ j T7 v: `4 F4 I" X$ Z
else
2 U7 D( c K5 J- Z promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),' q0 _$ o" p4 c; f& b4 d4 s8 @% D+ i
to_str("in docking station: \"",?.~.name,"\""));
e. h: c4 n/ I8 Y5 p end;5 D* c" f' d: R2 C* d2 G
else
' w! j# ]- L2 M: y0 h8 Q @.Destination := assignLObj[1,row];
0 d# M! R2 B$ _0 M; t& J H end; # m. j3 t) d/ k0 H' {! h
newDirection(@);5 ?, i7 [& U7 q6 t1 u4 T1 Z
@.HasOrder := true;
4 h0 f5 \/ X2 g/ x9 U9 I0 K7 v end;
/ t+ h8 \4 [2 F+ h1 A R end;
# U9 m& L1 Q7 |3 ?% a0 f) Rend; -- of the method; u) M7 ^ K$ [( W: l |. O ]
|