/* called by: entrance ctrl of the object 'track'
: v/ o8 |0 C o# S# p) {, v*/6 r M3 v7 F5 n8 s. W% \
is3 t0 Z. m3 D; y/ O" i" S
part, GlobalDistObj, assignLObj:object;row,Lan:integer;- j! c z+ a: [$ M) F0 ?, Z) \% k1 ?
do1 y0 a" \$ n+ E) ?3 O {: G( ^/ w- B
Lan := rootfolder.Internal.Tools.AOLlanguage;' T8 d6 _8 [3 \3 Y% f5 I
if current = @.Destination -- else return
3 m# V) x# M7 P& G9 d then
5 Z/ d6 F1 w+ e( |' c$ | @.Destination := void;
4 V# Y$ M6 C ] if @.occupied then. R B2 M% G6 e2 b6 [2 z
part := @.cont;7 U0 ]) {- r, P! Z- P
@.transpOrder := void;
$ I; G& C3 g* T1 ~0 } part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,1 U9 f6 u' e1 N" v
@,root.eventcontroller.simTime);
/ H7 m- ~/ r" W @.HasOrder := false;
* I g# _9 e9 x# u0 g2 Z @.DrivingHome := true;
' q! P* l V) H rgManager.tryToStartTransOrder;
0 I. ]. ~5 c& {) p5 r) d8 @; M7 ?6 J if @.Destination = void2 r' s. m4 e$ [( T. H
then -- no transport order for vehicle @
% N: c/ l0 h' O1 Y @.Destination :=1 a% F- G/ |: J. H: |# I
rgManager.nearestFreeStation(@,track.~);
4 l# \; b1 R4 q! L newDirection(@); . L: Z: S% L" T; x! y
if @.Destination /= void then
9 x( d+ S6 T& p% O$ M @.Destination.NumReservation :=
) e8 A# t7 u7 U6 {& o6 \) J @.Destination.NumReservation + 1;: ?: ?9 C. [5 V& L" a3 C
end; n. V J1 N: j/ ]
@.CurrIcon := "drivingHome";
$ b8 M; u! T+ {0 e8 O- ?+ ?$ ~# A @.DrivingHome := true;4 {9 z9 v* O9 x
end;
0 F( [* y/ l3 d1 X: s: Q* u4 F else -- the vehicle @ is empty, both vehicle and part are in the same dock station; b7 E. q) [: [2 G8 A& J7 f: e
part := @.transpOrder;2 b) E$ U. u: S: x. t
part.move(@);-- load part
, }' q, ^, D Z! p/ c Z: h2 R @.CurrIcon := "load";' e) y( }5 v9 V5 ^3 c
GlobalDistObj := part.globDestination;
8 z0 Z5 E/ b0 i' l# j1 ~ assignLObj := rgmanager.rgAssignL;* B7 ?5 E$ p* R- _/ L
row := assignLObj.getRowNo(GlobalDistObj);
1 }/ M4 k+ H4 j/ s* V3 i if Row = -1 then -- since 707 a" [3 d, S, J$ `, k
if lan=1 then
1 w8 x r1 X I4 g. N promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),6 u2 n; w( `; m% l( E4 H0 K
to_str("in der Andockstation: \"",?.~.name,"\""));
( k/ s0 |8 Z$ u, H7 o. N0 ? else7 i: H/ N& N% _# ?! T
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
9 t# z/ Y4 u; _4 i3 Q to_str("in docking station: \"",?.~.name,"\""));
7 Y. U. ^( o* o" F end;
' R, ?: h, a8 L0 V# {3 r else/ c$ k" D! T, m* Y6 z$ \1 u$ t
@.Destination := assignLObj[1,row];
2 h6 f% J7 L# H6 `: g% }& z- `. G end; 1 y/ F# u& u6 C# o& P7 b
newDirection(@);1 B: N# q, h* p- S
@.HasOrder := true;
0 b0 N/ @# r2 z end;) ^0 m+ f9 d4 h; h! n) A: V% L
end;
) E+ }) }& d; tend; -- of the method# x9 E8 u7 @0 t' ^# G% ]6 `" f8 L
|