/* called by: entrance ctrl of the object 'track'6 E r# U6 n( @4 o9 X! H* z: m D% x
*/
. t+ f: p& F& P- ]8 J- x4 ?) Jis
: N) t8 B0 }2 l3 a0 ?! k9 ?; Q part, GlobalDistObj, assignLObj:object;row,Lan:integer;: `- x3 f/ l7 |. W# ?
do7 ]* D+ V. \ j0 _2 j8 |9 P
Lan := rootfolder.Internal.Tools.AOLlanguage;
1 v$ @( m0 v- {1 M$ H# I if current = @.Destination -- else return
. l" a4 I% \% u then# R0 D9 Y+ ^+ G9 Z
@.Destination := void;
) O$ [9 N8 B3 X4 E: t V! A if @.occupied then2 u$ D/ I+ O6 @5 Q9 [' V# D8 [2 |# h
part := @.cont;3 x% z% j9 o! ?) i2 }
@.transpOrder := void;
/ p! g! G* }7 s part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
1 @5 C) N8 t [; N2 S$ E/ n8 U% }% V' ~ @,root.eventcontroller.simTime);
7 G. ], A, {" V @.HasOrder := false;
* k1 y; x8 W5 ?: P" _ @.DrivingHome := true;8 L9 L+ R) b' o& p' j& v D; r- ^9 o
rgManager.tryToStartTransOrder;
2 e1 D3 z$ o/ T if @.Destination = void
/ w2 Q* t w1 g* P9 O then -- no transport order for vehicle @
- w, J, \4 \" o+ Q( r# W @.Destination :=0 O5 r% I+ i) Z" x' ]" `/ ?2 ?& t. Y
rgManager.nearestFreeStation(@,track.~);
% D1 |7 K8 }: } newDirection(@);
2 k& i; }( ^$ H% R+ @$ b) {. J if @.Destination /= void then J7 [' B( W3 _, w+ i
@.Destination.NumReservation :=0 F: h4 C' ~$ o8 U) p
@.Destination.NumReservation + 1;; L7 s( L0 |6 x! T
end;% b8 G8 g+ B5 N* T: V
@.CurrIcon := "drivingHome";
. H; M, z9 v Q0 ~( N5 M4 v @.DrivingHome := true;" \3 ?2 G. t- e
end;
6 j( ]- p6 Y0 `( i else -- the vehicle @ is empty, both vehicle and part are in the same dock station
3 [% a2 T$ E. |2 `5 s part := @.transpOrder;# j1 y# n( f$ i7 g4 T4 v
part.move(@);-- load part
1 i$ {$ \: k. E8 E% C7 n. d- m @.CurrIcon := "load";
- O. I& G0 o# q+ Q3 [- B7 w3 z GlobalDistObj := part.globDestination;( g$ I! b2 y3 J% x9 E
assignLObj := rgmanager.rgAssignL;
0 o* k R: W! T, k- h row := assignLObj.getRowNo(GlobalDistObj);1 b5 E R( ~/ ~3 f8 R
if Row = -1 then -- since 70& m2 l8 Q+ {& M7 t1 D
if lan=1 then
% o3 V/ t% D, E2 H promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),& V7 q2 R+ q! H: E H
to_str("in der Andockstation: \"",?.~.name,"\""));
) ^0 m8 q* f; a+ P) w0 _ else
; v7 l4 z" {0 m1 y promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),3 H# f6 T3 o! {5 z g2 _
to_str("in docking station: \"",?.~.name,"\"")); / {/ @; A7 p0 g$ b
end;7 R$ e8 ]1 m; s- L: i {
else6 j: y3 h" f4 c8 N$ t r
@.Destination := assignLObj[1,row];5 Q9 E6 o. ]3 s8 A4 O$ y+ u
end; 1 v. Z9 x" F2 }, O8 L. d& T/ H
newDirection(@);
! b5 X1 C+ q+ y* E, y @.HasOrder := true;2 i' X( Z' T; K9 N" ?; |
end;6 ~* ]( E8 l% M
end;
3 ?( g$ f; z# c1 u+ a+ H5 xend; -- of the method
' k+ B& i4 }( \ P" Y |