/* called by: entrance ctrl of the object 'track'/ V/ v6 w8 O9 c4 S5 Y( U/ P0 b
*/
7 |- l+ {: X7 Jis
0 `4 a0 F9 T$ X+ }/ v; e5 C part, GlobalDistObj, assignLObj:object;row,Lan:integer;
% \- H$ Y! l, xdo
1 B* P' Q, S) g) x Lan := rootfolder.Internal.Tools.AOLlanguage;& v) N* a9 q7 p' `
if current = @.Destination -- else return2 N* k7 }1 r8 ~
then
& l: U, c E# f/ s @.Destination := void;
1 f* I, Y, b2 }& s) F4 g9 `' ~+ M if @.occupied then
( u% }' P: b/ g2 o7 @8 @ part := @.cont;
+ y; u: J; h. _' B6 b3 B8 \ @.transpOrder := void;
- Z+ i/ T: M1 o; k part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
8 @' q% B/ j- b% Q, E @,root.eventcontroller.simTime);* U- O4 V) i- J- A$ J
@.HasOrder := false;2 F, x! q) [0 p0 ]* V; W& v
@.DrivingHome := true;
9 {- T% y4 |( {: M; q5 a B rgManager.tryToStartTransOrder;! ~1 ?' p, o' S
if @.Destination = void/ ~) d, y( S( l9 J
then -- no transport order for vehicle @; w o" V [+ D1 w0 v
@.Destination := ~' Z% Q5 x. _
rgManager.nearestFreeStation(@,track.~);
: U1 i3 u' z2 V1 T newDirection(@);
1 w9 g/ g! y. h( L7 j if @.Destination /= void then, D2 s- B/ `$ u8 i
@.Destination.NumReservation :=. g! _* O4 P) g2 F' c7 }- P, t
@.Destination.NumReservation + 1;
: u" C% W2 L( w8 @ X( O. Z7 f end;
/ w+ @6 Y8 w2 r. d+ {4 u0 ~ @.CurrIcon := "drivingHome";
3 K, u4 K0 h9 `" [ @.DrivingHome := true;6 t/ d; A* t! c+ J2 D$ \6 M* J
end;& j U m; [7 ?4 N# U: h+ L
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
4 t5 V0 K3 _7 w part := @.transpOrder;( |5 D9 y7 Q( P+ |2 K
part.move(@);-- load part
0 w; S# I. q+ j5 [6 K( u @.CurrIcon := "load";# O0 _* C3 a( ` o" s- W, s7 b
GlobalDistObj := part.globDestination;
# P; o5 F& M' ] assignLObj := rgmanager.rgAssignL;# T/ T6 e5 ^' g4 ^2 {
row := assignLObj.getRowNo(GlobalDistObj);; z. t9 {" [8 f8 l+ O
if Row = -1 then -- since 70. S+ M7 F( t+ L1 o& H& I
if lan=1 then
3 R- O0 p. K0 ^1 i. [: p* ^ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),8 S9 s' e: q: S' f1 p
to_str("in der Andockstation: \"",?.~.name,"\""));% j$ [+ v0 f: T$ f9 d, Y6 x
else
/ P9 ~. s' J5 r promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),( q9 }" k- r+ k0 K& ?
to_str("in docking station: \"",?.~.name,"\"")); , X) l) A# j' r# @" @( G; D) @
end;3 |+ [- C, Q) @+ [0 ^
else
D' I6 ?5 E/ z @.Destination := assignLObj[1,row];5 G9 { V4 g& C. B6 y/ H
end;
& `: }) I1 e5 j) K0 T newDirection(@);
/ Q I% q& B0 h @.HasOrder := true;
$ q6 D* i: i. e4 s5 s5 V/ C1 V end;: \; h: q7 A/ {& z( s+ P
end;* T6 t% ?0 V6 [1 |, i
end; -- of the method& H: q$ u; e7 b4 v" }0 q# z
|