/* called by: entrance ctrl of the object 'track'
+ |8 g7 @0 G/ Q3 ~! Q5 p, v m*/) _3 e3 i; U0 _0 d, m/ B
is
+ P% g2 a2 @" A" Q; b i; l part, GlobalDistObj, assignLObj:object;row,Lan:integer;2 I& ], v/ k! C4 N* j" z7 i6 x4 V* I
do
$ C) }+ W/ J- v Lan := rootfolder.Internal.Tools.AOLlanguage;1 \- W) _7 v, F, E3 M r
if current = @.Destination -- else return
* k" Z2 f9 k" }2 S- A then4 W- F3 ]; J7 n& I+ Y8 h$ e
@.Destination := void;4 H# ]7 P3 O' b2 R% n1 ^
if @.occupied then; o! p/ a z( {: H& Q, B0 z
part := @.cont;! B, S% C; n1 i5 u! }
@.transpOrder := void;( ]9 K8 h% I: ^/ ], e1 o/ h
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1," U8 |5 }3 r! Y4 \- v# x
@,root.eventcontroller.simTime);6 T( ~. Y. \# R% T5 T
@.HasOrder := false;
" H* ~, e' z! {5 Q @.DrivingHome := true;
4 X5 k0 ]3 `& `! h0 ^ W rgManager.tryToStartTransOrder;6 y' W) u9 G# k3 S
if @.Destination = void
; w9 a' S# X: ^+ p4 }- q" h then -- no transport order for vehicle @2 i; ~4 _; ?% {7 f w% e9 i" X
@.Destination :=
" A+ `1 [" Q+ W6 R' C- d! o1 H rgManager.nearestFreeStation(@,track.~);! C; D7 |( Z; p4 @8 ]
newDirection(@); " W/ S* N7 i+ a1 G/ P$ y( Y
if @.Destination /= void then e7 E$ W' I$ [/ @1 V% C
@.Destination.NumReservation :=
3 F, }2 d8 Y! a' F; K @.Destination.NumReservation + 1;
, z# X" a! m: a+ N, T end;
9 n1 \! Z: a2 h% @: L( f @.CurrIcon := "drivingHome";; L2 s# o* G2 N5 }3 G
@.DrivingHome := true;
2 z' P7 U! Y% U end;
, o# b' W _5 q else -- the vehicle @ is empty, both vehicle and part are in the same dock station
, ?" Y: k/ t! s0 w i- S, J part := @.transpOrder;
, q! h* O5 }7 C" i5 V& C+ I; k part.move(@);-- load part7 o3 l( C O* O- N1 u# W
@.CurrIcon := "load";
3 v7 Q+ H( ^3 c* g% M GlobalDistObj := part.globDestination;, } f& \' A+ f- p1 _, u. e
assignLObj := rgmanager.rgAssignL;4 D! K. X1 m3 h0 d# h
row := assignLObj.getRowNo(GlobalDistObj);
. R7 k8 f! F3 I if Row = -1 then -- since 70 {( [7 x" F! U/ y
if lan=1 then
& S! b1 E( f2 L6 v promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),6 [1 O! y$ {# |9 t [! K, T/ A% i
to_str("in der Andockstation: \"",?.~.name,"\""));
t+ \; s, z Y3 u$ k d- S else
$ R8 P) |% O& V, S4 S7 g5 q5 _! | promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),* }/ U8 s7 m- p6 K
to_str("in docking station: \"",?.~.name,"\""));
. u5 [5 a# R4 t8 v- b end;
: o! P, i, Q6 G- g3 \: y! b else
* z5 j# V7 P6 W" ~ @.Destination := assignLObj[1,row];+ {) p3 X) {! }1 q8 {# `% `5 Z
end;
" ~6 N; W# p3 u' X3 m" f8 D newDirection(@);: F5 R: n. D( U
@.HasOrder := true;/ A/ _3 {" J8 s$ w1 V7 K
end;
& A# w; ]* I4 E5 k end;7 ?- g& w0 V3 p$ r7 ?3 y* v+ w+ }9 ^
end; -- of the method# Z& [' I& B4 A4 f1 W% A
|