/* called by: entrance ctrl of the object 'track'
- _7 R, I- T% P( {) p( c*/
+ U/ H0 G3 n2 X' `: T ?is
( v* n$ V6 h/ G4 ^) L( \5 m6 l, K part, GlobalDistObj, assignLObj:object;row,Lan:integer;4 @$ g! Q& ` {: P8 r1 O
do# V9 o4 f7 t+ t- \0 G) }. d
Lan := rootfolder.Internal.Tools.AOLlanguage;
) J1 \) S9 Q D if current = @.Destination -- else return
/ U7 j0 U/ u9 E then' N0 v7 a M% s% O4 T
@.Destination := void;+ E* j+ J. q4 ?: c4 ]
if @.occupied then5 Q+ h% }+ w) T6 V5 k: ~
part := @.cont;
% y4 k( m) Q) U% z% E, H6 J6 q @.transpOrder := void;
4 F8 g4 K$ S1 h, R$ X part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,& m/ t6 ~$ n% L$ I+ D2 f0 _
@,root.eventcontroller.simTime);
. o* I; M( m7 E. F6 X" _1 u) N @.HasOrder := false;# ~! d: X, @ V" {& ~; I0 F
@.DrivingHome := true;
+ k! X9 z1 \& M, }; q. R3 ^( h rgManager.tryToStartTransOrder;
, A1 G" E1 W; x) c5 Y( W if @.Destination = void
( v( m+ E$ }" o _# T then -- no transport order for vehicle @; M1 }4 g6 Z" P) @; ?2 K6 x- I# G
@.Destination :=
* Q5 B3 _+ Y- j i rgManager.nearestFreeStation(@,track.~);
* w$ I' z8 ~$ I* Q; H newDirection(@);
8 Y# E4 x. U: u2 d, b if @.Destination /= void then z+ x: F* `8 J( F, T) I
@.Destination.NumReservation :=
3 \8 w2 _ [, `! ] @.Destination.NumReservation + 1;
4 W& a3 P1 o5 f end;" _6 E" ?% R! o' {
@.CurrIcon := "drivingHome";7 Q3 `& a6 ?5 @: y$ @" }9 E4 U7 Q
@.DrivingHome := true;( f$ A9 k0 n" t$ Z. Z
end;2 h0 A* m* {# |5 Y" N! K3 N
else -- the vehicle @ is empty, both vehicle and part are in the same dock station- q/ J& |; L# y& n& m0 G
part := @.transpOrder;
1 j' Q' J$ z; t4 O- q2 x+ n' r part.move(@);-- load part3 b% s0 i+ V9 ?( R5 ~
@.CurrIcon := "load";9 P4 D& v7 d- ~0 D% {
GlobalDistObj := part.globDestination;
* @* i# m, d/ n, L: Q; s5 \ assignLObj := rgmanager.rgAssignL;. H! [+ P: k' ], C/ J1 f
row := assignLObj.getRowNo(GlobalDistObj);$ T6 d/ l% b2 ~; z- K
if Row = -1 then -- since 70
0 E- s& c4 ?. A [ if lan=1 then
( L& M; _, j- ? promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
* ]7 X4 h/ W3 q/ d0 D: U2 | K, s to_str("in der Andockstation: \"",?.~.name,"\""));7 h5 P% c; d8 Y
else
3 i5 B. S( k9 f promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),5 R1 m4 Y2 z# }0 E( U
to_str("in docking station: \"",?.~.name,"\""));
) O$ }% R; L( P& a+ Z end;
5 D( O; e/ y- j else% W3 q, c) H; p) ~
@.Destination := assignLObj[1,row];- U# q% `- R% l+ D8 f
end;
- a; _7 \7 @% |( J$ g7 x* c/ c newDirection(@);
- K3 C9 c! o( }+ K2 T. `# g2 K% w @.HasOrder := true;; m3 ^, x; ?, u- |
end;
* e% Y4 v3 ~) \1 x" b. `6 A end;$ |1 \7 b/ s7 j: ` K
end; -- of the method- B: B1 J- ~, A ~0 `
|