/* called by: entrance ctrl of the object 'track'; o& ]" g2 u7 ?, H( C" Z0 s1 D$ _
*/
3 r: F" z2 A9 N- O8 A* His
) }2 ^+ |2 O7 t7 Q3 }: I; M/ L# p7 Y part, GlobalDistObj, assignLObj:object;row,Lan:integer;
' @7 W$ |2 s; I" R" U& `; s+ `8 D7 fdo
5 @7 Q$ M# ~" e& a( W8 b Lan := rootfolder.Internal.Tools.AOLlanguage;9 n2 r7 _# u- k! @; }" s* N8 y
if current = @.Destination -- else return: x1 E$ V7 S8 h
then
. Z( y3 T1 |& O) W- s; @4 U @.Destination := void;
8 k! v* F$ g, ^9 X& f# U if @.occupied then" ?: [2 `2 K. c8 z2 I8 t, X
part := @.cont;
6 p* B- E$ X; A% }+ `2 O9 B @.transpOrder := void;
" D8 S: L+ E% K/ s3 }' q' s- H part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1, \, |! o- j6 J: C
@,root.eventcontroller.simTime);
]( g: p0 k" v4 X5 X @.HasOrder := false;6 W/ y* Q9 e- R3 ]+ D j& H: \
@.DrivingHome := true;
. v- {: m6 z/ E, w* ] rgManager.tryToStartTransOrder;2 H( Z0 v" ?6 s, n" N# f# C& l
if @.Destination = void
5 t8 p+ v4 p+ ?2 i2 t4 H then -- no transport order for vehicle @
+ v# t6 L" J% i; @ @.Destination :=& |& C; a) w. U) o- _# c: r
rgManager.nearestFreeStation(@,track.~);% o2 ^" x' M# p1 D \- n0 g
newDirection(@); ; f) t& f* }4 u! g
if @.Destination /= void then
5 `. [) n& U9 p. z4 C3 s; m3 e5 ~ @.Destination.NumReservation :=6 z" u2 o! f4 f& g
@.Destination.NumReservation + 1;' u" i2 G6 a0 {! w9 f2 a( @
end;
' y( f" c- u2 W2 [9 N @.CurrIcon := "drivingHome";' r7 ]0 C. A3 u* D% L( D6 `
@.DrivingHome := true;* s8 d! J' T# p7 ^3 |
end;
6 _' W* X4 ^: |* p else -- the vehicle @ is empty, both vehicle and part are in the same dock station& U$ [# k' H% H3 c. z( i4 X
part := @.transpOrder;. ^, Z3 \- I ]0 U
part.move(@);-- load part5 K- @2 B+ c! \/ X. m4 d
@.CurrIcon := "load";
+ l" B5 }8 M5 B+ M GlobalDistObj := part.globDestination;0 B( ?0 U z+ p" X4 U% W3 p3 `
assignLObj := rgmanager.rgAssignL;; I! _: F% T; y# }8 Y' B' u
row := assignLObj.getRowNo(GlobalDistObj);2 K6 P6 F# ?( Y' [
if Row = -1 then -- since 70: w$ ^$ d0 @- j6 [- U M
if lan=1 then, U' S8 B) I$ H/ n2 C9 ]( ~
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),. x+ ]% @ i% @7 [
to_str("in der Andockstation: \"",?.~.name,"\""));
' d: w! f! s5 f, _; F& e* K3 I else
9 X0 P% M0 ^9 G/ S8 ?+ S promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
6 U2 w+ \ [4 D7 ` ^, ~ to_str("in docking station: \"",?.~.name,"\""));
3 Q% B% B+ I/ D. q* c9 e end;4 Z# [1 H2 r# \ |+ E
else# r& H3 H! V" Q g, m9 ]$ z8 K! d! r
@.Destination := assignLObj[1,row];5 f) r' K8 Q' z4 [9 b+ h8 k
end; : a0 r6 a/ n' t
newDirection(@);( O" H6 R) J2 Y( t! e A R6 `6 h
@.HasOrder := true;4 \( ^ Q. J" y& |3 [
end; F* N8 m/ o8 `; |/ y
end;& U% e3 t: b: N0 w
end; -- of the method
9 m, O4 P/ v3 q# n, N2 m8 Q |