/* called by: entrance ctrl of the object 'track'
/ b, e9 n8 a8 d9 T; U5 l*/$ y4 e9 i9 Z) p5 d& B
is
- L2 _! c" Y# @: k1 |; e part, GlobalDistObj, assignLObj:object;row,Lan:integer;$ q: l1 `! h6 `, D9 M
do
3 T9 ^+ T$ H4 Q Lan := rootfolder.Internal.Tools.AOLlanguage;8 a* a1 z5 T N3 m( v8 e0 ` _' @
if current = @.Destination -- else return
2 o/ o' t, ]. @6 s0 j6 Z' U2 Q then9 c8 e7 `: F* g7 V8 [" E+ `: k F- H7 ]
@.Destination := void;
- k) b" U, F$ i* ^# v if @.occupied then
' i% ^4 V- w! `* C7 Z% x: N) E- s part := @.cont;; a7 q1 R1 ?+ {* c& Y4 Z
@.transpOrder := void;
) _ S9 Z" |* Z D0 V8 L part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,- v6 L+ M' a, Q% l2 S: s1 e! a
@,root.eventcontroller.simTime);; q$ u, ?3 S: V6 g
@.HasOrder := false;+ I* t2 w8 h9 L( I* ]) T1 ~: }7 c1 L
@.DrivingHome := true;7 j: K/ I9 J% Q" a9 W# J* O$ o
rgManager.tryToStartTransOrder;$ i* {8 `+ j8 |- i
if @.Destination = void1 K4 B' K. v' H2 l: V+ o' T: t+ M
then -- no transport order for vehicle @3 X( K m- _6 }
@.Destination :=
, X; a' u; t" B rgManager.nearestFreeStation(@,track.~);
* e1 d6 n3 A ]' ?8 F newDirection(@);
9 |2 s, q- E; [* c if @.Destination /= void then6 \) }/ n: B& v, P. ]
@.Destination.NumReservation :=
! c8 G: F7 k! n5 X `0 C+ Q3 P @.Destination.NumReservation + 1;
3 t* P }% F6 ?- T- d0 m end;, w! Q9 E, Z z9 [$ M+ r
@.CurrIcon := "drivingHome";5 s1 F! K2 M0 |5 U1 S9 P
@.DrivingHome := true;8 b m! C* n; Z8 Z6 ?: y
end;
1 r0 |6 ~7 F6 z2 D. N4 @2 l else -- the vehicle @ is empty, both vehicle and part are in the same dock station2 A" c& j9 q$ Q1 w# R
part := @.transpOrder;, u- n+ k2 W% P' t# F' V
part.move(@);-- load part
# F4 _+ m9 ]. t @.CurrIcon := "load";& G1 u6 u* u7 n3 }
GlobalDistObj := part.globDestination;
; F8 N* ]5 B, t! Z' ] assignLObj := rgmanager.rgAssignL;: v) z7 o# T! c. \0 {6 v& B
row := assignLObj.getRowNo(GlobalDistObj);
2 w9 Q7 `% m8 M0 m if Row = -1 then -- since 70
5 R# j* P3 U' E$ _. g, @ if lan=1 then! x4 w0 G# b# J/ }6 K7 e' C, Y
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
; ?; i( M* ^3 N1 ]' E. h to_str("in der Andockstation: \"",?.~.name,"\""));9 L# Z* _& z1 b0 ^) k# B3 K) p5 s+ g
else
5 q7 N. d0 o4 ]2 o promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
9 N9 _' q2 O- x! ` to_str("in docking station: \"",?.~.name,"\""));
1 M8 j6 C9 O: i7 @ end;! i4 a" K# z" _: i
else
$ b+ X$ ]& b C$ u5 q4 R8 g5 |. b @.Destination := assignLObj[1,row];
/ u/ l: T v# Z" Z3 ` end;
/ D4 \) I0 _! k% |6 X newDirection(@);/ d6 }. W' G& l0 Y n8 e
@.HasOrder := true;3 M, i- ^, d2 s* l( _/ e& Y; u
end;
% H g! R1 I1 L4 m( v4 x: q. c2 F end;/ c) G( I. x7 m
end; -- of the method- x' F2 @8 p: V& S) Z
|