/* called by: entrance ctrl of the object 'track'# j/ C! O, Z9 e- X0 m
*/" V" W1 Y+ W+ i* O& F$ j, k! z A
is' A- V' T) l$ u! q
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
0 K+ ^. N5 w5 C4 x3 [0 I) Mdo' D: D& q$ u! a
Lan := rootfolder.Internal.Tools.AOLlanguage;3 d" T7 }1 i8 v- ^' F) U0 q3 @
if current = @.Destination -- else return2 k' q" B* d" p1 ?6 W
then
5 Q3 f( ^1 ~/ s6 } @.Destination := void;9 k7 i9 C1 @$ l7 i9 a1 c
if @.occupied then8 m2 L8 l3 ^* |) p6 U( r6 n
part := @.cont;
! Y2 o( `3 X2 m# e4 k @.transpOrder := void;
y# n" ]* C+ ?1 }, G+ Y7 ] part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
, e2 Z! m; C: W @,root.eventcontroller.simTime);0 V) S. e% P6 f1 h( j- p+ p' [8 K
@.HasOrder := false;/ E8 x. o% P1 y. ^: |2 A$ |
@.DrivingHome := true;! ` l: u3 `/ v9 f- |, R
rgManager.tryToStartTransOrder;2 r$ A$ \+ {3 ], r
if @.Destination = void
% `! f/ o8 b& N* r7 c' V1 k' e; w then -- no transport order for vehicle @ k; k- F; B: {' W' k/ m g
@.Destination :=
* T# q& p! I# }+ x0 S M rgManager.nearestFreeStation(@,track.~);
1 L+ G& s( k0 O7 s; x newDirection(@); 7 e% }- ^. I2 t% ^/ j: a3 {
if @.Destination /= void then+ m1 ~7 q9 Q# K& t2 _ t/ L% F4 `9 h: G: m
@.Destination.NumReservation :=) b$ Z+ u6 n& |/ Y6 P2 f1 i, Y
@.Destination.NumReservation + 1;. T6 v" L/ }+ a- W
end;8 @. v6 B' o$ K- d% w0 P
@.CurrIcon := "drivingHome";
2 r' ], \; ?7 Y5 T5 V$ p2 n" a @.DrivingHome := true;
& c! H' N" R/ e4 D end;$ A+ S' q$ ^$ n
else -- the vehicle @ is empty, both vehicle and part are in the same dock station: a5 w! T4 x: x8 k+ N
part := @.transpOrder;
' N& t A3 L. p& w) q8 u6 M9 T part.move(@);-- load part
" s1 D$ l8 M! A2 [ @.CurrIcon := "load";- S/ }) o F2 y- n
GlobalDistObj := part.globDestination;- [- e' T+ o6 i2 p( k. D
assignLObj := rgmanager.rgAssignL;
( |; R) g1 @. q! j& G: b row := assignLObj.getRowNo(GlobalDistObj);( W2 r! w8 I. y
if Row = -1 then -- since 70
5 R0 V/ ?. I' D: e- d4 { if lan=1 then3 o. f0 @) D' o, ^& O h
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),0 I" [2 V; O" i1 Z$ k- K1 P2 T
to_str("in der Andockstation: \"",?.~.name,"\""));7 t$ J Y6 ]2 \1 M) T# z4 f
else
. z# d! P& _; h" }1 E promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
- A) |% R9 [( n7 B1 p0 n c9 t2 P to_str("in docking station: \"",?.~.name,"\""));
. x& Y% Y7 M7 | end;! m8 L1 z d, M0 _
else
( B3 `" t6 M# _$ G; J) S+ A @.Destination := assignLObj[1,row];
; }$ l' y; r- U C, H end; 2 Q$ n/ }. [4 H( S
newDirection(@);9 [! T+ S" g0 g" [
@.HasOrder := true;
3 |* d1 C- J% { end;7 E+ m. H# Y, y& X6 l& ^9 K2 a
end;
/ _8 q0 O# ~. T6 Z; ]end; -- of the method2 {0 W0 I5 E1 \7 E; L; v( D, a8 r
|