/* called by: entrance ctrl of the object 'track'- Q8 T" x! N, [- ?1 [- B2 n
*/
8 @& X* M2 a$ T& Q: Kis
, Y. l# B' L5 _$ m0 u* c9 ~ part, GlobalDistObj, assignLObj:object;row,Lan:integer;' \0 [) ]2 p7 X
do2 S3 P( e; I. a1 D: f: Z7 w. f
Lan := rootfolder.Internal.Tools.AOLlanguage;
7 c0 ^6 S8 A/ X( P2 D if current = @.Destination -- else return4 `; a8 k2 u2 ]2 }1 b. y
then, m. m; t4 V- k" c# _
@.Destination := void;
" Y) `0 v% E. ?. t if @.occupied then+ h) m5 R$ L, e3 C& Z
part := @.cont;
* w+ S9 h2 i, W7 T3 Y2 V @.transpOrder := void;( O& _3 z0 g. q6 G3 q; U* O
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,- a0 m7 I$ `0 @. c
@,root.eventcontroller.simTime);5 E5 V: W- A" o+ j4 Y& G. e
@.HasOrder := false;
: Y; X( q1 p0 Q* e& u7 q8 ~1 M: z @.DrivingHome := true;& w, y7 H4 V- |! T0 }- s1 j
rgManager.tryToStartTransOrder;
2 I" h" `0 Q) m! p. Q: e2 g% Y if @.Destination = void# _+ G9 ~8 I) L
then -- no transport order for vehicle @
% L4 {! u4 p1 B @.Destination :=
! `$ ]& S2 `, W- O* } rgManager.nearestFreeStation(@,track.~);! `6 ^- B" b* d+ w* G& L7 [
newDirection(@); 8 I' o# s# }; @, ]% O5 `
if @.Destination /= void then: }. V9 c+ C0 v8 e% A% V
@.Destination.NumReservation :=. q/ x: I' {$ J$ M9 j
@.Destination.NumReservation + 1;# a. n* b4 z7 i4 H* j
end;9 E: h. G* C$ O5 {8 K
@.CurrIcon := "drivingHome";9 f+ R' o: c! R, ?$ }/ Y# q
@.DrivingHome := true;9 w! s: I" u6 k( {: _+ j
end;
! o8 y7 v; h- [2 |: |$ I% M else -- the vehicle @ is empty, both vehicle and part are in the same dock station& i) H& h' N5 N4 v9 x
part := @.transpOrder;
! p; w0 e1 F" [8 {, ] part.move(@);-- load part
: p, x1 H R1 y" E. C! C8 \ @.CurrIcon := "load";
1 K$ I, a Q; s GlobalDistObj := part.globDestination;4 ?* U* @( {: ?2 I! W4 p3 X. X
assignLObj := rgmanager.rgAssignL;/ d8 c9 B$ R4 r+ _' q
row := assignLObj.getRowNo(GlobalDistObj);
5 z2 L8 Z+ R5 x6 h if Row = -1 then -- since 703 G; W/ ~* E6 e( P" T
if lan=1 then
5 m0 ~; x, T7 E* o promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
5 J0 I, P" n0 h' P! `+ y0 H to_str("in der Andockstation: \"",?.~.name,"\""));( ~5 C3 R7 i `
else- M4 Q1 B( a9 Q: N3 e
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),+ B2 m( g4 V q) r) ]- ?+ j
to_str("in docking station: \"",?.~.name,"\"")); + j' `/ | n5 f1 b' v
end;$ X) z5 A p9 g8 ?+ c2 a8 @
else1 ~) E% o# B; H# o
@.Destination := assignLObj[1,row];
i3 C- D- C) R# X# H1 P% e end;
1 }) f& }# |3 p( I: S0 j newDirection(@);
! ]1 m( C% ^7 o& K2 D* x @.HasOrder := true;
2 N! D% Q5 _0 u. L# Z end;" w, Q4 D- O$ w& b6 }( r
end;
1 J0 ^0 ~' ]) l5 r# A' E6 Mend; -- of the method% P$ e9 V8 Z/ S/ I
|