/* called by: entrance ctrl of the object 'track'0 G3 L5 d$ s" {; q \/ B
*/! ^- `$ U' }0 Y3 z3 W
is
2 M2 n4 m3 k* C8 j7 J% n2 w7 n part, GlobalDistObj, assignLObj:object;row,Lan:integer;
+ R" ~1 X$ p$ \+ odo
' R# `. k. k8 h# D- K- d Lan := rootfolder.Internal.Tools.AOLlanguage;
_; A* R! p$ h0 k; d, e if current = @.Destination -- else return
, r, R( s+ [2 k4 G4 Z- d then) p/ W& F' n. M+ h* t/ L
@.Destination := void;! T/ N; A; j3 q; V; p
if @.occupied then4 ]$ C. k% c/ Y
part := @.cont;
9 j L6 v' a c0 z" P @.transpOrder := void;1 n G' r7 [' k: m) p
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,( j5 B2 m: m! E c8 g. J
@,root.eventcontroller.simTime);
+ K& B9 [/ o' @6 O @.HasOrder := false;
' v" i n m! G( u4 @ @.DrivingHome := true;
' I+ U& ^0 F2 |8 Q rgManager.tryToStartTransOrder;- F6 T) R, B: b: J& Q. d
if @.Destination = void/ p# \! U9 |( W3 R
then -- no transport order for vehicle @
2 i2 `3 W9 A: J! x1 Z: {$ Q$ z) Q3 h @.Destination :=
9 f$ S9 i* ?- G8 n3 K: j rgManager.nearestFreeStation(@,track.~);' r& T! |, c/ w, ^
newDirection(@);
( ~) t3 F: k" I2 V7 Y1 \6 V7 i* ] if @.Destination /= void then
) Z( S2 p& K; V4 R @.Destination.NumReservation :=
% T* H& Y& [ f' g* v$ Z% J+ f @.Destination.NumReservation + 1;; E# l$ z0 v1 O* c4 [. n# D
end;
, M$ y, s; o0 Q @.CurrIcon := "drivingHome";
& z N0 O7 w' b$ D @.DrivingHome := true;6 |2 i1 _# i; T% l* J/ n: T
end;* s- c4 a; E$ @6 _' b. a' v1 e
else -- the vehicle @ is empty, both vehicle and part are in the same dock station4 i: S3 H1 S8 t& T- Q$ \0 W5 U; T6 b
part := @.transpOrder;
' W# B4 u% S/ {8 F) Q part.move(@);-- load part* c0 A3 D" @) J) D/ h# h; e: O* o# N
@.CurrIcon := "load";/ X; [( [! y2 Q9 }4 o/ }& a
GlobalDistObj := part.globDestination;3 l) {3 _, K! ~
assignLObj := rgmanager.rgAssignL;, ]' r5 H3 ?3 E. ^, P. m8 E
row := assignLObj.getRowNo(GlobalDistObj);
7 B1 Z Y5 X' S9 @3 ]1 H if Row = -1 then -- since 70 w3 I& x# { h7 x4 {8 h
if lan=1 then' F, ?$ X, v0 k* P! N1 P5 P
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
: U4 W2 `& n$ n, ^4 H# ~6 X# p to_str("in der Andockstation: \"",?.~.name,"\""));
) ^2 w8 r: K7 y else
; w: T4 f& r: _# N2 c promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
$ l" \1 g6 a0 x) e, a to_str("in docking station: \"",?.~.name,"\"")); 1 w2 G& G7 d: O# |) K+ {, U) {
end;; t6 D9 r6 T' W" p+ r( m" |7 J
else( [9 U, O, _$ U+ L! Y8 z8 f! C
@.Destination := assignLObj[1,row];
+ _9 ^: I/ d/ [ q E5 q end; " \6 S9 L" Q+ R. C. g- K6 f( W' E
newDirection(@);
) j+ b( \. u! Z5 l4 L5 f @.HasOrder := true;9 h }4 ]! q8 @& {. W- k' B
end;8 u0 J; l$ `* Y+ F Z; B
end;% [# s. x+ ^3 q' r" y, [5 Z
end; -- of the method
1 J3 D! L& f3 d |