/* called by: entrance ctrl of the object 'track'9 m9 _, B2 P4 G% R6 ?* [( `; w' w
*/. b# @6 a4 ~" X( j: @7 l
is
9 X6 b) |8 ]0 d# ^8 K7 `1 X, P( ?3 g8 C+ i1 y part, GlobalDistObj, assignLObj:object;row,Lan:integer;
- U. S( W I# B. I' Ldo0 o! f& {$ K2 A7 n6 o5 i
Lan := rootfolder.Internal.Tools.AOLlanguage;
' n l# W) M% V' V6 Y% N; O% V# i( _ if current = @.Destination -- else return
7 M$ J2 o2 o2 |; @: s& N% g9 G$ s then
5 X- H G: H$ O, w1 u, R' b% x @.Destination := void;+ Z: w) x( ~, s8 [
if @.occupied then
) l) M2 \3 a9 _ part := @.cont;4 ?/ g5 {. M' g0 C4 `
@.transpOrder := void;
) @0 f, j# v5 p2 I part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
+ |9 d1 x2 a$ j2 [2 \& C) S @,root.eventcontroller.simTime);
$ i2 m4 N' @( D) X @.HasOrder := false;* h) E$ u$ K, Z3 G) S4 {( a
@.DrivingHome := true;6 i8 T W: J5 F" H: t* C G
rgManager.tryToStartTransOrder;
+ c+ `4 |; t/ J% q' \9 Y$ G5 a if @.Destination = void
2 c( N3 J9 K5 g/ z/ j+ y then -- no transport order for vehicle @
5 b2 ?6 g6 X" \, }5 Y/ F: g% ^" ^ @.Destination :=
" [' X; ]: j" K8 Q4 y rgManager.nearestFreeStation(@,track.~);
2 }) a0 j7 x3 T5 t' `0 S$ m newDirection(@);
( _# A* c4 O# z" S6 E1 \ if @.Destination /= void then
# J( L6 Y2 [& y S @.Destination.NumReservation :=; V) ?7 |: @, D2 F) {# m% Q
@.Destination.NumReservation + 1;
* v$ U1 T# u8 m end;
+ R5 e9 @, d! |2 }/ y, P9 H" G @.CurrIcon := "drivingHome";
/ p( K" A S- Z: R; o ]9 z! t @.DrivingHome := true;2 x& p3 a* b, X
end;
% M+ M/ i: V- c, D! b) V* c0 } else -- the vehicle @ is empty, both vehicle and part are in the same dock station
9 m! d; V; z8 v% v part := @.transpOrder;2 D0 d7 R' U8 m% r- a
part.move(@);-- load part
k" O$ P$ \' I! v @.CurrIcon := "load";
7 ~: |! x( g5 H) B" o( q" R9 e GlobalDistObj := part.globDestination;
4 c( J# g. R: R( X assignLObj := rgmanager.rgAssignL;8 ?2 `; L2 j. w2 ^, i
row := assignLObj.getRowNo(GlobalDistObj);3 e3 H4 H2 x* u8 ~/ Z
if Row = -1 then -- since 70
' Z" A" f D; e1 x3 s if lan=1 then; K3 Z& E+ ^8 K, h4 D
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
c- C5 Y9 @/ q' N. h to_str("in der Andockstation: \"",?.~.name,"\""));: W: ?9 }2 _) j) P$ g" g+ I
else
4 q! { Y# o/ j2 R# { promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
. J+ I8 Q$ ]' a1 S( C$ b" G to_str("in docking station: \"",?.~.name,"\""));
W0 `" k' u+ _7 I* \ end;) _0 B5 r+ t+ t- H" I& R
else: d' U+ |! ~) D' ]5 o# P6 u# d6 K) ]7 g J; j
@.Destination := assignLObj[1,row];( P/ t i- g0 p7 R. n+ v
end;
6 P- Y+ y& m- u3 v' E9 G: _ newDirection(@);
3 v2 K( s- s) z* v* X$ X @.HasOrder := true;' ^$ u- g [+ v8 ?& E6 N$ {+ ]
end;, W( M, E: \' f( x6 ?6 q7 J
end;& `7 Q8 H; n" P' Q) O- _: S: H: O
end; -- of the method% w/ e7 N: R- L8 L0 J# _
|