/* called by: entrance ctrl of the object 'track'
1 p" M* O& d$ C/ u! l*/
4 g4 u! X0 I3 Q, |is
1 S; P( y0 Y+ v, c5 Y5 c, u6 ~- e+ m part, GlobalDistObj, assignLObj:object;row,Lan:integer;7 S! k2 s( ~$ }* e( i
do
" d) o. ]& m' b$ M' D Lan := rootfolder.Internal.Tools.AOLlanguage;8 a) G, g2 |" Z/ a, a* @: X. ]
if current = @.Destination -- else return
# r' @7 O% x9 r( `) J then
0 N' }6 ?# g* l% j5 } @.Destination := void;
u" r4 o: z2 }8 [0 d1 e/ j. R. n if @.occupied then
3 P- F9 [& h$ {' G0 w part := @.cont;
9 w" _/ R& v8 u$ f3 _" @ @.transpOrder := void;, j' o' g& r/ ?7 `, u [
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
' S5 ]5 C' W [) ~. | @,root.eventcontroller.simTime);
4 J" n# C+ G: s/ e1 E* @ @.HasOrder := false;- R+ N6 J1 E9 e, u6 E5 U
@.DrivingHome := true;% x" L3 m. i& c F4 X) P! r( d
rgManager.tryToStartTransOrder;4 ^! a$ X0 S2 ^. ~" D1 ?1 S
if @.Destination = void4 U. Y0 g* V* \* X& B* s, F
then -- no transport order for vehicle @7 T# n9 U. e" f$ ~
@.Destination :=
0 E9 {' x4 c6 x rgManager.nearestFreeStation(@,track.~);
$ r9 }% D# K- c2 [- J newDirection(@);
& _6 N. v3 \- ^2 ? if @.Destination /= void then9 h3 D x2 ~* W7 }; T/ n
@.Destination.NumReservation :=$ e" N* u! F: A {& \* z4 w, Y
@.Destination.NumReservation + 1;# F8 L O9 `; B
end;( k( l- t% S/ K8 T8 V% y1 |
@.CurrIcon := "drivingHome";. t4 F# Z9 A( {
@.DrivingHome := true;) b) o8 J$ B+ J7 P9 _1 Y
end;
$ k _) |% G) V u# ] else -- the vehicle @ is empty, both vehicle and part are in the same dock station# T" k) K0 R$ N6 F/ _) V3 Y
part := @.transpOrder;
2 @- M. o+ Y; [/ b" @: A2 _ part.move(@);-- load part3 Q+ |9 d7 Z; K, S
@.CurrIcon := "load";/ u/ F+ v9 _0 w; Q/ y
GlobalDistObj := part.globDestination;% F; K( x0 F) G! K5 [8 s: p4 y7 d
assignLObj := rgmanager.rgAssignL;/ L/ I ^" i7 n. E0 U3 b# }! y& S w
row := assignLObj.getRowNo(GlobalDistObj);
2 o w$ {# i3 p- I/ R if Row = -1 then -- since 70' g5 M6 O+ ?- u# ]8 a: c5 T
if lan=1 then$ h) z7 Q9 e5 v& l9 T' ^/ K
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),1 q `$ j, \7 O f
to_str("in der Andockstation: \"",?.~.name,"\""));
" F) P9 b1 `$ h+ M else# p9 d8 H2 h6 q9 h
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
, `7 O4 c# c' }: ?- e6 ?6 f6 g to_str("in docking station: \"",?.~.name,"\"")); 6 d! G4 V6 L0 Q
end;
, a0 R- D8 v. H- q else) N" S8 ?4 P1 E' D9 Z' z% }/ O
@.Destination := assignLObj[1,row];5 w! w( M# U" @% R! d2 N5 h1 a
end;
7 {* d4 s z" L/ d% a h$ g% F newDirection(@);
: |; Q7 U3 ~- @+ |% @ @.HasOrder := true;6 W6 v/ P# q" x+ {1 k8 E& l1 n9 X8 E" E
end;
; L& Z& L4 G3 @9 z) m end;* ?4 e+ o+ b& s3 o6 I
end; -- of the method
% M# h( g8 ?0 z |