/* called by: entrance ctrl of the object 'track'
+ T; M. e% V0 `# `% C*/
1 b1 W3 K5 u2 I) r! Cis
5 L. ], M D/ P. | part, GlobalDistObj, assignLObj:object;row,Lan:integer;
o0 a0 p5 g, W8 p9 Vdo* B3 v* j( ], C! Q" K" N
Lan := rootfolder.Internal.Tools.AOLlanguage;0 A: D( }. I+ o- ^
if current = @.Destination -- else return, V% N8 A+ g2 c
then
W9 X. N! _% X @.Destination := void;
% J+ c+ G7 ?% `9 s0 }6 c) p, Z if @.occupied then* N% @+ s; s8 M Y( F- o* H1 B
part := @.cont;
4 y2 g! \/ D6 d9 w. b4 v; t @.transpOrder := void;
4 E/ l, ]( }( _! z4 k$ I part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,4 @/ M+ N! G' R! p6 p
@,root.eventcontroller.simTime);$ n# y, k7 Q; S7 {
@.HasOrder := false;
7 L1 s" S( P9 C5 b. ?$ _ @.DrivingHome := true;/ D N* h* v/ n$ y( p
rgManager.tryToStartTransOrder;
# W* f) J; a. T if @.Destination = void- h+ F& N O4 d/ ]7 @# ~
then -- no transport order for vehicle @! I3 x1 j0 x2 f" i* B. d& D: h
@.Destination :=
0 u9 ^+ A9 p. F rgManager.nearestFreeStation(@,track.~);/ |9 p2 y* P7 d; p4 @
newDirection(@); 5 d- |% S6 z' |1 D; L
if @.Destination /= void then+ m; W3 |) I' C/ _3 T9 _
@.Destination.NumReservation :=
$ T; O* g! s* p% i" c; z @.Destination.NumReservation + 1;
, [$ o0 {0 u! `- M8 ]4 j+ E end;
5 ]( f- d3 ~" f4 C @.CurrIcon := "drivingHome";
1 |; G% K) s+ ^ @.DrivingHome := true;
: F; Q: G6 w9 A9 H6 \" |/ g end;
+ s% e/ ^1 q+ M+ p5 e* } else -- the vehicle @ is empty, both vehicle and part are in the same dock station, S, U6 x6 v* _! m( r
part := @.transpOrder;
4 Y( V2 B2 W# f4 [. [( |8 _. l part.move(@);-- load part/ m. q) p+ x, `! X" D
@.CurrIcon := "load";
% e- ` S* ]( T GlobalDistObj := part.globDestination;
9 u X- I, r9 x+ ^! h) I q assignLObj := rgmanager.rgAssignL;1 e" [9 @% T, \0 S
row := assignLObj.getRowNo(GlobalDistObj);
; H$ q2 y! U. M5 D2 z if Row = -1 then -- since 70$ i. w$ J' ?; j8 {, e |$ J
if lan=1 then
; p/ c4 v) O' y( V, n' d promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
+ C. s, y& J5 a' H to_str("in der Andockstation: \"",?.~.name,"\""));4 t: l/ o& b. \1 P9 U, W5 i
else
0 U" V9 [' J+ @( U5 N& d promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),+ {( \ H# [7 Y# I3 i* J* {: F
to_str("in docking station: \"",?.~.name,"\""));
; S6 j) R3 H- M end;! v" V+ v( n+ C
else
( z. v# `8 K$ y @.Destination := assignLObj[1,row];- U& [- ]% o& T
end;
2 g& Z: ~! }( d n" A6 n6 G newDirection(@);
& P% Q2 k. V+ l( x" V5 z @.HasOrder := true;
+ E, P8 z' a4 U, K2 m4 j end;8 g( h( J: T, v$ f+ I/ @) G, K5 M
end;1 K: K2 A4 g2 W! R [
end; -- of the method
3 V) \0 g4 W* s4 w5 J5 \# W+ k |