/* called by: entrance ctrl of the object 'track'" P M# \, k- P. z
*/
7 I6 g9 N, y' M" X5 his3 D4 P5 n) `0 k0 V. m0 D+ G
part, GlobalDistObj, assignLObj:object;row,Lan:integer; [! M t: S; }3 X# |/ T8 |
do: u% `$ \; l% N9 b! [2 ?* f
Lan := rootfolder.Internal.Tools.AOLlanguage;
0 S3 l/ c9 Q# D4 r0 N2 I if current = @.Destination -- else return
# s |! W( G. n5 P then
# _( |9 M' h! Z6 V! }- E @.Destination := void;- V; n6 j5 y* p
if @.occupied then% c% C0 R( H/ U# W! X) h
part := @.cont;% L$ m1 W: O9 b8 x+ i
@.transpOrder := void;! R2 X* v- y' r4 H1 D8 |* v
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,# i! x* N+ d- Y% n# m
@,root.eventcontroller.simTime);; N6 K: ~& g$ u. `& f5 J6 r$ Z
@.HasOrder := false;
- r6 P }7 c' a2 m" O: f @.DrivingHome := true;
B7 i7 Y" t% }8 @" I7 Q rgManager.tryToStartTransOrder;2 [6 m; e5 m0 b* a& m, j# ?7 u
if @.Destination = void
, F- ~8 w5 j) m then -- no transport order for vehicle @5 [1 t/ m# P3 n
@.Destination :=
7 L# h" F* N' a5 s rgManager.nearestFreeStation(@,track.~);, `3 b4 H3 p+ k' y
newDirection(@); ) Y' a/ _: k9 D, k* R2 m; P! x
if @.Destination /= void then
* H5 h! T! e1 u( K @.Destination.NumReservation :=
0 d j! `1 o, @5 e4 k4 Z. U- p @.Destination.NumReservation + 1;. N2 n: Q5 L; ^. [) H0 h/ A, E0 Y
end;* }+ n; F8 V. b/ \& o
@.CurrIcon := "drivingHome";3 ?# F) R1 \/ \" }; {! I
@.DrivingHome := true;- P2 @! r5 W6 w0 [* E/ F
end;1 n7 T8 x+ T" i0 E, d) Y" W
else -- the vehicle @ is empty, both vehicle and part are in the same dock station; x( m: d( K |; @: Q
part := @.transpOrder;
1 R4 O9 b1 E: h1 W/ ~ part.move(@);-- load part1 g$ p# |. {; U4 }/ G5 u3 c+ l
@.CurrIcon := "load";+ i* m1 r' ^7 ~/ i- V
GlobalDistObj := part.globDestination;/ H. b- M' z/ X& s
assignLObj := rgmanager.rgAssignL;
! l" d% f0 P! p7 U. d E# f row := assignLObj.getRowNo(GlobalDistObj);2 m7 \' c/ i) ]5 w
if Row = -1 then -- since 70
4 G S, u2 s5 ~# n, q" y1 v, h0 } if lan=1 then6 e/ B, y" k" n" _
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),2 }/ p5 B9 P# w6 V a
to_str("in der Andockstation: \"",?.~.name,"\""));
{. y$ C! }! s5 l/ \8 V9 |' @" ? else( V. X; O" E- V% i' u! t
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),* d+ [- s' x& W! g; [7 v* W
to_str("in docking station: \"",?.~.name,"\"")); ! E& l* o ?! U8 O% d0 \) y0 S
end;
- n2 Q0 Z$ P+ @ else
1 o6 a' ?- T. |2 w, Y0 L @.Destination := assignLObj[1,row];
4 ?6 d0 n! I, [' n; M* P end;
, u$ A6 K; c7 V newDirection(@);
( C, u& t2 I6 ?( I$ V% i @.HasOrder := true;
% {4 i) `4 ^- x" i+ D end;- d) w) W9 U& g0 d, q
end;
) [% d- \+ i p( S3 f/ W5 r. `end; -- of the method9 T/ M+ }9 F2 J9 C. S
|