/* called by: entrance ctrl of the object 'track'
$ Z' u2 s( Q( p/ v" }1 q*/
1 g* I7 X# V, |is. S; B* r1 j; I6 t9 A
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
1 F; h( Y" `' Y+ @( _7 fdo
8 z- f& i8 K8 H: k Lan := rootfolder.Internal.Tools.AOLlanguage;
0 Y+ y* _6 V* f9 l! p9 R+ e if current = @.Destination -- else return X4 O7 x0 ]% m0 K
then# S8 L9 }/ i, h1 A0 q
@.Destination := void;" Y2 ]/ D9 Z) k' s, b3 h3 |0 @4 N
if @.occupied then1 [. {0 X7 @+ h% {2 P2 z2 a
part := @.cont;
# p/ T6 V( ^* g: q7 }' l6 v @.transpOrder := void;
9 M$ w$ ?! I! H. h% ? part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
$ q" d: p1 D5 G: c3 l# d @,root.eventcontroller.simTime);9 K, T# `2 k" n, F8 h( l3 m
@.HasOrder := false;
3 w" a. Q5 ~! M3 m% q* @' N @.DrivingHome := true;/ C- D' J. i+ n* a8 c
rgManager.tryToStartTransOrder;
; G2 v( Y/ b0 P# |$ B, ? if @.Destination = void
U& k0 K C) k3 t5 V then -- no transport order for vehicle @8 ^0 A4 }6 |$ f/ e9 E6 W
@.Destination :=
" O4 ^, g8 ~8 [; W& V rgManager.nearestFreeStation(@,track.~);& T8 U$ S' b1 u& L/ N
newDirection(@); 1 T5 a( o& S& Y& L4 d
if @.Destination /= void then# s4 @ W& a, @$ _- v
@.Destination.NumReservation :=
' L4 F, Q! P- a# n \ @.Destination.NumReservation + 1;1 r3 O- H4 I2 I1 a
end;
) Q8 c# J, h) X( X; |- |1 S @.CurrIcon := "drivingHome";7 b( w: c! C$ {
@.DrivingHome := true;: T0 e8 X: O6 |# V' d' J
end; O& w. [/ |* T' j- X9 z! O, Y; g
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
/ l M8 R3 Y/ E; | part := @.transpOrder;& ^. M- B4 k, H' b" T
part.move(@);-- load part
8 u3 l# Z- U& a' x @.CurrIcon := "load";
" }$ u* s- a6 h8 E GlobalDistObj := part.globDestination;
/ X* e" k( E5 k# t assignLObj := rgmanager.rgAssignL;
$ c0 K5 q' H1 `( i1 M row := assignLObj.getRowNo(GlobalDistObj);
. H8 C, e/ n' _' [5 ~" }* d if Row = -1 then -- since 70
0 \; \0 @' N, ?2 R& u- { if lan=1 then+ W, E2 v& Y# r7 U7 R5 K
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),3 D+ o0 R6 U# \& L
to_str("in der Andockstation: \"",?.~.name,"\""));
- i! E0 @7 `) G8 a, m6 k else( I0 T3 F; y" B2 a% {; T8 C+ G$ y
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
6 i) D! z- X2 G# s8 P! \8 L8 X/ n to_str("in docking station: \"",?.~.name,"\""));
' z z. B1 g/ z1 Q end;
) P( Z* r) N; L m& E& u# D, | else
2 q7 T/ J& R5 y+ p @.Destination := assignLObj[1,row];
( V, \& O2 j7 `+ C+ d4 u" k' [ end;
& u+ c; G+ `; Z8 C newDirection(@);( }! C4 ~' i! h
@.HasOrder := true;. Z2 t- `# O9 D" i6 J6 k
end;* D1 |6 c8 x; x6 n1 y1 F
end;
3 P: O+ s5 h+ S* v* z) a) }end; -- of the method7 d$ X9 R/ W, Y3 b9 }4 A) `
|