/* called by: entrance ctrl of the object 'track'' q5 h5 J+ q5 a/ b' h" o& F
*/; s; V! [& l3 \' u, `, W
is
7 j: a8 y/ `4 B% F, S% d part, GlobalDistObj, assignLObj:object;row,Lan:integer;2 Q/ k. @" e& J4 H7 u& P) h9 u! e, }
do
3 _, e0 b% x- H4 S Lan := rootfolder.Internal.Tools.AOLlanguage;
1 l( T; B# Q' r5 z if current = @.Destination -- else return8 ~% u. e0 [+ ]- ~& o
then
7 L3 j0 k3 f* J& j @.Destination := void;+ H* P# Q; L2 U
if @.occupied then' j; H. r& R3 }
part := @.cont;
, Y! u% ~; r/ y6 Y) \- v @.transpOrder := void;
0 L' D$ _; Y8 o part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
9 i& ?+ N' _, \" X, E0 E+ ^$ ] @,root.eventcontroller.simTime);) D( T) u4 d Y1 d k5 y# ~: e
@.HasOrder := false;8 u. b. d0 [1 e- H
@.DrivingHome := true;
* k5 `; X2 w6 y2 _" ] rgManager.tryToStartTransOrder;
- e9 _. `; ?# ~8 \9 ^4 R- i/ F4 [5 ~ if @.Destination = void
% d/ Q5 M( p$ R1 h( ^- m3 [ then -- no transport order for vehicle @8 y/ P$ F9 U- ~4 k9 ^, C
@.Destination :=
0 ~8 U" s: `7 {( i) Q8 d rgManager.nearestFreeStation(@,track.~);
5 t* n$ F7 P2 [! N newDirection(@); . @2 ^* j$ a* d. }, F
if @.Destination /= void then! e7 H0 F. ~: |5 R" u
@.Destination.NumReservation :=( S( d: m1 T2 e0 s2 _( U1 L
@.Destination.NumReservation + 1;
9 Y4 y4 W4 |$ A2 _. `0 l1 K5 i end;
, T3 y5 n% L5 \- `# x @.CurrIcon := "drivingHome";
: e1 L, n3 w* r( i( g @.DrivingHome := true;
. Q2 p$ x8 p) [ end;3 v9 Z- B( n" K$ p% {$ B
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
; a$ s# a: _9 V/ u part := @.transpOrder;
0 X( l L W# ^& A# \0 g part.move(@);-- load part
3 ?6 j2 a' P" Y. f' `* ?% ~# g1 c @.CurrIcon := "load";' R1 S; j0 x) y0 I* m
GlobalDistObj := part.globDestination;
2 q/ O1 N) r2 [4 [ assignLObj := rgmanager.rgAssignL;
2 w7 x F! u5 x row := assignLObj.getRowNo(GlobalDistObj);
" S0 m: w+ L) q: k if Row = -1 then -- since 70
# @* X a* H% b2 n( c S7 X if lan=1 then
" x, s6 B x# Q promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
: a$ h$ A6 m* A- z) d q to_str("in der Andockstation: \"",?.~.name,"\""));+ O9 `4 k& F" g. {3 r- p- F: V$ k
else
2 i. h+ r- j' u$ h+ K promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
$ Q" x3 u% ~0 K$ b; ]) P' S to_str("in docking station: \"",?.~.name,"\"")); 2 X5 F& B6 \2 g& j* k6 s
end;7 R! B+ X; [; c+ R( H' b ?& Q
else+ k; h) h5 ~4 _
@.Destination := assignLObj[1,row];: ?5 r, z# {" i3 l6 F9 {
end; & r9 O# Q/ U5 t, K O
newDirection(@);& Q# J1 M$ w2 s5 o" S8 C( N; P
@.HasOrder := true;7 }+ L7 E+ j2 w4 d: P1 }
end;
2 Q5 f7 I0 U! f0 Y7 \ end;) }7 M' ^/ l: t
end; -- of the method/ g' E* F3 k" p ^+ V6 F: _
|