/* called by: entrance ctrl of the object 'track'
6 S2 Y& g+ O6 z/ K' D0 e*/( O$ j& G# {* v( T
is+ v6 |0 I$ [. Q# v
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
& o0 j% Y2 O5 o7 udo
, ^. x3 z" d# ]1 C) Q& ~7 y" H Lan := rootfolder.Internal.Tools.AOLlanguage;9 _0 h) j2 y4 d" a i; Y* p* G
if current = @.Destination -- else return
5 A4 X" X7 T; T% o' Q ^* ]1 n then
" i4 c% b; h- l* H w, [* I( M @.Destination := void;0 g- G4 ^- ^, ?2 v# i8 u
if @.occupied then
( \% @! I: J+ l ^: V part := @.cont;2 Y! o# X- `2 Y) B5 S: _
@.transpOrder := void;
2 @& G* J9 r$ ?" c$ p4 I) o part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
# p! A4 M$ P4 g T, V# Z' V( | @,root.eventcontroller.simTime);
0 H! r3 i/ Q/ D$ ` @.HasOrder := false;
! L' q" c Y* G I7 |6 g" x @.DrivingHome := true;
% ^) Q& y7 Z& X" V9 v7 Y rgManager.tryToStartTransOrder;
# h; e% `5 w% r* v# F3 p( L3 @9 p if @.Destination = void7 h. p1 L; L% f
then -- no transport order for vehicle @" _4 s3 ^3 \6 m7 D2 l
@.Destination :=
- G5 |$ P0 \* M4 o rgManager.nearestFreeStation(@,track.~);
) ?$ a8 V* R( G0 |0 ] j newDirection(@);
! N# N- t" k2 K4 U( v- o3 U if @.Destination /= void then+ P$ F. H: F8 a
@.Destination.NumReservation :=- [: X$ a' Q5 R
@.Destination.NumReservation + 1;
' ?1 l8 c7 |0 p end;* u K. @0 Q! @$ H: A
@.CurrIcon := "drivingHome";' W4 r2 |! _1 t6 c+ G
@.DrivingHome := true;
) n& r3 [% r4 H end;! v; \: }) p) L0 X# `+ {
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
; v! s% U) u2 x7 G E part := @.transpOrder;$ Q5 r/ `; G$ F% B' d
part.move(@);-- load part4 E9 L7 ?: Z& p! b! o, S* M' ~3 q) {9 U
@.CurrIcon := "load";
5 A1 ^5 h. o5 a* h$ u GlobalDistObj := part.globDestination;7 F/ n9 {3 r: l
assignLObj := rgmanager.rgAssignL;
2 ?8 F3 B c" ^, q1 q2 ~5 e row := assignLObj.getRowNo(GlobalDistObj);4 f0 y+ b$ C- k1 |. t
if Row = -1 then -- since 70
* s8 `' h6 C) Q! n" k if lan=1 then# S& s! ~9 [; N: J* w6 Q# r
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),0 E* m& t% m( Y) I6 |6 w% ?3 V
to_str("in der Andockstation: \"",?.~.name,"\""));% F/ k* {' f, X
else8 A3 G K F+ I( o! Z6 i
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
5 j' G. D2 k. \& ^7 c% m8 V; S to_str("in docking station: \"",?.~.name,"\""));
& f5 H7 d* ]) f7 k1 F! D7 f9 _ end;
2 P0 H% N4 V' A9 p, ?7 L else6 ]1 {& G1 o! Q
@.Destination := assignLObj[1,row];: z3 j) ^, x6 u+ r
end;
# b6 K2 t. G/ u newDirection(@);3 }4 u8 ~7 u* p, ]1 d) ]
@.HasOrder := true;
: `& F7 @. w h: S( y( M& k end;- e3 h7 _- F4 Y. ?
end;
* o0 [9 A+ U7 n3 G0 c' G+ Qend; -- of the method, t1 O# u! d: w7 Y
|