/* called by: entrance ctrl of the object 'track'/ p0 a6 H) [% N) d: ]& b" n
*/
, v6 F. _2 f6 Iis
& j8 ^% K ^9 w1 Y4 S5 e% P& a t part, GlobalDistObj, assignLObj:object;row,Lan:integer;
7 p5 u, j( R) |! K# w2 @/ \0 O. H- ndo* N$ o9 q2 V+ u1 E8 }9 ^
Lan := rootfolder.Internal.Tools.AOLlanguage;
5 p' T2 `8 j/ N- F if current = @.Destination -- else return
- |! i, P- \# W: D- v then6 ^ E2 }1 _" W0 D6 c$ Z
@.Destination := void;7 N H1 o" Y5 V7 w# |
if @.occupied then
6 Z( K d' s: Z: q" m part := @.cont;- ]. f0 e g% F6 h' B8 e- n
@.transpOrder := void;! V- Q* {$ B' {$ u
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,, S: _9 j' i9 Y( F
@,root.eventcontroller.simTime);
2 G" f3 y% z- d' W" F @.HasOrder := false;( {, S3 o# ?6 q4 ^
@.DrivingHome := true;
3 a" w% z$ @/ ?2 W rgManager.tryToStartTransOrder;
. u) I( a1 |, ^1 K4 X' t# T1 o2 {4 l if @.Destination = void
0 m4 E0 p4 g/ z2 q- L then -- no transport order for vehicle @
2 }+ v/ L( w. } @.Destination :=7 w7 I) |0 e/ b: D h' z9 W
rgManager.nearestFreeStation(@,track.~); r$ s8 J3 P% ]# J# t( d! M
newDirection(@);
I/ e3 Q! i- ]( S, g: x if @.Destination /= void then
7 i/ @ U/ E- O" c( I8 }# ^4 d% G7 J @.Destination.NumReservation :=- o+ _- x {% b9 p: j) f! w
@.Destination.NumReservation + 1;
0 ]- n8 I# A3 m: J3 g4 g& G! r end;& r5 x% ~% o; v: t2 g
@.CurrIcon := "drivingHome";
# ~# b2 h( I y+ x @.DrivingHome := true;
$ O ~3 l( y N) u8 ^6 h end;8 s, B+ K J: Q8 v/ ]2 E3 [4 `, b
else -- the vehicle @ is empty, both vehicle and part are in the same dock station2 p, P& Y0 @ [3 x1 m6 t
part := @.transpOrder;) o& W7 C7 r9 d, \6 \4 T# U
part.move(@);-- load part
! Y, ~9 }1 e$ n# V4 w5 {! a- U @.CurrIcon := "load";6 L" T4 U1 K A5 S1 |+ x
GlobalDistObj := part.globDestination;1 {" @* x" C1 v( o. e
assignLObj := rgmanager.rgAssignL;
9 N. u; L( w( c' S1 U( o/ H row := assignLObj.getRowNo(GlobalDistObj);4 V/ t6 I: G- g. z
if Row = -1 then -- since 70
, h7 e8 L2 J- S' x; Q if lan=1 then! a' `+ ]8 s t1 j0 {% W
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),0 Q6 C/ S+ u$ z' {0 Y% H
to_str("in der Andockstation: \"",?.~.name,"\""));
( @' }7 j/ j, i" \+ l5 `' L else
. T: r% ]% E9 T% \% _$ G+ j promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),( E5 q: \- W% B/ z( U& @( A3 M
to_str("in docking station: \"",?.~.name,"\""));
4 f8 h. @& f) e4 P8 x* z& [) ?# Y2 ^ ` end;$ o' V2 o7 `- m: {' |$ k2 o
else8 A2 v! Y. N* M' Y% M
@.Destination := assignLObj[1,row];
2 a. b% X+ b1 g3 h) A end; 3 _0 Q% o+ j! Q) y4 P i" t
newDirection(@);1 q, M1 p% G$ `% l$ {9 l3 ]
@.HasOrder := true;
0 q8 E" i1 W2 o8 J3 g1 {5 p end;
# r& l% y, r# ~ end;6 a8 D h6 U6 r9 S- q- ~
end; -- of the method
8 p F$ H- ]5 J- Z4 B- ]4 W |