/* called by: entrance ctrl of the object 'track'
1 K) e, I4 O- c*/6 j6 `8 [. h& }
is
& }. |+ U( j1 G. L part, GlobalDistObj, assignLObj:object;row,Lan:integer;+ A* @: Z& m" y
do
$ H% Y5 t9 [8 x% r( A0 O Lan := rootfolder.Internal.Tools.AOLlanguage;, j! |1 F V- Y; ]) ^0 X' S
if current = @.Destination -- else return
^& n) f3 o6 V) F" V$ w then5 l; h6 x' O3 n. N1 I
@.Destination := void;
, q' H( a& ]) Z* C, ?1 K+ t if @.occupied then1 [- B Q2 Q6 }/ y8 B& Z
part := @.cont;
) ?/ F% { y( Y% M @.transpOrder := void;, t9 g$ _" X5 n" ? }
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,$ r% i+ ?" h0 Y: @1 ?1 L2 U+ g
@,root.eventcontroller.simTime); r' E( s- P) `' c
@.HasOrder := false;" P5 T* o/ m1 W! e
@.DrivingHome := true;
" q7 y3 a2 p, C rgManager.tryToStartTransOrder;
+ m! F+ ^6 s* l9 ]- m7 A. c, z if @.Destination = void; H1 C5 E I6 R( w$ R( W
then -- no transport order for vehicle @
/ ~/ }* M9 E- w @.Destination :=
3 ?. D: [& ` O3 G0 P: J5 x rgManager.nearestFreeStation(@,track.~);
O" q4 x' b: O+ g$ J* k newDirection(@); 0 d: d& e& x/ A% r
if @.Destination /= void then
( H+ E4 J( W ?& a& m$ p6 y @.Destination.NumReservation :=) {, T0 }$ T; I5 m3 a
@.Destination.NumReservation + 1;% [) v, g: a/ v$ _: _) `/ D" X
end; s4 C! `; w. ^4 h5 J9 Q! P
@.CurrIcon := "drivingHome";
' f; Y/ K- y& h1 }. W @.DrivingHome := true;
& _% A: K' X' P+ {& A end;$ W0 G( }! k3 U* G d: G7 G
else -- the vehicle @ is empty, both vehicle and part are in the same dock station4 S9 V$ h3 A4 x' a+ _0 |3 ^# ~7 R
part := @.transpOrder;: M+ x+ ~0 O' c3 B* P) {
part.move(@);-- load part M0 a2 J$ r8 m, t( f
@.CurrIcon := "load";0 Q0 Q0 R. U# n C5 m9 P3 n
GlobalDistObj := part.globDestination;
! r( r! }- F! q" ~8 @ assignLObj := rgmanager.rgAssignL;& R6 K3 m: p& t6 ?- \ l8 m
row := assignLObj.getRowNo(GlobalDistObj);
5 O& C$ J0 z! Y& _0 z: A! g, g if Row = -1 then -- since 70% N7 C5 [; d: s$ q
if lan=1 then" F7 j7 B. d# M( v
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),; |& V6 G/ n8 ^# q4 K. I: G
to_str("in der Andockstation: \"",?.~.name,"\""));
) }. p2 {$ U0 Z' _8 S else
) C0 z; D5 P( s: k) F promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),2 F8 v4 [& L3 }0 i3 X
to_str("in docking station: \"",?.~.name,"\"")); $ s4 S* [$ n9 F# R
end;
* E$ Y' h7 h3 W6 }! |$ ?3 V) C else' X! ?# z8 ]' c- M4 M
@.Destination := assignLObj[1,row];& i; U3 e: g4 [, t& j
end; # n- D, ]" { t6 X Q
newDirection(@);
+ l. q' l$ C1 V/ s7 t7 K8 `, X4 c @.HasOrder := true;
& u- f8 ~0 g- d& _# Y: c2 n7 o end;5 a1 t7 C* B* S! z3 x) w
end;: {. c2 ]/ T; y% D* l h5 F Q
end; -- of the method/ h$ h& h$ r$ [! ^' R
|