/* called by: entrance ctrl of the object 'track'5 D* i$ M, u/ h) e0 F# N
*/! N( T$ U2 D+ L: O$ M# I( Q
is+ _: G$ S: u$ ^ a9 j& D" R/ [3 P
part, GlobalDistObj, assignLObj:object;row,Lan:integer;, l5 A" H# {6 ?
do
8 c# i- s. S" b Lan := rootfolder.Internal.Tools.AOLlanguage;
6 ^( c' n* u% Z5 m, ?. a! | if current = @.Destination -- else return
, i+ {4 R7 h g: L$ h: D o then) I9 `1 b n2 S+ c' W/ E% J
@.Destination := void;5 N6 u8 N" `3 V& j. m, \7 K n
if @.occupied then
: g! W' B) k; Z3 ^# W part := @.cont;
+ T9 Z ~0 o* v; k @.transpOrder := void;% [, q; V7 m; C3 C* t
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
7 ]" j( m! _- V3 N) V+ I @,root.eventcontroller.simTime);
) f. F( z- R4 @# A @.HasOrder := false;, |4 o+ D2 A7 R
@.DrivingHome := true; P5 F% j; h9 W$ X6 y# G( w- S
rgManager.tryToStartTransOrder;
0 _1 |/ @7 R5 p8 k( T4 S+ ] if @.Destination = void% E3 a8 c" D* Q" H, ]
then -- no transport order for vehicle @
/ t& R5 z, N1 ^. f @.Destination :=
1 A( a5 |$ A% p8 Q) _, |+ S rgManager.nearestFreeStation(@,track.~);# q/ S7 @( B, ^
newDirection(@); % ~* h) P V( v. g( l6 s
if @.Destination /= void then
8 O! S7 q8 [: Y* Z @.Destination.NumReservation :=: ^) _6 H5 r1 Y! L# _" ~
@.Destination.NumReservation + 1;
( L. s2 z% @( y end;8 P+ F4 x( m: A$ t
@.CurrIcon := "drivingHome";
9 _/ R; L4 e/ w! C* }% {3 {9 O @.DrivingHome := true;
& O/ Y9 S/ _$ `- c! _3 P K end;) G6 P* U' K) z; r [3 |7 k
else -- the vehicle @ is empty, both vehicle and part are in the same dock station z: R. n W" L* {6 O. B; K
part := @.transpOrder;& R$ `3 X ^" K$ s) U7 ~
part.move(@);-- load part
9 G0 r+ {$ D9 J/ g3 m# W @.CurrIcon := "load";% G+ Z7 H# P: O
GlobalDistObj := part.globDestination;* c1 H# |) y) }0 y: y; o
assignLObj := rgmanager.rgAssignL;& w3 w) z$ T0 L3 v, k" n
row := assignLObj.getRowNo(GlobalDistObj);, s' T: k( e0 R [
if Row = -1 then -- since 70
7 n+ `6 t! |" U' ~1 i if lan=1 then! l9 U' ^3 h; l% B E, w
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
, f0 a8 u9 H Y4 L( R to_str("in der Andockstation: \"",?.~.name,"\""));1 \- i* O+ [) H, a/ s3 e/ J; m
else2 j5 p: o$ a/ g/ L5 D: G: O& Y
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),2 Q* v/ k3 x* o
to_str("in docking station: \"",?.~.name,"\""));
; i) s3 H, {3 K7 U) U2 P+ l5 r( N5 E end;7 r1 ^# ?6 E# }3 |/ y& o4 r' E F; r
else
7 A6 ?8 ~% J3 i" ]9 z @.Destination := assignLObj[1,row];# c1 \$ h$ m1 l+ Y' Z2 u0 } G) O
end; & T P: @. M3 A5 A' E" ?) v% c
newDirection(@);
, h4 K% ^+ I- X1 A @.HasOrder := true;. _" e, c' T8 ?& J9 w( u1 _/ b! J x
end;+ f: w c/ u3 K. ]: W" d3 U
end;
& {5 Q* T; f" s& y! p% q5 `end; -- of the method2 R& | D J4 L4 K" Q& y" P6 R
|