/* called by: entrance ctrl of the object 'track'' V5 s& M: D6 P3 S( {: G
*/+ I2 p6 ] w6 D6 q' L
is
8 G" g# R% j/ P# P# [ `* w# v part, GlobalDistObj, assignLObj:object;row,Lan:integer;
0 b& N- Y! M0 n, i7 l$ H0 ado
" H0 U+ V! W$ N; ^ Lan := rootfolder.Internal.Tools.AOLlanguage;1 T7 d. p( I- [, N1 K% f5 d
if current = @.Destination -- else return) }" ^8 t+ S1 [% `% o: e' s
then0 [! [7 Z2 ?" V# Z: \1 F% f1 `
@.Destination := void;
. b9 ?9 T( c0 a( t3 f5 U4 W0 i# }3 b if @.occupied then' y; U" B4 C( i2 c4 }; J/ f u) U
part := @.cont;
$ h5 ~& M9 n- m( M6 j& H @.transpOrder := void;
, q( Y: Q7 r' D part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
5 H" Y5 E6 Z9 F2 d8 P @,root.eventcontroller.simTime);
, V7 v* M0 A2 b* Z6 D; Z. d' [* S: Y @.HasOrder := false;
8 U8 ^3 V# r. v1 z' I% L4 s @.DrivingHome := true;
8 ?3 ?3 s- X9 T5 W L9 [/ { rgManager.tryToStartTransOrder;
$ d; R, R, v, a1 Y if @.Destination = void
, z/ M9 K) V5 b5 x' |2 q4 h then -- no transport order for vehicle @
/ D# I! R3 j. M" N2 b! c" Q @.Destination :=9 \7 J6 F8 D8 o9 c
rgManager.nearestFreeStation(@,track.~);* Y% W. S: s( e6 R. t
newDirection(@); 2 R3 }4 J' q8 C/ k( m
if @.Destination /= void then6 @" S# S& m: W1 p7 T0 H
@.Destination.NumReservation :=# f8 b! G( ?* u2 w; L' P; i2 ]1 F3 E8 ]
@.Destination.NumReservation + 1;1 s& w) r$ c+ C5 c
end;
, e3 a7 }" n" z! D @.CurrIcon := "drivingHome";
0 V% g+ m4 p6 |; W- d' y P4 p @.DrivingHome := true; ^* P& B2 D- t
end;
) Q, h; l" x- W else -- the vehicle @ is empty, both vehicle and part are in the same dock station& C- r- T9 s6 n+ J5 w
part := @.transpOrder;% w9 ?: x; m! \' ^" a) P
part.move(@);-- load part/ Y0 F4 i) Y5 m4 ^* m
@.CurrIcon := "load";1 c: }, b+ n! H# b* L6 `2 \
GlobalDistObj := part.globDestination;, A( i9 M) b' v& j2 E
assignLObj := rgmanager.rgAssignL;( @! [7 n' c! m9 h' A* j
row := assignLObj.getRowNo(GlobalDistObj);
! t+ e |/ X6 N! J! a if Row = -1 then -- since 708 x: G0 P; C; o7 F9 h
if lan=1 then
1 G$ [4 V+ c* f/ m7 }1 h( u5 a promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
: a: K: J6 q0 }. C t to_str("in der Andockstation: \"",?.~.name,"\""));4 V0 |' q& r1 H
else
1 f$ C) V' U/ r o# J+ C: S- D1 Q promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
7 D( m5 J# U) F: J/ V6 ~5 B9 F to_str("in docking station: \"",?.~.name,"\"")); - C1 j$ ]1 `0 \5 v. A, h: m8 U
end;# `8 c' x9 M( E7 M5 o
else: _+ a8 E' Q. w/ B: M
@.Destination := assignLObj[1,row];
6 b8 o# _) j8 u$ [4 b! u end;
, L! B+ M7 v$ n3 b* e. [2 j newDirection(@);$ S0 c5 W$ Z8 f/ g4 I1 Y
@.HasOrder := true;% B: S& [1 E' u2 S
end;
, h" M" ^( I" W end;# T6 f* G- ~8 J' Z6 U
end; -- of the method
- |: H5 J+ }/ F. ], m- i |