/* called by: entrance ctrl of the object 'track'
9 ~! J/ {3 T2 x7 N* j*/
/ w$ r, [& w$ k9 a; ]is1 p2 D6 s% U# k2 \. H8 O
part, GlobalDistObj, assignLObj:object;row,Lan:integer;' `+ |6 C3 Z1 z" B; Q1 |3 O+ b
do
6 Z5 g2 ]' @2 C7 X* f! |0 ? Lan := rootfolder.Internal.Tools.AOLlanguage;! W8 A& F0 M/ w5 B8 o" ^
if current = @.Destination -- else return
3 N! G& h V2 k+ P, t# i then( r- G/ P" I5 E' ^0 m9 h7 B
@.Destination := void;
% T# h7 g8 m. g1 \ if @.occupied then
, n$ ?1 S5 _9 u8 ^$ @ part := @.cont;
9 y. T. |; r. f. a+ T- i% N* p) D; ~ @.transpOrder := void;
" R' x$ [- N+ x6 b* V9 ^' Z% H part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,* C, B9 D: K. z# B
@,root.eventcontroller.simTime);- O, e( v+ o2 `4 G- K/ e
@.HasOrder := false;( o- ^- m7 [7 l. K% E: }
@.DrivingHome := true;) C2 o( i1 B* _
rgManager.tryToStartTransOrder;% F: a( S1 {( ]2 e" a
if @.Destination = void# H1 C; u+ p' L7 }" S" G4 P
then -- no transport order for vehicle @
; {' \6 {) b1 z* P7 h) } @.Destination :=
7 k! r, y% p% K4 D1 R3 ~ rgManager.nearestFreeStation(@,track.~);- F8 \% K- j1 e0 c6 }( R3 X
newDirection(@); ( g/ ?2 {+ P R5 W! e, @
if @.Destination /= void then& v0 z: q2 P1 K( G; a: \
@.Destination.NumReservation :=! U0 [5 E: K- Z9 r; }# `0 b6 {
@.Destination.NumReservation + 1;
% t& Y- u! n9 K3 Y) k# `3 d1 V end;
$ P1 h+ E1 B2 c1 T$ L. n @.CurrIcon := "drivingHome";4 m0 Y# k B% e% {
@.DrivingHome := true;: Q% B& g& z$ I. b: ]* P! _
end;
( P* Q+ N* S1 _ ^ else -- the vehicle @ is empty, both vehicle and part are in the same dock station
, P; r. z" J; I( z0 f" W s part := @.transpOrder;
5 ~% n- |3 G4 b! ` part.move(@);-- load part
% D) p9 Z' I2 Z6 v @.CurrIcon := "load";3 K% b, z& r; S1 y5 J. L M
GlobalDistObj := part.globDestination;5 N5 A0 F$ h- |0 }" D8 u
assignLObj := rgmanager.rgAssignL;. E$ {2 b" Q5 ]% U9 t6 `0 X
row := assignLObj.getRowNo(GlobalDistObj);* X9 _- k/ W1 R* W* U- a/ E$ M
if Row = -1 then -- since 70+ D. [$ f c1 y: r. R
if lan=1 then
# t/ U4 R8 p% T4 c+ y" _ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),7 O2 u; _+ O" r" L9 o9 p' U
to_str("in der Andockstation: \"",?.~.name,"\""));2 Y2 Y& s. w3 h
else% u/ i J2 [0 U; D8 F2 l
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
2 M r+ P8 `! l: J to_str("in docking station: \"",?.~.name,"\""));
$ N, e4 y& y* `7 Z end;
; @4 c0 L+ ]7 M- |' G# @ else
! ?8 u4 x/ Q# W2 ^8 }* V @.Destination := assignLObj[1,row];
% N* k/ g! M4 d+ j3 J$ W. \9 V8 Q* k end; + P/ H3 Z6 M# {. ~: \- Y0 A6 G
newDirection(@);
. v+ Z1 m8 ^: o- U @.HasOrder := true;9 ?1 w) O- `! L' Z% F' K
end;
[" W, R- p6 v0 \* l end;
6 U" l! T+ W$ b* h! Jend; -- of the method/ C% c' R6 G1 A9 p! u
|