/* called by: entrance ctrl of the object 'track'2 A4 B0 H0 g7 n3 w/ Y( n) ~
*/
- H) r6 K1 J: G% ~1 v. a' K1 l+ b3 Nis4 F2 i D" \* x; X( C
part, GlobalDistObj, assignLObj:object;row,Lan:integer;# X) n V* l4 Q2 I9 f# y
do1 I/ H' F) P3 T- ]" W& }0 L
Lan := rootfolder.Internal.Tools.AOLlanguage;; ]- y7 d( {6 T. O0 | `$ s
if current = @.Destination -- else return
" F x7 m4 c# b7 y' g then8 p) L; E1 ^! [6 \% l
@.Destination := void;
+ I- H3 h% }3 |1 j if @.occupied then# s6 A9 F3 }; S- r: c: Y: q
part := @.cont;
) C3 V) F& n, ] @.transpOrder := void;
; Y# U0 D( `6 z% Q) ?2 c: ? part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,' H, V' D5 L, f. m5 ?
@,root.eventcontroller.simTime);
; P+ V2 K/ d* m( w6 n% T$ N* | @.HasOrder := false;4 J# E+ g& ^0 \' x% q1 ?
@.DrivingHome := true;3 t& t. n D* W w6 V- A
rgManager.tryToStartTransOrder;
! r* p% X$ I$ L g( R) o! \# B if @.Destination = void* ~+ v P4 k* _' f! f+ R
then -- no transport order for vehicle @( k/ [. r% [/ e" j
@.Destination :=2 A8 Q/ r7 R) O# Z
rgManager.nearestFreeStation(@,track.~);
8 e# P h, k- B newDirection(@); - e0 t5 x. ~0 H! a" q. s6 e
if @.Destination /= void then8 `6 ~9 @6 b; u4 i3 y* {
@.Destination.NumReservation :=7 B' m! G2 T* y
@.Destination.NumReservation + 1;6 Q" V z j8 B
end;) l' y# M8 o5 Q" e3 G
@.CurrIcon := "drivingHome";
5 f7 q# q! Z, b, ~7 x& ` @.DrivingHome := true;( t' M7 [: ?% F& @5 L9 _9 ~
end;9 n9 l& r4 M1 M+ j- N1 `: ^8 {3 T
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
. C# u5 L# N+ q7 ?& w( r" e part := @.transpOrder;
8 P9 J3 G9 n8 y1 H/ m part.move(@);-- load part% Z) U4 ^9 t! v3 `- \5 v& M/ y7 c
@.CurrIcon := "load";
6 A- E5 [' E9 d5 A* Z# b GlobalDistObj := part.globDestination;
8 i$ i1 `7 f8 ~+ K) B assignLObj := rgmanager.rgAssignL;
4 t7 |2 S& X" i1 l; J row := assignLObj.getRowNo(GlobalDistObj);
& [, W& w* @; w( v- D u* t if Row = -1 then -- since 70
) q4 M6 N& a Z+ k if lan=1 then' A8 t2 e0 A2 r6 m
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),8 W" Y* T# D, L! A. o" G; s
to_str("in der Andockstation: \"",?.~.name,"\""));
: l0 J7 v4 g9 c4 n6 G7 w% p else1 J8 i7 Q# h' P- {" f
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
5 {& G9 z, U' `' w0 r: D" I to_str("in docking station: \"",?.~.name,"\"")); 8 U) Y( ?7 |) W$ q8 c. E% S
end;
' I9 z( d4 j% p& |$ V. q0 i, L else
# g8 [4 l0 s; z. S6 l4 d2 K4 N% ` @.Destination := assignLObj[1,row];, H5 z/ u4 l" V, @6 A
end; ; ]! j2 H4 U+ h5 }9 K' p
newDirection(@);' t A( i6 A) E, A, k; v
@.HasOrder := true;8 V, T, `5 o- ^1 H& n o7 W
end;! ~3 h) d# W# d) O7 j
end;
x4 i# q x2 @& h9 s! kend; -- of the method
! u$ L3 b: Q5 f8 u I |