/* called by: entrance ctrl of the object 'track'
0 k4 O2 _& H6 B# X*/
) e: K, G% [. V9 s! V: y7 Mis% s* ?" i v& l3 f7 H
part, GlobalDistObj, assignLObj:object;row,Lan:integer;0 [9 N8 h" l0 K9 \0 S
do
- \1 s9 g% E: J6 X3 d Lan := rootfolder.Internal.Tools.AOLlanguage;
9 H$ C2 M2 g" V' S# {2 x/ F* T( T6 R if current = @.Destination -- else return
2 z2 Z" L5 u# @) ] then1 W" A/ y; D* e( q/ {# e
@.Destination := void;/ b @. n+ U( S) g( I
if @.occupied then/ \( }8 B, ]6 D6 ?) o0 s; P
part := @.cont;3 J# \& S p5 d6 G1 h
@.transpOrder := void;9 |; M; f- K% K* ]
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
# A4 L: @ m& \$ X9 {- c @,root.eventcontroller.simTime);
9 K; ^9 {9 F% N0 d0 O @.HasOrder := false;
: a c% K! ~" B5 \) W @.DrivingHome := true;, a4 p8 j3 t3 G9 Q- I& T3 d$ ?
rgManager.tryToStartTransOrder;
! s3 `* m* {: v if @.Destination = void
9 L& s' c! T% ^7 Z% P then -- no transport order for vehicle @2 z. E" U' _) ^" ]/ p/ F: q G
@.Destination :=
" r5 b. r; R: B$ a6 J( I rgManager.nearestFreeStation(@,track.~);
! j% F" G/ l* W( V6 x8 Z newDirection(@); 5 ]: M% N/ R: k c3 W, f6 @
if @.Destination /= void then+ d( K! |& y1 w/ v1 f9 f+ {# @
@.Destination.NumReservation :=
; K/ T- _, N: T; l @.Destination.NumReservation + 1;& ^' ]# t( c2 H& E% O
end;" K% N3 X& \- V+ L l1 U1 |, g
@.CurrIcon := "drivingHome";
( c/ K. e9 d; z @.DrivingHome := true;
. u7 j+ f! t4 p+ u! K( Z% \# v! o end;
) l. T, P$ u Y2 u' V else -- the vehicle @ is empty, both vehicle and part are in the same dock station$ J- H! ^3 n3 w8 ^& E' f$ u5 H
part := @.transpOrder;/ H9 G% ~2 N: B$ R1 a* [$ I
part.move(@);-- load part
' S; n1 L+ X9 H @.CurrIcon := "load";7 i$ \# ~0 s5 |! T9 D: P
GlobalDistObj := part.globDestination;
# l; F+ C. m4 B: n assignLObj := rgmanager.rgAssignL;! S# b7 R" O) k* |1 ?
row := assignLObj.getRowNo(GlobalDistObj);) i% B9 B6 D0 F
if Row = -1 then -- since 700 ]9 p! b) c' p! A/ V
if lan=1 then$ O7 v/ [6 Z( c$ R+ A& f' @
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
4 Q1 R% Y. {5 i. @9 z* v to_str("in der Andockstation: \"",?.~.name,"\""));
/ r6 p" ~6 I/ ]! p/ w$ z' i else
3 J- [: H: p5 V promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),/ G7 y% E8 k2 \: ~7 e0 C
to_str("in docking station: \"",?.~.name,"\"")); 3 g: s5 U) L4 \
end;
' t- V# H0 b5 i( a else
( c& `2 y( y1 S- t$ [ @.Destination := assignLObj[1,row];
; `, o8 |+ t# b1 Z9 W$ u1 m3 t% @ end;
" D, M; q) c. W/ q5 r" p newDirection(@);
8 v7 K: P% m+ Z2 o0 r% |2 y @.HasOrder := true;9 V7 X' Y+ I; j- {- ?
end;4 O! ]( O2 y, L4 [7 c9 {
end;
5 x, i- u2 \3 J2 _, m0 {- b+ Iend; -- of the method& h6 }' q0 w% D: C7 U9 I
|