/* called by: entrance ctrl of the object 'track'
& _. d3 w6 T0 g! @$ K1 w*/! ?/ n( }- b* I# ]9 d* `
is* ~# U( W1 w8 u, l
part, GlobalDistObj, assignLObj:object;row,Lan:integer;# F+ w; H" ^% n/ Y1 [3 |+ A
do; T3 m1 u* r/ C5 T' d" t g9 f
Lan := rootfolder.Internal.Tools.AOLlanguage;
% Y( [; P1 p1 F4 d5 u0 r if current = @.Destination -- else return8 E- \. [$ g. I" X
then
! a C; \0 J4 c7 u* H @.Destination := void;8 N/ y: I! h) k# \2 y8 p
if @.occupied then+ e5 p: A$ v+ b
part := @.cont;( R( B; }$ v* p& i
@.transpOrder := void;+ n- A7 Q4 L; o+ T5 C
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,* @8 h5 O4 O, i; R0 H
@,root.eventcontroller.simTime);
, E5 b% O: b8 Q8 b4 \ @.HasOrder := false;
# m4 l. z/ J1 G, R @.DrivingHome := true;
8 `4 O$ e2 J1 V5 ^4 G' }$ A4 s rgManager.tryToStartTransOrder;$ }7 \- Z! a7 I0 i" c
if @.Destination = void
4 c6 ^; a- v$ b# I then -- no transport order for vehicle @
3 A8 I$ o5 x5 A$ V @% C @.Destination :=1 t7 V" y5 k R2 Z0 o
rgManager.nearestFreeStation(@,track.~);4 q& D8 d5 a& z7 ?. \" d
newDirection(@); 8 {4 y' A& o2 `/ Y
if @.Destination /= void then$ p( ~8 s5 B9 y' z7 [- q
@.Destination.NumReservation :=, F0 q3 M8 y0 R% Z+ \! s
@.Destination.NumReservation + 1;
! a' c& E# F/ b/ S) D; l end;7 T: q2 |) R+ m, B( D! N
@.CurrIcon := "drivingHome";
+ q. h8 P; v' J8 E7 J @.DrivingHome := true;9 S% u3 o9 U2 k: a" [3 X! H L
end;+ d3 h8 }/ D2 B; z7 A9 |
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
6 r x9 A) q- b* N2 |* h part := @.transpOrder;
3 [1 t; b. e% ~4 E r E& d: K% D part.move(@);-- load part
+ C; w4 }9 T( R/ J0 u: }/ e9 N @.CurrIcon := "load";
3 K) q! R' l+ H' s+ h3 s' n GlobalDistObj := part.globDestination;$ u# a0 ]9 n/ c( r* s: s/ I8 t
assignLObj := rgmanager.rgAssignL;0 Q- a" U! O6 h, M, a$ W8 b$ U4 R
row := assignLObj.getRowNo(GlobalDistObj);7 b7 N5 D* L+ X! ^6 ]- E0 V4 B i
if Row = -1 then -- since 70
: o2 E5 {/ ?' C9 O# y; _) j* U if lan=1 then2 @) Y( i4 Y. c$ c
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
) v! V4 V7 S. G to_str("in der Andockstation: \"",?.~.name,"\""));
- [' B. S& W7 q* p8 e; m else
: Z* A- T$ u( q- A B$ T promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
/ A8 D4 a. L5 m5 @/ N/ i to_str("in docking station: \"",?.~.name,"\""));
0 F* A5 H8 L! P6 N" E end;
# Y: m. z5 l& W/ ^* Z3 K3 \7 [9 U else" x7 z" X8 u: [5 M+ Q, s
@.Destination := assignLObj[1,row];
; X% o0 f) ^6 G, w o# o) Y9 V end; 9 o6 \ p& w8 X" B; E* f2 _
newDirection(@);. X* z$ v7 a& X6 T, ?. P
@.HasOrder := true;
4 B+ {5 B/ T: n5 E% ~7 l# k \+ i end;
5 f5 o9 U6 O' y f end;
. O0 \4 T/ V$ V' T6 kend; -- of the method0 _% {$ W ?3 Y: w7 |. l2 E
|