/* called by: entrance ctrl of the object 'track'
0 q+ t. T: j4 Y' n6 `0 v& R*/) {2 {* q6 J1 J& D3 b+ T
is/ J' Z- M/ }9 ^& V1 ^
part, GlobalDistObj, assignLObj:object;row,Lan:integer;: U* z z& ^" r( ^6 L4 f
do8 u+ v6 g& W- w; A, }
Lan := rootfolder.Internal.Tools.AOLlanguage;
4 b' Q3 n1 C1 b1 u1 c0 r if current = @.Destination -- else return
$ L2 y1 x" N1 w8 U/ A5 D* O$ m2 C then v9 h9 s; ]' ^" A5 D5 x
@.Destination := void;3 d+ ~, _0 d# H! p3 d
if @.occupied then/ x( Z: q1 K0 Q: `' C9 l1 r
part := @.cont;! m! E1 L$ H, P/ {2 K. }
@.transpOrder := void;
2 H- K4 N% l) b$ H4 u part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
/ L% g$ R$ W) l! V; Q+ D @,root.eventcontroller.simTime);
. R2 E6 a3 Q5 j% f/ ^+ E. d) f @.HasOrder := false;
) L$ P: L" F, r! |3 { @.DrivingHome := true;
, \) d2 r) n, a/ V3 T5 m g X rgManager.tryToStartTransOrder;) v# G4 ^7 d2 H9 X$ m1 K# v
if @.Destination = void
1 @" L. [9 V1 C' ?( ]3 E% u then -- no transport order for vehicle @" A+ N( O" C# V3 i
@.Destination := n4 i/ ^1 [) x; ~8 g
rgManager.nearestFreeStation(@,track.~);
: I- C' ~- @ M8 u; b newDirection(@); ^" A+ t: J3 @% \* ?# s0 I
if @.Destination /= void then
0 X- B& a! q7 j @.Destination.NumReservation :=
* A9 E4 ~# i% {+ c; B @.Destination.NumReservation + 1;7 d! |: `" r1 o8 Z( F$ R; L/ E5 _
end;0 m/ P2 w# O/ h# u$ n
@.CurrIcon := "drivingHome";
& Z, t" @+ ^/ G0 e: q4 `3 Q @.DrivingHome := true;6 n6 i, {7 p+ n: {) e) e
end;' L) F& x1 N! y( r+ e
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
& Y8 Q0 R( f4 @5 Y# z+ x& [ o part := @.transpOrder;
- F/ H, x' `. H part.move(@);-- load part/ F6 F% j" N$ V5 |: n, j
@.CurrIcon := "load";% U0 `9 n& L, Y& Q5 {4 _
GlobalDistObj := part.globDestination;% Z+ A L9 V! {+ y8 I
assignLObj := rgmanager.rgAssignL;0 B5 y9 q6 S" j& f8 y
row := assignLObj.getRowNo(GlobalDistObj);
: F8 y" }' z6 B6 x; r8 q if Row = -1 then -- since 704 t3 H9 n+ T1 r8 q1 R2 h1 ?
if lan=1 then
/ p) D5 w4 k0 y. B. c promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
* C$ L1 v/ V6 ` to_str("in der Andockstation: \"",?.~.name,"\""));; X d- t5 M" k
else$ R n5 t" C, ?( A: Q# U0 e
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
9 ]6 y( p& |" z! r* ^ to_str("in docking station: \"",?.~.name,"\"")); 5 {( D$ q) r$ I, z
end;, @) H; R4 {- p6 o
else
$ T5 [0 X7 a' U" K9 C @.Destination := assignLObj[1,row];
0 I2 X7 a1 @5 o1 B end;
& X7 J' f5 L% d newDirection(@);
6 N" |: V7 Q5 E! r @.HasOrder := true;
2 o2 m4 B* o: s+ z end;2 [0 q3 N4 g" X: Q
end;
1 X5 D1 c' n/ nend; -- of the method
& z9 `. o( c; q# I3 A; t |