/* called by: entrance ctrl of the object 'track'
- r9 g5 R- Q$ n. h*/
, ]% k$ r! K" g( j) Q+ sis
: ?5 U6 `1 F7 p$ j8 C0 j part, GlobalDistObj, assignLObj:object;row,Lan:integer;+ s; |* Y; y9 k! F/ W
do% R+ g$ S% ?3 v* T1 y
Lan := rootfolder.Internal.Tools.AOLlanguage;
; C. H: K m+ d% E+ T0 | if current = @.Destination -- else return: `, ~% B. m% F$ F/ ^: r
then7 r2 Y3 c; l' H4 z
@.Destination := void;& V- r5 X2 {8 d7 I8 V$ E/ j% z
if @.occupied then
: X) d/ |, h U: d part := @.cont;, G! w, T ^/ W& _$ N8 T
@.transpOrder := void;5 u5 Y, P5 \, O X4 q4 R
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,6 h. @3 `9 x5 @
@,root.eventcontroller.simTime);4 L; I$ Y8 H& V7 i4 X) b3 ` B
@.HasOrder := false;6 S8 t: ?7 g% |4 {- _+ N) m2 y _
@.DrivingHome := true;
) N+ V/ f/ U! E: Q# Z* v rgManager.tryToStartTransOrder;+ v. O) s# S* V2 w1 [# h: n
if @.Destination = void
9 \/ e/ ~* x( \" X) j {. k then -- no transport order for vehicle @; W4 ~$ A0 S# @- h" W3 w2 x8 s
@.Destination :=$ Z4 D) y( V5 B( Z5 H s$ v
rgManager.nearestFreeStation(@,track.~);
' u$ f$ _9 m& \0 I. G8 W newDirection(@);
Y! z; k% R! K. {& u- F1 b if @.Destination /= void then
4 Y2 f* E9 p& Z9 \! C: I+ U @.Destination.NumReservation :=
* L6 K0 d* H9 { @.Destination.NumReservation + 1;
9 M* L! |$ `0 Q, @0 U end;; a7 }! `+ U$ V" w2 g, D5 d6 A
@.CurrIcon := "drivingHome";
, A) \0 T+ y+ J# e% ~* x @.DrivingHome := true;
! k% A1 t6 w5 Y, v end;
# H, \1 J6 k$ g: w. u8 k+ K else -- the vehicle @ is empty, both vehicle and part are in the same dock station
; P3 C" S# F+ F3 R& `" j! D: d9 e part := @.transpOrder;
9 \3 o/ b5 x# S/ h part.move(@);-- load part
) O2 [0 c$ F% u" X# } @.CurrIcon := "load";5 F. E7 z! N( B9 _/ }7 t3 F
GlobalDistObj := part.globDestination;
; e7 S! q) Y9 ]) ]; e! n assignLObj := rgmanager.rgAssignL;
6 y/ p Y: r n* j u8 |2 h* t row := assignLObj.getRowNo(GlobalDistObj);
' r6 \4 U# d: Z) o3 H6 k if Row = -1 then -- since 70. q- _3 E7 B# y$ Q$ V$ a0 F4 c
if lan=1 then
+ o& a3 O- M, \) X promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
+ j" E5 X& P; v to_str("in der Andockstation: \"",?.~.name,"\""));
( r# s# }1 J% c' ]- S. S else
1 r- K/ ]& e* K- p9 ] promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
0 o' q9 N7 a/ x0 f: X7 ^- r# ] to_str("in docking station: \"",?.~.name,"\"")); . ]9 l4 F, V5 h1 ]8 i
end;+ D) r# S9 N7 `
else* s8 Z5 M, f' d6 J; Q
@.Destination := assignLObj[1,row];
: z1 N# J$ W% I! T$ m- L/ K; [ x' K9 U end;
% }6 p* M+ X, X$ |5 K newDirection(@);
6 H9 c' q+ p J" ^4 o' C ^- N @.HasOrder := true;9 c! H. @5 b0 z& t5 n K
end;
3 R' s5 t/ ]1 A6 u! c end;! O3 x7 M5 z* t
end; -- of the method7 v6 f+ S3 ^- ^% I
|