/* called by: entrance ctrl of the object 'track'' l$ R& j4 D7 u+ Z6 s
*/3 S5 Y( V& L2 G% f5 O! }. z! ?* G
is9 c; |3 j# R0 r/ S) l$ \; i
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
% j7 n& V# U+ [* H0 m: Wdo8 ~8 ^9 X3 o, f1 ^1 q5 P. n
Lan := rootfolder.Internal.Tools.AOLlanguage;
" N Y. ?& l+ L3 _ if current = @.Destination -- else return
& _6 L/ R1 H- I- ]' i, U then
% |$ R" X3 h# J" r7 l @.Destination := void;
$ z- P6 E O2 g9 q0 o3 H& S2 S if @.occupied then
/ ]# ~+ O5 t# q$ I. ~ E part := @.cont;
7 E7 ]4 k! y) q( m" O0 Q4 ` @.transpOrder := void;" L6 L6 Y \; l# N0 |1 u* W
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1," `, Y* T; b- C' A
@,root.eventcontroller.simTime);- N& Y; Y- a# e
@.HasOrder := false;" {5 |$ u; E! Y
@.DrivingHome := true;
) R, l0 h, `+ C rgManager.tryToStartTransOrder;
/ X y5 N; N2 F9 ?. h& K# s if @.Destination = void
/ i$ _7 t3 X4 d9 v0 A9 j q then -- no transport order for vehicle @
* _: w0 H! ~; l$ I5 @ @.Destination :=' {# j' ~' ?0 U: [# ]8 t, [* t2 H
rgManager.nearestFreeStation(@,track.~);$ P# c( k+ g' F3 Q! p
newDirection(@);
' R3 p" X+ j' K% N if @.Destination /= void then
[* a( k* l8 e: W0 U/ |& }& y2 p @.Destination.NumReservation :=) a2 f6 V+ J4 m
@.Destination.NumReservation + 1;
" ^4 g6 _3 t# g7 m% I end;
* u R' V `) V) A @.CurrIcon := "drivingHome";# H; i7 E$ I+ o9 [/ L0 e
@.DrivingHome := true;6 z: C; _3 K# `- k: D5 }6 q
end;$ [5 ]- w4 t; V6 t' K
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
: Q# c& U9 c+ h L part := @.transpOrder;- J9 ]/ F7 E* h
part.move(@);-- load part/ e3 U) u& y. \
@.CurrIcon := "load";; G" w p1 ^, I2 T2 r" K9 Y
GlobalDistObj := part.globDestination;
: O7 v" @+ N- s assignLObj := rgmanager.rgAssignL;
/ ]$ ]8 T5 Q( f row := assignLObj.getRowNo(GlobalDistObj);& z( g% n6 Q, K( g7 X
if Row = -1 then -- since 70
9 O; u4 j% y( J$ G8 ~2 l if lan=1 then
/ T& R$ s( u! a( R: C promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\"")," u" M3 B6 J. y2 ~
to_str("in der Andockstation: \"",?.~.name,"\""));9 p* m2 o: U3 ^ ~8 s; W1 G
else/ A3 W& |& N/ P; p! U
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
' l8 Z2 H% t0 \5 r( P/ Y) s to_str("in docking station: \"",?.~.name,"\"")); # k! C& r5 a4 `/ i5 _- w- W
end;% b& p9 I3 @; S$ N2 S
else. u4 r3 k% b6 S9 ~ P5 K6 u
@.Destination := assignLObj[1,row];0 a% P+ L+ O) I% e
end; 3 w3 J! L; r0 ~+ M
newDirection(@);0 b' F z. {- ?3 L) X; ~9 k9 T
@.HasOrder := true;
; q. @% @2 @7 `- ^& @0 { end;$ |' q& Y0 E W1 P
end;
& c- R% T/ n9 t7 ~7 @) ^8 mend; -- of the method/ _# X2 {. L& l, p0 \- x
|