/* called by: entrance ctrl of the object 'track'" a8 b0 e0 l6 I
*/
i$ L, q- c4 k0 @) ais: o4 E) b- g! X" t; f1 H
part, GlobalDistObj, assignLObj:object;row,Lan:integer;' _# k0 I& ~8 H$ w+ V7 D4 Q
do+ h% s( @; L$ L# K" N$ O: o
Lan := rootfolder.Internal.Tools.AOLlanguage;
) A1 t# A0 X/ o- C* G& B4 C8 P) h3 V, P if current = @.Destination -- else return
" Y: z# K. Y* i& j) v0 s0 h m then
) M3 O( U- }3 M/ y @.Destination := void;
" d) l5 ]6 m$ q7 Y4 b if @.occupied then
/ _& y6 y+ a' F part := @.cont;, n" c, E- m" u! Q1 o
@.transpOrder := void;
1 y/ J! E( j. U, N+ k- i part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,+ b5 H% ?+ X7 j# X$ C) u' w$ _- J4 t' Z
@,root.eventcontroller.simTime);; G5 C: `* C$ d8 T" s) @
@.HasOrder := false;
, g: r+ c) n& u4 z @.DrivingHome := true;
% Q2 P) J% v, o$ j+ S rgManager.tryToStartTransOrder;- q! h6 K9 ?0 d6 u! B8 Y
if @.Destination = void
/ |7 P! b' n& n/ S) ~! N0 w3 Y1 U. ~8 S then -- no transport order for vehicle @
8 `0 m7 A1 a7 i& T5 m @.Destination :=/ @- h: w" z B' ~
rgManager.nearestFreeStation(@,track.~);# X( U' Z' F/ C" U
newDirection(@);
5 e) H! v. F: \' x if @.Destination /= void then7 r& P5 ^9 E) W( A) O
@.Destination.NumReservation :=
7 D y, E+ N f3 ^ @.Destination.NumReservation + 1;) n# E6 B2 z& Y$ O% c+ G
end;
' @ N2 h! `' F8 k @.CurrIcon := "drivingHome";7 R: s; c& A% _" D: H
@.DrivingHome := true;8 g3 W" P' ]0 O9 d- C
end;
% k) Q+ S- k# z+ _ else -- the vehicle @ is empty, both vehicle and part are in the same dock station
}4 g+ A. j9 V) u, M3 L: d. O part := @.transpOrder;: C; u, c+ \# ]2 o& s% f+ x
part.move(@);-- load part$ E9 g6 r( ]% ^+ G1 g6 D
@.CurrIcon := "load";2 \* @4 \( c- h9 x% V6 V, {+ v
GlobalDistObj := part.globDestination;
5 ]7 q; H7 Z5 M6 u, K2 g assignLObj := rgmanager.rgAssignL;
3 J9 J0 k& Q6 r1 B+ L: ], ` row := assignLObj.getRowNo(GlobalDistObj);
4 b/ E, l# K* O7 K o% W if Row = -1 then -- since 70
; e, k# ?% x0 _$ } if lan=1 then
4 K {6 b* J7 m1 t) i! G" C8 F6 X promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
$ U# p# ~% l( p( c# Q4 ]: P to_str("in der Andockstation: \"",?.~.name,"\""));1 T b' t. t2 t& p$ C+ {6 c3 {
else2 n" b1 q7 y3 j* x) C
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),* }9 E1 r7 S1 T1 t
to_str("in docking station: \"",?.~.name,"\""));
' s2 I9 F6 M0 O! A @ end;
# t6 Y+ R4 _% z; ?( @ else
/ h. k: B5 g- @. c* }8 }0 | @.Destination := assignLObj[1,row];
* T8 v3 E) |. n7 k& K end;
% ?0 _5 u' o" C) o. h* X newDirection(@);
3 ^& G0 V6 }5 {+ e- e: `" O @.HasOrder := true;
) }- G' y9 l0 ^' H end;
0 y! _# ]3 m! h end;
: b% Y! s/ b0 X9 N Xend; -- of the method
$ S) `5 }1 s8 f |