/* called by: entrance ctrl of the object 'track'! @$ M& F1 R% ^6 H
*/1 q. O; Z( f# e' ?! _4 t5 |6 s: Y
is
, _3 S9 A# @; l* R4 k part, GlobalDistObj, assignLObj:object;row,Lan:integer;9 I; h9 g: x9 Y: \9 N0 `/ E/ E
do( b) D6 Q- k- c6 I: i
Lan := rootfolder.Internal.Tools.AOLlanguage;) w6 {. |. t( F. c8 h
if current = @.Destination -- else return! q0 f2 _/ L5 b. h( v6 \( m
then
1 B) N: Z6 m3 `& E @.Destination := void;
: Z1 A4 `6 S% \ if @.occupied then
5 n* N0 h- T2 P- ] part := @.cont;
. E: n% u' m' X# x6 X; Q @.transpOrder := void;
: T3 _7 k/ @' @7 ~. [1 U part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,8 K$ G1 x7 p, b$ v& ^% a
@,root.eventcontroller.simTime);
/ s* q c: w- {( E, s @.HasOrder := false;; z2 [1 y- K/ z! m& R- g3 @/ f
@.DrivingHome := true;
% q# m$ Z, s+ j2 ~6 a# T0 h rgManager.tryToStartTransOrder;
; K( Y) h2 n$ g0 n. P if @.Destination = void
( B ?' m2 ]. m, c then -- no transport order for vehicle @( x8 q' u7 M6 |1 R! ^
@.Destination :=3 O8 v+ Z; b5 L. o- E3 P
rgManager.nearestFreeStation(@,track.~);* B# P6 b* O! |) [: A0 J
newDirection(@);
9 `" G2 O) N% C1 ~' \! Q5 V7 |# g if @.Destination /= void then
1 p" U+ E4 E8 g' e @.Destination.NumReservation :=- u8 i5 b$ N0 S/ S
@.Destination.NumReservation + 1;" e2 q5 C$ T& d. }' _; W
end;& P1 f& i( ]2 U& \
@.CurrIcon := "drivingHome";1 l5 c8 q4 s& e. ^5 |. r8 E! h7 n7 Z
@.DrivingHome := true;/ g! z2 @9 O* I; e# |7 }
end;* S9 _; d! \/ w4 |
else -- the vehicle @ is empty, both vehicle and part are in the same dock station7 U; e2 N. J9 a. V- c6 p
part := @.transpOrder;
1 E0 p! `: n n8 Z part.move(@);-- load part
% y8 Y# p8 |3 r5 v @.CurrIcon := "load";
* L5 v0 X0 e# M/ N GlobalDistObj := part.globDestination;% X& | Y3 D2 m% Z2 P
assignLObj := rgmanager.rgAssignL;$ r) n$ R% c r- n# B
row := assignLObj.getRowNo(GlobalDistObj);
- G5 P6 c) E0 r: C+ ^& F$ Y8 L if Row = -1 then -- since 70
$ a; ^% H9 Q4 D3 g( q if lan=1 then+ }) h# [1 }0 J9 e+ y
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
" p6 l' X6 B8 s: [! V& X7 j% V7 U to_str("in der Andockstation: \"",?.~.name,"\""));
2 B! f1 ~8 v- I$ Q else
" d" r6 i% d9 n1 g# T; q; v promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
( B* p. P4 M4 Y" g( d to_str("in docking station: \"",?.~.name,"\""));
! [% F9 U) n; m end;
8 {1 T9 ~; w- R1 T, ^ A% u/ a2 e else5 W- n& Z( k9 s% _
@.Destination := assignLObj[1,row];
0 M9 W8 D8 F- N2 ?3 t: J% ~' I+ H end; 3 T* Z3 i6 A1 r" K
newDirection(@);
Q0 m4 A/ |8 n s: w @.HasOrder := true;
7 n: _& y' D5 H4 l" W; m( B" H end;
- S1 w: u1 S& i d2 h# c end;
$ |5 b# f6 U8 j& x) A2 P9 qend; -- of the method
6 Z/ J6 ~4 u) v5 T5 f |