/* called by: entrance ctrl of the object 'track'9 b/ |' d1 A* C" P; o; I0 ?) W0 C. I
*// D( z9 s3 K+ h1 I& G
is5 B' m& `$ e+ E% Z& i0 |1 J
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
# _9 F4 ?7 O* G) A8 d' Cdo( v2 u+ u3 S/ [0 i: }
Lan := rootfolder.Internal.Tools.AOLlanguage;- R# J( O, {) \
if current = @.Destination -- else return6 e+ n) u l% [/ g& c
then$ w& D, O7 v$ |" X [* l/ f( h
@.Destination := void;
5 e4 U: s/ t0 \% S7 B if @.occupied then
. ]- S2 ]- d% \* B1 P part := @.cont;# Y1 X5 E0 L9 u+ F
@.transpOrder := void;; B( ]' {, x( R5 r) k& d% a
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
, n( p' ^0 v- L# O9 s @,root.eventcontroller.simTime);
1 E. d g! Q) x+ w- p @.HasOrder := false;0 V( q1 ~, i6 l d B1 m- a
@.DrivingHome := true;4 e( i: o; W4 B% ~% t$ X0 k
rgManager.tryToStartTransOrder;0 X# {( v# K' q2 ^9 @% l
if @.Destination = void9 V ]: B7 k. T% h& Y
then -- no transport order for vehicle @& ]1 m c" x! _, r2 w8 b7 p
@.Destination :=
. a% R3 b# b$ E3 p7 U" y rgManager.nearestFreeStation(@,track.~);
* P) I S! c% p; Y newDirection(@); 6 s' m/ q \8 `9 t- r) a# z6 d) G
if @.Destination /= void then3 b; k, Q! Q3 Z: i& ^) G
@.Destination.NumReservation :=! h8 U3 }" ^ _2 v; W
@.Destination.NumReservation + 1;
8 Z4 ]0 a7 P9 u( K end;
% C' w- `& K, z0 q7 U @.CurrIcon := "drivingHome";
. ?( Z M1 d5 S6 g$ T4 E @.DrivingHome := true;- N2 ?) ?5 @& s* q
end; @; D" _9 H1 b
else -- the vehicle @ is empty, both vehicle and part are in the same dock station" ?, R6 X3 c8 d1 a( J" k) E4 b, G
part := @.transpOrder;
8 k) Z+ _0 |8 Z7 {+ b& ]& Z I g( k part.move(@);-- load part
; ^1 i' p+ `1 I) _ @.CurrIcon := "load";3 K W2 W; t4 F# C. t( f% o" k
GlobalDistObj := part.globDestination;
$ h7 L2 o4 I0 a$ {) h: T assignLObj := rgmanager.rgAssignL;
# o# t, Z) [' O7 h row := assignLObj.getRowNo(GlobalDistObj);
9 }. o f1 z' b4 n$ z! t if Row = -1 then -- since 70
Z) \/ o0 \* G O- q if lan=1 then
. S) J+ O5 x, |* M. K6 X promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),2 q9 D% G8 C4 `
to_str("in der Andockstation: \"",?.~.name,"\""));( [/ |" Y+ S' G4 P- [7 }1 z. J, q
else- Z Q- o8 T) W
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),$ J7 c6 Y9 c9 D! T9 t: R& D2 Z2 m
to_str("in docking station: \"",?.~.name,"\"")); * A7 f" m" ?- Z& a
end;) P; u& m$ L* c1 O: J
else$ [0 g1 T% K& K' D5 |, L' s! I
@.Destination := assignLObj[1,row];
3 l% [8 @) M, |# Z. h* A- C) ]( E end; i! f6 S& d0 V" w6 ?, Z( N4 n
newDirection(@);9 Q9 ]0 `' C. N
@.HasOrder := true;
+ b$ g8 X. {# f3 Y end;
% k) @- T$ Z1 K9 O) H: x; l7 s end;" C) F4 z, J: Z' s( o7 @
end; -- of the method o# K1 a, L# @" W6 X+ r& k& M/ U# v9 g
|