/* called by: entrance ctrl of the object 'track'
. {6 u( O6 |& Q ?) O*/
8 a/ R3 c8 H, ?0 b9 l$ t, Xis$ E5 }+ s7 u* K
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
. @6 b7 p9 L/ E# ~* j% X$ Edo9 u) ^( I q d$ y1 v! V! r
Lan := rootfolder.Internal.Tools.AOLlanguage;4 `6 _- j/ ?# O. `* ?; `7 {/ O
if current = @.Destination -- else return" |# w6 L, n% V0 Q! \5 `) d
then3 i# n) k* W" c+ r: ]) n. e1 ]
@.Destination := void;- B! i5 n8 f0 x( k& ?
if @.occupied then
8 [3 Y7 W% W) ~( {, J+ ]9 ` part := @.cont;' M4 R0 I- `) Q* p/ K9 m0 ?
@.transpOrder := void;
$ b$ E: A+ p3 n/ U part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
! R9 i# ]/ L# V! h8 A3 g @,root.eventcontroller.simTime);
" I( o% {7 N% w& v' |4 i; } @.HasOrder := false;
9 E w& l+ X0 I @.DrivingHome := true;
/ S, n/ \9 S; j4 H# H rgManager.tryToStartTransOrder;
; {+ ^+ l q! c8 m+ f# N if @.Destination = void
, ^8 B$ B- a1 Q+ H) a0 Q then -- no transport order for vehicle @
* f% {7 a' j9 n8 S$ a+ D @.Destination :=
6 }- v' V7 t0 B/ ]/ m4 E; Z rgManager.nearestFreeStation(@,track.~);4 D& T. e/ }7 J" X
newDirection(@); 0 W6 m# W+ _- F& Y# w
if @.Destination /= void then. R1 p7 ]% \1 q* t; F$ X% f4 e
@.Destination.NumReservation :=* R) z Q. L% p$ b" k6 a
@.Destination.NumReservation + 1;
* {9 G% d5 H( s+ v- | end;
- |0 W8 L, X# h& b @.CurrIcon := "drivingHome";
' ~- @" I6 j9 ~5 `4 g- y @.DrivingHome := true;, U7 \' z% {/ @! U( T
end;
9 ] B. w- Q' P8 I8 f6 t else -- the vehicle @ is empty, both vehicle and part are in the same dock station% _/ N% Y& s' z W3 p o( N
part := @.transpOrder;) ~) P( [, B. K( }* k+ d
part.move(@);-- load part$ ~7 d# r) D1 G; w
@.CurrIcon := "load";
5 g. Q" G' q+ I" K GlobalDistObj := part.globDestination;
; ^5 I) A+ C( m/ w( Q+ A8 e assignLObj := rgmanager.rgAssignL;4 }- I9 G2 E a6 t
row := assignLObj.getRowNo(GlobalDistObj);
0 Y4 b" Z/ x; M* i3 Q+ X if Row = -1 then -- since 70
* A; E# T7 n' u if lan=1 then
3 X3 u2 T; b8 D) h. K! [. X promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),: U9 A; j/ x9 ?% w% g2 y) k4 Y
to_str("in der Andockstation: \"",?.~.name,"\""));
3 {/ H" V; ~4 F7 Q else
# O# N; H: D1 B7 x8 ` promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
# p5 z" x: v4 }! S1 [4 i1 i( y to_str("in docking station: \"",?.~.name,"\""));
' @5 K. g* q( Z+ J* G t Y# n% e end;
& Z9 g9 j$ T6 h7 L% ?0 N p; @' [ else
- k2 s) O$ l4 f* g. R @.Destination := assignLObj[1,row];
$ c- x6 w/ }5 `! `) _1 W; W7 c1 S5 }$ O end;
# e8 g) |0 Z) D2 j) U- W newDirection(@); r% v% ^+ d0 X: E) @$ j/ w
@.HasOrder := true;
l- w; t5 L4 d- J6 c& r! C end;2 d7 O7 X, j+ C$ a* W
end;9 |( p& m4 X% Z' u% l/ n: I) J
end; -- of the method7 i" ?8 G; x# H( |5 L$ \
|