/* called by: entrance ctrl of the object 'track'! A+ _. D; G6 [. ]7 Q) i
*/; W' l( x0 d8 ~
is
& I U* K8 k# C5 ~ part, GlobalDistObj, assignLObj:object;row,Lan:integer;5 X# d. e' V3 Q- |8 ^& N
do
- u6 c7 J( b: H: A8 X9 V. @) E2 w Lan := rootfolder.Internal.Tools.AOLlanguage;& a7 G! h3 D' d. {8 p% C
if current = @.Destination -- else return
2 V5 K: G2 n u# R3 e; ` then
; v* C! n4 F7 d$ ?/ G @.Destination := void;/ F! y4 E0 T2 f- _
if @.occupied then# @7 R ~& |/ n' K# u! C' W
part := @.cont;
' b P1 u% e: A9 V @.transpOrder := void;& j" ?+ T6 ^& J; Y1 A! u3 F d+ x& [
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,3 h6 W6 F: r) F
@,root.eventcontroller.simTime);
7 m M7 D. j; I0 p* ] @.HasOrder := false;
) W9 ^% p z- \! e @.DrivingHome := true;
; l3 b9 m' q! ^& X0 I" G rgManager.tryToStartTransOrder;
% |$ W3 ^4 v6 p, \ if @.Destination = void
( M- X+ e8 M6 _2 E# L then -- no transport order for vehicle @
! j* R# b; \# Z/ f# { @.Destination :=$ s. ^5 [7 u& H8 S/ q3 i+ _+ V
rgManager.nearestFreeStation(@,track.~);
9 j/ |9 ~, _; b* T! ~0 J) @0 H newDirection(@);
a4 C4 q$ G: O) z& L) c0 Z if @.Destination /= void then F; x' m' h0 W; W) q" @& R: E# g
@.Destination.NumReservation :=& b( b% `# I' `$ J
@.Destination.NumReservation + 1;
! v! ~# }$ ~! A+ O( y c8 }. ? end;
' C$ a8 u3 b( d( K p @.CurrIcon := "drivingHome";
0 E" [. x* b; N/ H6 } @.DrivingHome := true;5 m; c! E: }; n( g0 S+ C% T
end;
9 Z/ E! h m& _, f) f: P2 B4 I* i else -- the vehicle @ is empty, both vehicle and part are in the same dock station
5 T. S# [; d3 l' S. M part := @.transpOrder;6 c9 y1 ^/ G& m. R. S
part.move(@);-- load part
# t# }/ n4 b, n+ A! h# P) y% V5 b @.CurrIcon := "load";
) t7 ^( T6 ~, l" L) ~ GlobalDistObj := part.globDestination;; `) k" r% P; c8 r
assignLObj := rgmanager.rgAssignL;
2 k! m, D' d2 ^8 y8 D row := assignLObj.getRowNo(GlobalDistObj);
( r0 r% ] a: K) z* I# O, a if Row = -1 then -- since 704 d4 m9 E c3 Z, B5 Z4 g. a
if lan=1 then
, _3 w! X% q5 m9 Y7 Y- ^6 y promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),1 N5 u& D: C+ T3 Q7 b4 C
to_str("in der Andockstation: \"",?.~.name,"\""));% Y9 n6 z T& {1 R' c; |
else
2 L# J' c6 O4 S1 P8 \' O6 M" E' G- ] promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
3 a1 G) d8 Q5 l to_str("in docking station: \"",?.~.name,"\"")); 9 Z7 }3 {3 C( G- f1 [2 o* w/ M
end;
9 L( P8 o! Q2 X7 B' K4 z2 {' [+ N% ` else1 ?4 Z4 Y" s1 D- {1 G, L/ C, i$ k9 ?
@.Destination := assignLObj[1,row];
$ a; m" }0 U7 ?4 w D end;
7 X! E! o$ g) T2 Q6 |) A newDirection(@);
* ^2 i( n8 L- }( B' ~. u% a @.HasOrder := true;
1 W$ o; X& i$ D. m4 h: h end;, j! j- ], Z i
end;' }5 ~, `2 R# L5 v2 |. P
end; -- of the method5 l: o# q- y( a) H$ e& b6 ^! i
|