/* called by: entrance ctrl of the object 'track'
- i2 u) o$ {" N# B* z*/; E5 c6 L4 C( y; ^4 R. {
is
# z3 s/ N5 H/ [) e part, GlobalDistObj, assignLObj:object;row,Lan:integer;
) N0 X6 F" L3 V9 P2 G3 f& l( gdo# t( |$ E: C# o3 Z
Lan := rootfolder.Internal.Tools.AOLlanguage;
; ?% X0 S, K" N2 k5 j3 F) J* d if current = @.Destination -- else return% |( o8 [* R( q* y R. X5 ]" ]
then
5 n2 t$ T! k- J+ ]7 U @.Destination := void;- m# t; m( `- C6 g
if @.occupied then
9 `2 v2 t) D. E part := @.cont;& |' `, L" a, i6 a: a8 I7 }* E7 @
@.transpOrder := void;
8 D: A: Y0 k; f# \. R% H part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
6 s0 p! R+ M2 t0 F& O" S7 k8 ] @,root.eventcontroller.simTime);
7 ^5 A4 |7 P: @ J; k- a @.HasOrder := false;# Z" P3 r8 p/ d; n4 k8 M* m
@.DrivingHome := true;8 c! m v5 F j% I% h5 f( U
rgManager.tryToStartTransOrder;
u% C* L. Y* R if @.Destination = void7 [# `4 Z7 g9 Y. g0 I' {9 I
then -- no transport order for vehicle @
8 D5 a" h' i1 w! K% u @.Destination :=
& `: T' ^* M) C# r! l: c; M4 w rgManager.nearestFreeStation(@,track.~);, c2 O2 \* d- q
newDirection(@); 1 s7 |7 \$ a" Z; e3 ]$ @0 q$ s
if @.Destination /= void then ?) x n- r- d: h/ j+ u1 ^- x
@.Destination.NumReservation :=
& l) P% J; m3 q2 f( v7 V8 e @.Destination.NumReservation + 1;( F# v# `2 O8 P& E0 C. H: j f) e" ?
end;" d2 t3 s- f( h1 }% ?
@.CurrIcon := "drivingHome";
& ^, U4 v e- r6 n' q @.DrivingHome := true;
! m: p6 l! R% H% N3 m& [" m end;
7 X s0 G: P7 c' A: ^ else -- the vehicle @ is empty, both vehicle and part are in the same dock station
% j+ r: {" T7 p- }% v* z$ a part := @.transpOrder;
* E. `" x4 X$ o. l8 w part.move(@);-- load part6 K- F3 O- e6 k7 N4 t; @: K; O
@.CurrIcon := "load";
- v3 |0 h5 s8 B GlobalDistObj := part.globDestination;
: |0 p9 T8 n5 F3 y+ d assignLObj := rgmanager.rgAssignL;
5 c9 ~) P, p+ [ row := assignLObj.getRowNo(GlobalDistObj);
2 M `& C" G$ [# c7 ] if Row = -1 then -- since 70
( N j0 Z$ P; ~; a; i% X if lan=1 then
) J0 t# R. V' g f" M promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""), ?; p1 _8 W( i. J
to_str("in der Andockstation: \"",?.~.name,"\""));) T1 O+ c# ]: t; P( w j
else
8 |5 r' }; v. W: ?5 } promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),- r* {: n! B3 A4 y# t7 ^6 y
to_str("in docking station: \"",?.~.name,"\"")); 3 A0 R B# Z0 c1 I; ]$ `% u) U; A2 Y
end;( T' X& G5 O8 h' l# Q7 }4 P5 W
else
: f$ M( m( a9 J/ c" D1 f* @ @.Destination := assignLObj[1,row];, G6 N1 E8 P' v4 A
end; 6 ]* U. j/ C9 e: |9 q$ `
newDirection(@);
' T, E. k6 D" @* ]' k) \0 s* l @.HasOrder := true;% U2 C5 B' n$ D: C! Y, G
end;& `, h( g' d, B+ Y6 U6 n
end;+ q+ n" H' P- }: }7 M e, P
end; -- of the method2 d% u, ]: Z% N: X6 }* Q! |* e& [
|