/* called by: entrance ctrl of the object 'track'
* W2 E& @7 s, j! S. U- ?) X*/
6 E o/ ]( W2 e' Z' k5 u- X3 His( c( V* |: C5 u# q( e9 i c
part, GlobalDistObj, assignLObj:object;row,Lan:integer;; X0 r% j2 ~6 L; n/ L) ] s
do
: ]5 u/ y8 b7 G5 d, A; N1 u Lan := rootfolder.Internal.Tools.AOLlanguage;
' l$ U: [4 Z: I2 k. {0 w if current = @.Destination -- else return% j7 \" f7 l. k" }3 n! O" N k
then
7 Q) O3 g3 y( x+ z) K5 s @.Destination := void;# P. Q T$ c) n% C8 |7 h
if @.occupied then. u# x C4 {/ P% P6 @1 h2 M6 L
part := @.cont; k7 J: m+ q0 w! M* R% c* w0 g; W8 G
@.transpOrder := void;1 i8 v3 t, @* `, m# W5 m4 a
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
+ O% V) T8 f# ~) e @,root.eventcontroller.simTime);& G6 t/ R( S7 U2 P9 D# m
@.HasOrder := false;$ |4 j4 s! U5 ?7 y; h
@.DrivingHome := true;8 C G; v+ S# c2 j" T
rgManager.tryToStartTransOrder;$ d4 |9 D z% Z3 h" N; R4 _
if @.Destination = void* n7 K) d+ }, N3 f
then -- no transport order for vehicle @
0 v( q* S: m8 ^9 j @.Destination :=' j k v; L# k, j0 a5 k L
rgManager.nearestFreeStation(@,track.~);
k; o& P ~! {& w3 E newDirection(@); . p- v: F4 H; J
if @.Destination /= void then
9 B0 w0 h& c0 p2 w k @.Destination.NumReservation :=+ P' q. E" c, Q7 A8 X* z
@.Destination.NumReservation + 1;
K4 h) X2 M/ {3 I/ Q4 Q end;
2 d8 q a# x# } @.CurrIcon := "drivingHome";
" E" R- g) b$ Y% d3 w @.DrivingHome := true;
; C9 K2 \! s, G' k; Z" D5 b! k end;
' |" I9 O1 Q$ d: F7 `; l$ H else -- the vehicle @ is empty, both vehicle and part are in the same dock station
, |" [, d' [) M6 ^: Z+ j! s part := @.transpOrder;+ L, s0 P. h* j0 B) t3 _* c
part.move(@);-- load part3 K9 H- ^1 Q5 @' J, P
@.CurrIcon := "load";
0 d) K' L$ W% C* U r GlobalDistObj := part.globDestination;
3 }5 P t5 N2 i+ r/ | assignLObj := rgmanager.rgAssignL; k# N* u; I/ ^' `
row := assignLObj.getRowNo(GlobalDistObj);
' T. p" L- M, d! {; ` if Row = -1 then -- since 70
2 R9 v: Q4 T/ k* Y* q1 W if lan=1 then
) h) \; p: |7 B8 m9 u q; }4 Z promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),' E: t. H( }9 `2 {0 _$ t9 l
to_str("in der Andockstation: \"",?.~.name,"\""));
: |1 Z8 Z! U4 i- c: Z/ Z else
+ @2 A' [$ _5 U, k ` promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),' Q9 `. d& A7 D; s8 X
to_str("in docking station: \"",?.~.name,"\"")); - \, H ^, h$ @0 F0 O/ i0 u
end;, p9 p* |! E; v4 A* F% `+ F" N
else
7 @' {! t9 ~& q6 L @.Destination := assignLObj[1,row];4 X# K N& K# M
end;
7 B& H" B0 v7 {4 _6 \" X newDirection(@);
! q! p2 ~& I* ?" ]( n! s: | @.HasOrder := true;
8 l/ q: R3 h( P7 R* k end;9 x3 e/ W: Q4 N+ f
end;, T: \5 W' l8 @' I8 T
end; -- of the method
: I( j! _& n9 z1 y- I |