/* called by: entrance ctrl of the object 'track'9 U* L5 S* u& p0 m" ]
*/9 P" {" e* k% `% I& C4 D
is
[3 z$ v' t, w part, GlobalDistObj, assignLObj:object;row,Lan:integer;: J% r; M# n3 u: [7 r# |
do
/ H q$ G: j/ u5 t2 b7 _! E Lan := rootfolder.Internal.Tools.AOLlanguage;
+ \& Z: p ~( o1 I1 p if current = @.Destination -- else return
$ M0 s1 O3 {- K6 w% P9 v' W+ h then+ z1 e, Y& u( v8 V
@.Destination := void;. [+ \+ n9 |; a( G. i$ Q7 |; F
if @.occupied then
( `& m6 m9 d K( j part := @.cont;
3 ]6 ~$ G' B& D" s* E! Z @.transpOrder := void;. O- Z1 o) }, ^3 C5 ]
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
1 B1 d7 p5 @, A* c7 b3 A @,root.eventcontroller.simTime);
6 l% ^4 V+ Y1 V. Z% i- z2 E @.HasOrder := false;
0 _" h3 m7 p: N5 |6 k* n @.DrivingHome := true; w6 z' D4 }4 B( F( t$ h
rgManager.tryToStartTransOrder;
2 q f7 }/ c+ Z2 Z o if @.Destination = void
9 U! u0 ?# U! E; W5 I1 h then -- no transport order for vehicle @
7 W' A" X) g1 u& U: J- L# R @.Destination :=
% _3 _9 E% q+ `. u+ p6 s J rgManager.nearestFreeStation(@,track.~);
H+ ~. g: B( \4 Y$ u* P newDirection(@); 2 B) I/ i2 ^, G" G" h' I- h: |5 S
if @.Destination /= void then
3 C A4 o7 t+ J* A( g+ v @.Destination.NumReservation :=6 i9 H0 D# x0 ?6 z0 L; y( p
@.Destination.NumReservation + 1;. F; k/ u3 |0 _& w8 T
end;! v! N" N( }6 D% ]8 D5 q3 A
@.CurrIcon := "drivingHome";
Z! X) ~. M$ W3 S% U @.DrivingHome := true;
3 ~; g2 w1 S \3 h end;# N$ a" u7 b2 X
else -- the vehicle @ is empty, both vehicle and part are in the same dock station5 N/ ^4 g z: U- K7 O2 g
part := @.transpOrder;) ^5 M& D3 d! ~- d4 x: s
part.move(@);-- load part
% P6 a7 k/ s* s& Z- W- E2 L" ` @.CurrIcon := "load";
5 ~% N, U+ Q2 A4 ?) Q. k GlobalDistObj := part.globDestination;
( ^; f. f. [# Z/ [. W( D: ]& O assignLObj := rgmanager.rgAssignL;, F6 F) I0 u7 J( P6 Y6 l! y
row := assignLObj.getRowNo(GlobalDistObj);
6 O4 M: f" p) K) Z. ? if Row = -1 then -- since 70
: ?0 z, z1 @' H' s+ G4 Q/ v' k if lan=1 then
# z* H0 Q- B/ n/ w7 F8 I promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
6 p0 Z& T1 C! y9 U; \- [9 T to_str("in der Andockstation: \"",?.~.name,"\""));- @' v9 z9 c) Y" @4 D
else. |: {$ u% M0 R( l
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),! l/ X% a* t& y0 z+ H
to_str("in docking station: \"",?.~.name,"\"")); 2 E, ?% W+ A, e' r, e- \' V0 _2 @
end;
' n, A* q+ R8 k$ c else
+ h4 P6 u4 _7 |' e7 V @.Destination := assignLObj[1,row];
( ^! B% V1 n+ r/ Q end;
+ r3 c4 z& D* C( g& e2 j' k newDirection(@);3 |; l# t! z4 }3 e
@.HasOrder := true;
- O2 D5 d# ~& K R6 ]6 T end;7 l$ z2 F" b1 F& P/ u
end;/ N- m. z3 n) `* V
end; -- of the method
" D' J9 N! V7 ] y4 z |