/* called by: entrance ctrl of the object 'track'8 a7 y# h' k% [4 u; Q, x2 p
*/
; _+ q$ C$ P' D$ o/ x$ r9 Uis
1 \# V2 H. k1 }; o% q part, GlobalDistObj, assignLObj:object;row,Lan:integer; ^9 U! t. |0 W* r4 B: N% A
do5 a6 e- r4 f' m# `1 T1 _* l
Lan := rootfolder.Internal.Tools.AOLlanguage;) M4 R+ c7 |5 F( n
if current = @.Destination -- else return
9 C! q& L& @; z2 P& E then$ F8 {6 C: i+ b" c
@.Destination := void;
- d/ [$ Y, F" t/ h- y if @.occupied then b3 W7 h7 q' b( K
part := @.cont;
& L0 G0 S7 T, i o3 l @.transpOrder := void;/ c" q/ G. y, |7 f# W1 V |4 F
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
1 b6 I7 z9 f5 M @,root.eventcontroller.simTime);/ X% M* T* j Z) Q; t5 f
@.HasOrder := false;
- K# ?/ w! {0 \1 T- J8 m! _) g @.DrivingHome := true;
" R. _) Z; R$ S4 B! a rgManager.tryToStartTransOrder;5 k2 X. z4 _7 e6 p8 C8 F
if @.Destination = void) c& a0 x) N* m/ C5 j4 M- D/ S
then -- no transport order for vehicle @8 e1 P4 J) O$ j4 n- Z; ~
@.Destination :=3 v8 c: W9 r P& n; v
rgManager.nearestFreeStation(@,track.~);" K% ~! S6 n ]! _3 H% U
newDirection(@); & Q- `% u" Q& X' y1 M$ ~' q
if @.Destination /= void then9 t! _2 }9 w/ ^( |& k; |
@.Destination.NumReservation :=) O" j2 N9 s+ z/ S1 y ]
@.Destination.NumReservation + 1;; p& }9 Y* @: f
end;
2 `3 n/ K% a* _. P$ H) T @.CurrIcon := "drivingHome";& \) s/ Q' u2 L* O$ l" c
@.DrivingHome := true;2 Q* h) U" x5 X% C
end;' y2 z8 E9 m2 x, r) \# c
else -- the vehicle @ is empty, both vehicle and part are in the same dock station) i3 z1 T2 f2 C/ ^" |, K8 c, W3 j* P
part := @.transpOrder;1 |- S/ P1 {1 [9 Z
part.move(@);-- load part# H) e E) t2 [+ p7 t9 h2 P
@.CurrIcon := "load";
; G D) ?6 `% p- ?, c2 D GlobalDistObj := part.globDestination;
9 b ~8 k# `3 h3 i/ I0 U( s7 t assignLObj := rgmanager.rgAssignL;
6 ?7 h b# g. {. E row := assignLObj.getRowNo(GlobalDistObj);
) p \' i7 L( \. [' g if Row = -1 then -- since 70, R, {$ `! q" J2 Y( H
if lan=1 then
! S5 ]7 K* P( J/ `1 l$ W3 s% ~ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
0 }3 h- X: u! x4 c7 b to_str("in der Andockstation: \"",?.~.name,"\""));
- o, w2 ?. c, T# L9 U% ] else0 W( O/ O3 p* C3 ~0 X
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),8 T2 S# P1 Z9 a. @
to_str("in docking station: \"",?.~.name,"\"")); , t; y' t, }" L7 F5 p
end;
( i5 J2 z; S% @, e1 u% z+ ?& a9 D else
% ~' o* f9 E8 h @.Destination := assignLObj[1,row];3 |( `9 s9 D# @) J4 a' _# e, n& f$ K) X$ w
end;
/ E& h s! M1 y newDirection(@);
/ h7 N$ H: M" b2 ?; u @.HasOrder := true;. \9 f; g4 C6 ?. P k
end;
/ h, `$ @' H! d, _ end;
) S S8 ]+ W+ a# lend; -- of the method
+ J% L, L W& o% q- K: w |