/* called by: entrance ctrl of the object 'track'% l+ q% u$ [7 S+ [) o. B
*/
( z I/ W) z& v. ?1 d" a' c# Wis
) q1 }" ~9 {% C3 @( l0 B0 t9 r) t part, GlobalDistObj, assignLObj:object;row,Lan:integer;
/ d7 ~4 r/ J/ K4 [do
$ p0 j4 u% e2 Y3 R Lan := rootfolder.Internal.Tools.AOLlanguage;) J& Y/ s, j0 ?: X. e0 u8 f) _1 z
if current = @.Destination -- else return
+ }- T' l( [: x$ f# h then4 P h: y0 P9 u
@.Destination := void;
% ?) I5 ?* p* F, ] if @.occupied then B1 G% e% |( K9 ]' s
part := @.cont;
4 h5 ]# s. W1 t; e2 f @.transpOrder := void;
( E) c: }) _' D part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,4 p6 r3 e5 M& a
@,root.eventcontroller.simTime);* `$ y7 ` b+ {; P% P" n
@.HasOrder := false;) p5 v9 [8 g4 O) m) F5 E" v' x$ P
@.DrivingHome := true;# _, e& V& y2 x6 M4 X1 z$ U n0 n
rgManager.tryToStartTransOrder;
5 m3 |% G l. m, u1 P if @.Destination = void! S3 ^3 U2 O m r9 G6 a, ^
then -- no transport order for vehicle @
5 Y1 D, q' |/ h5 a) ] @.Destination :=
# ^" o4 F* e% ] rgManager.nearestFreeStation(@,track.~);' u$ T5 {# q2 h& T. h
newDirection(@);
* }6 ?" ~7 ^( [2 s; _8 ^ if @.Destination /= void then' w- g9 B; }8 ?
@.Destination.NumReservation :=
2 P7 |( ]. {# v! f @.Destination.NumReservation + 1;/ e* h/ N6 V- ~# }3 i( |+ z6 F9 L
end;( i2 t6 G, K" P3 B6 a
@.CurrIcon := "drivingHome";5 Z3 [# U) v& U# r& M- ~! h
@.DrivingHome := true;1 y$ i3 n# Y- y1 d
end;- F: l+ N4 [% e
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
; u% z; o$ Q, p6 t7 C" m! Z6 Z part := @.transpOrder;
# b) G, \! X# U' h. K, C$ N0 e part.move(@);-- load part
8 a6 `6 |! D2 I9 o6 X @.CurrIcon := "load";
; f+ V9 a8 g. d- [$ r8 J y ? GlobalDistObj := part.globDestination;
, X9 ?/ V6 g$ g' m+ L, S) H assignLObj := rgmanager.rgAssignL;
: _! |, z* @6 X. h/ V1 p+ d+ c row := assignLObj.getRowNo(GlobalDistObj);
; G+ I* v& @- e) g& } if Row = -1 then -- since 70/ Q% a) F# a' B& E6 q8 N
if lan=1 then
/ M) b5 z, g) Y8 o' A2 x6 Y promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
# f' x A9 C4 J! O to_str("in der Andockstation: \"",?.~.name,"\""));2 L6 X# y$ s o2 O
else
. _8 E6 v) f; Q" U. @/ w promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),, @3 |1 Q) _6 K; D- D7 D
to_str("in docking station: \"",?.~.name,"\"")); : W3 p% \. j/ X' i
end;3 p3 \9 b$ P! ?( Y
else" g& ~3 z( {- G# \- M+ p; B
@.Destination := assignLObj[1,row];
7 G9 U6 v+ X+ a/ | end; / C, z/ k' h, f1 }
newDirection(@);
& G% \# r2 W5 u/ h5 R# S/ ^ @.HasOrder := true;
' C3 V4 V" L; {: d end;
5 C. ]- U1 w+ [$ n end;
2 S4 w% q+ ^5 K; J$ ]" cend; -- of the method) m8 o3 v6 i. d( [, r/ @" i* {& ]
|