/* called by: entrance ctrl of the object 'track'
& T3 @1 K% h5 T6 m*/
4 R3 ]! o5 {9 \( K- fis
. K" i3 o: v* M s part, GlobalDistObj, assignLObj:object;row,Lan:integer;: M# Q n8 j j/ G, P4 R- N6 u
do
' Z' v% G9 ^, x! I( f Lan := rootfolder.Internal.Tools.AOLlanguage;4 b' T5 Y9 }: M; B' o* d v
if current = @.Destination -- else return
/ `1 l: X1 j- B( Z9 X. ~3 Z then
- m0 J i: n9 L @.Destination := void;1 Z- e3 Y3 O$ a6 N5 F
if @.occupied then3 ?0 R9 e9 f; _1 J" M
part := @.cont;! i# q. _( }# x7 n: q( X
@.transpOrder := void;; Z* d; [+ l R
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,) N5 T1 e( Z) Z0 V8 ^# J
@,root.eventcontroller.simTime);
8 u4 K+ f* u8 V @.HasOrder := false;
, D' e% X/ F: b& e/ e: P @.DrivingHome := true;
' P5 W$ I3 c9 @% h% Y rgManager.tryToStartTransOrder;& z2 B+ @ Q4 Y( ]; g V
if @.Destination = void
2 g q/ U6 x4 [2 M" B+ m5 T then -- no transport order for vehicle @
0 g$ I5 y }7 d) e2 f @.Destination :=" P1 ?$ E/ I b) N! K8 o
rgManager.nearestFreeStation(@,track.~);; d- F0 u+ g! C* o2 r( P
newDirection(@); 8 d8 P4 j' @- R" O
if @.Destination /= void then
8 z* G) M7 Q' w2 R8 a! d2 a9 d9 U @.Destination.NumReservation :=) S' H8 W6 I: H. o$ ^' J k# F. G
@.Destination.NumReservation + 1;5 R- D4 x* I4 ~% ^# @- `
end;
5 P/ K) R7 a8 j. k* y5 h- w- N4 s! } @.CurrIcon := "drivingHome";
! J A( w& o( W' [* z" } @.DrivingHome := true;6 w( i' |: G7 p9 q' U% @' {6 @
end;
$ v) p6 l" U* e$ t( c/ I( K else -- the vehicle @ is empty, both vehicle and part are in the same dock station4 y' l \: `* ~3 U/ V
part := @.transpOrder;) v6 S, `- q5 H! v
part.move(@);-- load part
* |7 u) Y* X. M3 g @.CurrIcon := "load";) b# q5 ~5 _ |
GlobalDistObj := part.globDestination;/ ?9 l; }' C4 z
assignLObj := rgmanager.rgAssignL;
& c" i" E) z& {5 I row := assignLObj.getRowNo(GlobalDistObj);
7 x G6 D- U0 c& l' V" | if Row = -1 then -- since 70
" Q. T5 @+ b+ H& M if lan=1 then/ z5 v1 l7 @! m0 A! l# E
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
* w: {# b& B8 K! x/ X5 n) m to_str("in der Andockstation: \"",?.~.name,"\""));6 m4 \& X: v" D; @6 ~$ `* C8 a; }* b
else
& N& k" h3 f/ ~. z: J promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),: v- k4 L! g. f! m" t: _5 q+ b9 |- S6 k$ ?
to_str("in docking station: \"",?.~.name,"\"")); " x4 w. D n6 X9 p/ |
end;" M# ~; o/ `; n! h0 p- O8 _- b
else
% J5 v* K" g; ]# G3 g% J* G @.Destination := assignLObj[1,row];
: E% J7 y8 @ O end; 7 B3 ^7 J4 T" Q5 s8 K
newDirection(@);, z9 ^: Q# x% E* ]1 h T9 G
@.HasOrder := true;
: g9 N0 Z( l' k end;8 P3 |/ A6 W7 c/ a* y
end;2 Z. j: ]" c1 o8 H* o; k8 y! H/ {" C
end; -- of the method* z, E% X( {8 \, Y4 w& b
|