/* called by: entrance ctrl of the object 'track'
' q) u, `, g+ j0 V/ p. `6 L7 m) T. b*/
$ c! ^, U& \7 Wis1 }6 K9 e/ h q4 F
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
+ U9 e, o) g; y5 hdo$ n" b" R$ T# v, j8 v
Lan := rootfolder.Internal.Tools.AOLlanguage;
7 Z' j( ^$ I* t W. ^( K; E$ _: e, T if current = @.Destination -- else return7 R- I( E5 e3 o) y* i! R
then
7 D( Y; x, x' p. F @.Destination := void;
. @! E" b2 I- u if @.occupied then! ~- j7 j) l8 k/ u) V
part := @.cont;8 d, M3 c* z: e% |& W
@.transpOrder := void;. Q; o- `! X" a1 u$ ?& T/ h' ?$ S$ [
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,+ L# z% o) o8 g3 V1 @$ D
@,root.eventcontroller.simTime);
2 j! m# a n* { @.HasOrder := false;& @4 I8 G* v8 F4 ]/ K
@.DrivingHome := true;$ m- ?% u& h4 ]. C
rgManager.tryToStartTransOrder;* b0 ^6 }. b9 e
if @.Destination = void2 Q3 z2 D+ i9 @" l" i- `6 \& V
then -- no transport order for vehicle @
+ x7 T* O7 w$ B @.Destination :=
" a) b5 b" _( L8 y+ i# ~ rgManager.nearestFreeStation(@,track.~);
* p+ f! ?6 j& h i" z. W newDirection(@);
/ N& X: U! c8 ~2 @/ c$ y if @.Destination /= void then) \* Y' {1 y8 e; d2 e0 G
@.Destination.NumReservation :=, c' k' R" g1 r" T$ Y7 ?. B
@.Destination.NumReservation + 1;# N% Y3 b a( C2 B+ q+ x* \" N
end;# ~/ ?8 u( R5 `3 D
@.CurrIcon := "drivingHome";" \) R+ e- F, V0 O5 Q" V
@.DrivingHome := true;7 Q2 E5 b% k0 [: b) ]
end;
; @0 g3 E Z6 I6 j z8 v else -- the vehicle @ is empty, both vehicle and part are in the same dock station4 Q7 n: U7 }& C3 {
part := @.transpOrder;
@4 z9 C( `+ o& ?9 o part.move(@);-- load part1 J+ ?( i% ?& C
@.CurrIcon := "load";6 ]% L2 f& c* l+ z9 n0 |5 Z
GlobalDistObj := part.globDestination;
O" z9 u7 { Y4 L1 P assignLObj := rgmanager.rgAssignL;
. R! Z0 F! p8 O1 \, C row := assignLObj.getRowNo(GlobalDistObj);
; T, ]. v& R L' Y% k if Row = -1 then -- since 70
5 R2 f) V8 _! c( D if lan=1 then
9 f& d: a& @' `) ]8 {3 Y$ l promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),) b; x, o0 q% A6 K Z% J
to_str("in der Andockstation: \"",?.~.name,"\""));
# \* ?; ]$ v5 A, D else
- f2 w8 I5 a: O9 r! Y% t4 z promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""), S z4 J7 `1 N, K+ O
to_str("in docking station: \"",?.~.name,"\"")); : W2 d9 _9 @" R- b
end;
/ o( c5 y, o; S3 c9 v else- S s9 |! w9 ~: T
@.Destination := assignLObj[1,row];
[9 ?0 L# ?& `# P0 ] end; 1 \" {) c: L: M% \% d2 R
newDirection(@);
0 M0 q' q: b- k: J: y- w @.HasOrder := true;! F( z: v) d; C" n f" Z6 N2 ?
end;! Z- l/ U4 ]/ S( i% a
end;7 a9 n8 R# `4 |) r/ P
end; -- of the method
* |% L: N( ]# Z) g" O' | |