/* called by: entrance ctrl of the object 'track'" y! o$ r9 R7 Q" h$ U3 q' L
*/
' V2 A1 J% h3 H' Z+ Iis+ ]5 q/ W' y+ m7 |: N+ U6 a
part, GlobalDistObj, assignLObj:object;row,Lan:integer;3 \3 g; b( {& P* \8 r
do
: C* N& P$ ?# r; a* o Lan := rootfolder.Internal.Tools.AOLlanguage;6 q, ]7 T: ?/ J
if current = @.Destination -- else return) W. Q! l# w7 P, |0 {' o
then
" z* x+ {; y/ q7 Z# g8 j0 |. C @.Destination := void;
: X: J" l! T3 U if @.occupied then
$ C& n2 Z6 Z; F part := @.cont;
- M. O d; y7 ? @.transpOrder := void;
( K0 o" M4 B3 d! |' T4 Y, g4 v& \ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,* V" A5 f6 c; F! j: h3 g
@,root.eventcontroller.simTime);* D; X2 s% U' ~% E5 y! H
@.HasOrder := false;
' P. h# f1 i4 F) ?8 a) h @.DrivingHome := true;
* r' c, [) m' \( U0 e1 v rgManager.tryToStartTransOrder;
$ m0 k. N4 s2 h- Y* G8 F+ c" S" M$ H' e if @.Destination = void+ g+ k% b6 j/ P8 i
then -- no transport order for vehicle @' B4 M: W3 u1 w6 }' ^3 G
@.Destination :=- O% s$ S1 o: Q" F* o7 X8 ]
rgManager.nearestFreeStation(@,track.~);/ N+ P+ i' f" A9 `
newDirection(@); ! t+ }; e h7 G. D/ c
if @.Destination /= void then( J2 }0 M8 L4 c6 O6 Y
@.Destination.NumReservation :=3 j6 u4 q% [' Y. ?/ f
@.Destination.NumReservation + 1;
" k2 t5 h6 z# c end;* u! |6 @( F7 r: b
@.CurrIcon := "drivingHome";. ^, g0 |0 |; n4 B7 D) A8 j1 D
@.DrivingHome := true;/ V: }5 G; E6 O& i% M6 l; G
end;
4 w0 T/ P& b4 R* Y) @ else -- the vehicle @ is empty, both vehicle and part are in the same dock station
6 o2 |. c2 @- p) C- F part := @.transpOrder;% K* {( i% A. t: p' l
part.move(@);-- load part
% h% ?/ l# h5 ` @.CurrIcon := "load";; T( W6 f6 w. w) @7 _* S$ ~+ [
GlobalDistObj := part.globDestination;* ~9 z7 K" S+ G$ x/ S4 N7 n. {# T
assignLObj := rgmanager.rgAssignL;
( [) N! l6 @$ E+ [ t/ w; } row := assignLObj.getRowNo(GlobalDistObj);6 x9 o0 E+ ~2 i
if Row = -1 then -- since 707 P1 H3 F# C9 s' p6 M4 k2 A0 \% _
if lan=1 then
9 g9 ~) F- N5 v5 z promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
" X0 c' { _+ |. e$ `) F+ ? to_str("in der Andockstation: \"",?.~.name,"\""));
/ r5 p- w# b" O u' I else
" P, n7 o. H0 D, M j" ^" x promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),. W8 b) |1 C7 P7 o% r" U2 t
to_str("in docking station: \"",?.~.name,"\""));
( D' |% b: x' B) M8 n. K8 n end;0 Q Y8 t3 n( ]6 F* q2 a
else! K0 L2 |' L) _ j% _9 x: F1 V
@.Destination := assignLObj[1,row];
1 ]# A" `$ S4 H+ n. S5 `+ w# v end;
4 p: T' i# A5 c0 l! l newDirection(@);
) \4 N2 W* ~% J5 Z6 p @.HasOrder := true;
, H3 d1 v2 J: Q% @ end;
& Q) O* M& i- B& q0 o8 o end;
7 R2 b! A7 w% q6 M" Rend; -- of the method( E; \! r* b% V, B, T
|