/* called by: entrance ctrl of the object 'track'7 K9 g$ _2 D8 q" D: h0 q+ {
*/ O+ s) S; {0 u2 v% }( N) k
is
) Z- x9 h- u3 d! o: O4 L part, GlobalDistObj, assignLObj:object;row,Lan:integer;2 G2 q1 H7 e0 Q \+ }
do
9 d+ j; L" w9 m9 z Lan := rootfolder.Internal.Tools.AOLlanguage;
" _, y1 z. K& ? if current = @.Destination -- else return% j1 O7 c( I8 I" X& m
then
) A# D: b9 g& P4 W( N' | @.Destination := void;
# e0 D2 c! z' Q/ X' B5 j if @.occupied then( v% g2 i/ n. {7 U( p/ e7 G
part := @.cont;
3 j2 H" T6 D) M7 ^3 q; V2 `; b @.transpOrder := void;
+ R, X9 G3 b, h& b6 R! G part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
6 [$ x! S6 n! Y @,root.eventcontroller.simTime);
Z" p. L7 q6 H/ x8 k7 |' f% g @.HasOrder := false;% A! R, ~: Q6 C/ |. x7 x- P; h& _# ?' a
@.DrivingHome := true;
+ M! v7 }& P, d; |) v7 s rgManager.tryToStartTransOrder;
0 T+ G/ v4 s8 C; |6 n" V- | if @.Destination = void8 s) O9 V# V1 g2 u% r* i0 C
then -- no transport order for vehicle @
9 ?6 }% D& ?$ r& N# p @.Destination :=: y. l+ U, Y# P, `: H" h* P3 }5 P
rgManager.nearestFreeStation(@,track.~);1 B2 k2 k; q5 X& y; A8 S. g
newDirection(@);
! {" D. s7 B7 K. w% u4 [) E0 s if @.Destination /= void then5 R: {8 i+ Z* N
@.Destination.NumReservation :=1 t; B. k5 Y% L4 Q! U
@.Destination.NumReservation + 1;
2 m; b0 C% U! _4 n9 W1 y% L; E end;8 D, T" P* d! [6 B% {& y
@.CurrIcon := "drivingHome";5 V+ H8 H1 |8 {2 a$ Z. p, c
@.DrivingHome := true;5 c+ r/ b5 p1 M, i
end;0 Y) _+ h+ F8 y$ Y" D
else -- the vehicle @ is empty, both vehicle and part are in the same dock station3 b" i& B+ b( H' v% I
part := @.transpOrder;
) M0 o2 v9 ^2 \# ?+ `6 d1 [# L, n, e part.move(@);-- load part
4 E& O5 H. R" V3 ]8 R' q e/ A. K @.CurrIcon := "load";' S0 s/ m% }4 j
GlobalDistObj := part.globDestination;
3 J" {0 q) d0 L! Z: d assignLObj := rgmanager.rgAssignL;+ `% ~+ K1 z! c, Z8 T/ k& J3 x
row := assignLObj.getRowNo(GlobalDistObj);' O3 D S+ b5 J. t: A9 [
if Row = -1 then -- since 70
( K0 \9 s% H' E% \# M' ?+ D; U if lan=1 then
: W7 Q' C7 G6 b5 L, e+ O promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),) m o( z9 o- ^
to_str("in der Andockstation: \"",?.~.name,"\""));% G+ a7 w& n3 a% R( s* ?( U- Y/ D
else
' l1 k6 k! P: d+ c* t/ ^ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),$ D. f2 d7 \0 D. |$ B/ S4 l* J/ x
to_str("in docking station: \"",?.~.name,"\"")); B5 Q7 f. t/ t6 E$ K6 t4 b/ z% r! q
end;
- h; `) s/ e9 l3 s! a3 A8 L* s; I else
: `& P# v9 Q e- P. T/ X9 g @.Destination := assignLObj[1,row];
& f2 b m. l6 G* z) u5 P; ` end;
1 w# a# ^6 P: S, N% \5 J3 j newDirection(@);, `: t5 _! D$ b9 S( B) _/ {
@.HasOrder := true;
; {1 D, m: d) e: Z, L end;
9 O M* ?$ a7 I7 F- _ end;6 Q- s% |, {2 H; y
end; -- of the method4 u$ m9 }6 q6 |# T
|