/* called by: entrance ctrl of the object 'track'
* D; v( }0 a% g*/
/ s1 Y5 ]) w3 N/ kis) g, M/ Z5 N* A9 w: E3 D' m4 t; t8 O' g
part, GlobalDistObj, assignLObj:object;row,Lan:integer;6 x/ o0 v8 T G$ a0 c
do. G% h) l( X6 U6 B
Lan := rootfolder.Internal.Tools.AOLlanguage;" b0 Z1 B) M S: \* H
if current = @.Destination -- else return. y9 h3 n1 v( G2 F: o8 B& k
then& `$ J+ n& V. x$ p8 P+ W* W
@.Destination := void;
9 |* _; G% q( k9 S if @.occupied then% q! g" z3 m) Z$ Y U
part := @.cont;7 G7 B* M( C5 T' S! q$ C
@.transpOrder := void;% H3 b4 a* [& Z. N M9 v
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
) m2 I* R+ p( _ @,root.eventcontroller.simTime);& u8 h; A4 |2 j& p
@.HasOrder := false;
& W; C$ j( p) r. x% ~' N+ V# a @.DrivingHome := true;* a; R! k# ` S) p
rgManager.tryToStartTransOrder;
" Q8 I) {: \. Z; |8 ?5 x if @.Destination = void
5 e" @% n9 v5 t/ X2 x then -- no transport order for vehicle @
. H" L- }# ?- t$ j @.Destination :=$ |) E6 }, w0 J$ j5 M: s
rgManager.nearestFreeStation(@,track.~);8 Q8 X/ h' |8 A8 Q! [# w
newDirection(@); + ]$ e3 H8 p2 _! ]: X c' K1 b
if @.Destination /= void then
- q6 q8 m0 _5 w Z" z" u @.Destination.NumReservation :=; H: k3 Z3 A: V# h
@.Destination.NumReservation + 1;# Y: x7 l6 f8 ]$ u5 X% L
end;+ r Y; k. q& [( U% A
@.CurrIcon := "drivingHome";; I! R+ U$ k8 t+ j
@.DrivingHome := true;
* N4 e0 S; x: V/ U4 T end;; [! s% {! y- ]- x M
else -- the vehicle @ is empty, both vehicle and part are in the same dock station( s, @5 o% F- y
part := @.transpOrder; G* D; s' a; S
part.move(@);-- load part
+ N( \% q$ E* X' O# d! @ @.CurrIcon := "load";
0 R8 _" u7 K# _9 @6 _1 g GlobalDistObj := part.globDestination;: g6 s9 B: x0 `5 P
assignLObj := rgmanager.rgAssignL;
3 v0 t0 Q5 @* n8 P row := assignLObj.getRowNo(GlobalDistObj);
# }; s0 f5 o- E7 N2 n if Row = -1 then -- since 70
* r" v" p4 ~5 q% h) g: Z if lan=1 then% D0 |8 T7 V1 e
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
8 }( s, [2 b( @# q2 h; [, l5 X+ y9 y to_str("in der Andockstation: \"",?.~.name,"\""));
$ t* s1 p, m7 F& }1 c0 G+ A else
6 m7 F, y: S" H3 N% t7 x promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),. h) H, K6 G# U+ q
to_str("in docking station: \"",?.~.name,"\""));
7 s+ W }7 h, B5 u, \# x1 K6 Y end;
# q+ V0 |" z7 t+ P) i else) z) b; v0 M; p
@.Destination := assignLObj[1,row];: ?$ Q2 [- J8 E0 R* Y/ T( J+ g6 J
end; # e# m7 a" y# g3 O
newDirection(@);
" k: g% T8 _5 G, K( n6 j$ ~ @.HasOrder := true;- ^' I4 ]2 e( u+ T
end;" q" e0 u! i @. Z1 g& @
end;
3 L) H' ~+ ?1 u. n- Vend; -- of the method
. u3 l0 I9 z; u! Z/ t/ C |