/* called by: entrance ctrl of the object 'track' ^7 I' H2 g$ j( z. `
*/4 _! n# C9 d: N7 `* V# j
is7 q3 X3 s7 k* u1 V+ P7 u
part, GlobalDistObj, assignLObj:object;row,Lan:integer;! j/ @) c6 \7 o$ ]7 R* N
do/ f: p# q1 Z3 G4 W; q
Lan := rootfolder.Internal.Tools.AOLlanguage;
2 W8 \* Q0 k: c8 h" ~; ] if current = @.Destination -- else return
, @6 z5 k- J" n then
$ m/ c5 G! K/ Q1 Z0 g7 k @.Destination := void; A. V% p7 R6 Y" ]$ }( `. t
if @.occupied then3 {* q8 F0 g) ^; N1 G% A. [
part := @.cont;
; W, u: m* ~! q9 f/ a @.transpOrder := void;
& j. u2 O, T$ D; M" o. E$ c part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,# d a1 A. ?& Y) O
@,root.eventcontroller.simTime);9 g( B4 y: ?; @ v* j! {% H- a
@.HasOrder := false;
9 W; `: P' {5 t/ ]8 H) z; R @.DrivingHome := true;
6 J5 W3 R' ?0 }) z rgManager.tryToStartTransOrder;
- t# w, x# r! ?+ p& n) b. {( Q if @.Destination = void7 b- O- v6 ~& g( F; S) W2 D/ W
then -- no transport order for vehicle @. J( m! s9 y. H' g J1 Y
@.Destination :=
7 T9 s7 l! P9 Y) d8 ?# t rgManager.nearestFreeStation(@,track.~);3 P& l( R1 L% G4 T1 I' j' a8 {
newDirection(@); 1 B; J! y8 s# m: y, u2 J3 r
if @.Destination /= void then
4 S; g) Z. y( B# g* }& H( _# ~ @.Destination.NumReservation :=
" V) Z/ S+ K# i! J% {! k3 k9 a# R. c @.Destination.NumReservation + 1;
) n* n+ v$ N/ c: ?2 q1 B end;5 l) r. f8 N! T* l0 C5 d
@.CurrIcon := "drivingHome";6 a7 v: E& a2 K& q2 _3 [& `4 A
@.DrivingHome := true;1 m' ]2 }( c9 f; a7 K
end;8 a0 z7 e. X/ O0 h
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
2 t6 Y1 v5 S( G/ ~% r. V part := @.transpOrder;
. Z$ e* s8 W1 i' _ U" k8 j part.move(@);-- load part7 J- } ~3 [4 |) ?! @
@.CurrIcon := "load";
6 v4 F" c1 I; [ GlobalDistObj := part.globDestination;
' @) ]2 c2 Z2 u6 f* k/ a m# } assignLObj := rgmanager.rgAssignL;
5 d- ~3 L# Y5 N% \* X. E3 n row := assignLObj.getRowNo(GlobalDistObj);
; c5 _1 U2 c# r2 ^" H* L/ L) V if Row = -1 then -- since 70' ^" X1 P2 I: j8 [" S% M
if lan=1 then
+ \* K4 O$ U% q* t# W$ F# L) u promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),# L8 f2 n% ?6 O: R
to_str("in der Andockstation: \"",?.~.name,"\""));
6 A9 @' q+ c8 h* I% k else
/ J& v' T I O6 h- \, ` promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
3 w6 S" T3 }0 Y' A4 \+ q4 J to_str("in docking station: \"",?.~.name,"\""));
3 Z% r0 b4 A( J( y0 N( v end;8 K* i3 { X, d+ s- q' y+ p9 v
else, x G2 K$ O* u5 c! \
@.Destination := assignLObj[1,row];
& N9 G& g( U/ a* G0 v! y end; ! c9 ?# N* n+ M3 X6 r
newDirection(@);* J+ N' j0 u; W. `7 ~$ X- f# P
@.HasOrder := true; P8 i6 k8 e" Q- G% y1 T7 s: R
end;# p$ x8 \& z$ i6 i' k
end;
. \% ~, d, a) C: rend; -- of the method
5 x6 v1 Z' g7 l+ x2 }- k+ G$ V |