/* called by: entrance ctrl of the object 'track'1 q9 }" T5 x" y- w1 K
*/3 z. y- O9 `/ `( L! r: p
is( O7 n D5 P, I& |' i3 Y
part, GlobalDistObj, assignLObj:object;row,Lan:integer;7 J8 X/ C: I' C, F+ o- y5 {1 A
do
" F# R; t1 G! Q V* J0 o8 [ Lan := rootfolder.Internal.Tools.AOLlanguage;% }; A1 k- y" v) r( b7 C5 y2 m
if current = @.Destination -- else return
. t2 i& v8 G d* a8 n& Z then
6 O _4 c1 z1 L: Z! Z* X* D @.Destination := void;2 x4 T) f6 W9 m
if @.occupied then1 b$ ]0 [/ w# o8 g
part := @.cont;9 ?( U( \8 x: F, V
@.transpOrder := void;8 z" ^4 `+ Z" U: ?% G% O
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,1 l k6 x. U. l6 C) b
@,root.eventcontroller.simTime);
/ M' l k8 [# k, p* q/ ^, E9 K } @.HasOrder := false;, F* C W1 P0 t+ E; L. ?- ^
@.DrivingHome := true;
6 }2 R: r! f- g& k9 w4 T rgManager.tryToStartTransOrder;$ v8 q: h# p' f$ X2 x' A. _
if @.Destination = void
1 ~; Q9 N$ g9 x& c z then -- no transport order for vehicle @
7 n! z9 m& f8 j& ~( i# I @.Destination :=
/ R+ _1 m% g' A rgManager.nearestFreeStation(@,track.~);2 n* g6 v+ s- f5 c; p G
newDirection(@); 9 [1 K" ^* R* [- }" Z9 V
if @.Destination /= void then$ m. [* Y m& R' g9 e2 d
@.Destination.NumReservation :=/ N I7 |$ M) ?4 m) c) e
@.Destination.NumReservation + 1;
5 E$ `6 ^. F! `( R end;* t- F+ a- { ?/ b: v8 N
@.CurrIcon := "drivingHome";% k6 n6 Y9 i; u2 K. g. ^8 ~
@.DrivingHome := true;
4 ^+ |: U2 O* o$ D5 M; V& \$ p end;
1 l' m6 }# _- j! X) r9 \ g else -- the vehicle @ is empty, both vehicle and part are in the same dock station
- ^) D) V* @; a$ E0 P, ^/ W part := @.transpOrder;
8 W* E- ~; O4 V1 T part.move(@);-- load part) Z# W4 s: `- h9 b* _: Q
@.CurrIcon := "load"; t7 }0 F \" r& p0 @
GlobalDistObj := part.globDestination;+ F4 v, K `0 V+ S: C
assignLObj := rgmanager.rgAssignL;% a5 P" B* K' {
row := assignLObj.getRowNo(GlobalDistObj);( I! V: u }: s
if Row = -1 then -- since 707 o& }$ I) p. b! Q, G1 O
if lan=1 then6 p; u! ^) n) E& u3 S. @
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),4 n# k$ a/ G) n
to_str("in der Andockstation: \"",?.~.name,"\""));
7 b) W R" n8 ~& f1 T! j" o8 b else8 \3 Z9 b" P6 Y7 ^
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),/ J" F6 w0 i! x
to_str("in docking station: \"",?.~.name,"\""));
m; V N, S) E end;
, w6 e4 i* D& a, V else
5 v$ z, [ P/ {6 m; ]1 W2 a9 \4 ` @.Destination := assignLObj[1,row];
* i! s( [" |6 ]' |6 ~ end; i( |# m4 P. R- G3 o
newDirection(@);
& D% Q5 l) d2 X! N @.HasOrder := true;
L0 ?9 y; `4 c, R% W end;
, X' x2 z. O* R9 W1 O end;
1 x( R( p7 ^/ s6 F0 _. Hend; -- of the method
3 k c+ _! p; X9 ~: J& O4 ~! h |