/* called by: entrance ctrl of the object 'track'2 i# @% ?* ~3 K7 F" Q
*/+ q& F5 A7 `+ \" W8 m3 L
is9 X7 A, _9 ~# B; `. C0 c: d
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
; B5 u9 k4 G6 j" G2 {0 N- ydo$ L$ Z; E# E! g' [$ G
Lan := rootfolder.Internal.Tools.AOLlanguage;
- X: Q( I& g' Q/ Q+ z if current = @.Destination -- else return' ~% P' v K! [1 z# E8 ?6 d/ c
then9 H$ ^9 _9 |' a' ]0 f0 U1 Z
@.Destination := void;
# B% [" E8 F5 Q8 p if @.occupied then: S: D8 Q3 g, i+ p% A2 h
part := @.cont;
* Z0 M* v+ S- R* d5 ^0 |$ a @.transpOrder := void;1 `( p2 f5 e9 ^6 O2 x5 v
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
% F+ P5 @) }: ]2 I7 w$ d y @,root.eventcontroller.simTime);
e4 T9 r' {, h* H+ k* P) {# e @.HasOrder := false;% O2 V" X: E8 L) ~, C7 j
@.DrivingHome := true;
. a+ x6 S6 F5 c* t5 X N1 u, s1 R rgManager.tryToStartTransOrder;
8 S$ g, s' O" }- }5 _$ I( f if @.Destination = void
$ n. R- f: A* L$ U then -- no transport order for vehicle @
9 ^3 m% ~3 j- S; e. B f; N) p | @.Destination :=0 f* u; f" t( l& v* E
rgManager.nearestFreeStation(@,track.~);
" r# R( y# W8 b4 [$ ~* [& f6 @# \ newDirection(@); 6 n. n9 p- x# i9 p1 u& g, Q9 w4 j
if @.Destination /= void then$ Q+ j: K9 {8 q+ l3 g9 o+ w
@.Destination.NumReservation :=
# C Q/ @/ ~! W. y) l3 N% M! w @.Destination.NumReservation + 1;
6 t7 F, W" i. Q$ F$ Z4 h end;, T0 b! @* i/ N2 `! O
@.CurrIcon := "drivingHome";
W, w$ y7 ^+ N4 B @.DrivingHome := true;
# [& L2 o+ C' ?$ w9 L end;
8 A( z _4 R0 L7 I else -- the vehicle @ is empty, both vehicle and part are in the same dock station
" b. @ l- @4 y" }5 } part := @.transpOrder;
% n# M6 Y# _3 W' z1 g7 Q. I( j' g% s part.move(@);-- load part
/ h o; K: w; @2 i9 Z @.CurrIcon := "load";( D; r% j: k- d" @% b6 J& k/ X* I
GlobalDistObj := part.globDestination;
- s: t: d' F8 L6 v/ b0 f assignLObj := rgmanager.rgAssignL;
+ a9 }4 U5 _' P row := assignLObj.getRowNo(GlobalDistObj);0 h( M$ A1 ?* K) b
if Row = -1 then -- since 709 u1 R9 \+ ~# z# z0 t
if lan=1 then$ A# u4 n& h, t% o* g; D' Q5 C
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
; s# E' L$ a/ j1 @; Y/ u to_str("in der Andockstation: \"",?.~.name,"\""));
7 W2 P- u$ b' u) v/ e- l else
% n: h7 a+ z% e# ? promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),) ~. R- B5 [1 R" X+ C
to_str("in docking station: \"",?.~.name,"\""));
6 ?# n: U1 t9 k+ }' ^5 Z/ d2 { end;0 e2 F0 P1 ~3 `3 ]$ l$ t
else; {: W P: ^' \2 X1 A1 O
@.Destination := assignLObj[1,row];: V6 |( U$ y n# ?9 t0 {
end;
; C' N, S" a' n$ {8 q' k# t1 O/ N. a newDirection(@);
2 t1 n/ C3 w; h1 g7 n0 A$ P @.HasOrder := true;' o9 ^7 x8 B: N* ?6 H
end;/ k" [4 f; f9 r
end;1 w" N8 O H; U
end; -- of the method! S0 p. c$ z7 t( b
|