/* called by: entrance ctrl of the object 'track'. u# `8 V3 c/ [' q% ?. l% M/ m
*/
" p: j, `5 e* a" p& e2 j7 Kis+ P5 R/ |: V# J3 j4 @8 o( }
part, GlobalDistObj, assignLObj:object;row,Lan:integer;8 a; \2 V$ ?+ ]. Y( n
do8 h' T( `. C' Q% A5 ?
Lan := rootfolder.Internal.Tools.AOLlanguage;! W+ k/ d2 }: S4 {
if current = @.Destination -- else return$ h6 Y- C& M* e( i z$ J+ w3 x
then! i. J' Z' T( N* i" x& L4 o
@.Destination := void;0 ^( o9 }4 L8 G8 H1 U8 e; B: @ f
if @.occupied then4 H8 @4 \5 d/ @' N' U) }, A
part := @.cont;1 S; f7 ?9 ~4 ^
@.transpOrder := void;
( P6 @. l8 t* Z* n part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,. ^" L& B. E( e9 l! L4 [
@,root.eventcontroller.simTime);+ V9 p4 A8 i- a8 T# b
@.HasOrder := false;! n$ Z" h4 h: A
@.DrivingHome := true;! { i7 Q1 K+ _0 m
rgManager.tryToStartTransOrder;6 ^ {/ _9 A% h! a
if @.Destination = void
! L" [4 g2 N; [3 ]. v then -- no transport order for vehicle @
$ ~. l1 U K1 q" L3 t7 X* O, t @.Destination :=" e4 e: C) b# ~; r K/ b+ F: c8 U
rgManager.nearestFreeStation(@,track.~);+ X( Z6 k8 E: B
newDirection(@);
& u/ |# l* i9 [$ [' G if @.Destination /= void then3 S6 q5 [) Z3 K0 u
@.Destination.NumReservation :=4 F0 c' v! u+ d, P, W8 ^
@.Destination.NumReservation + 1;
; @& G/ Z/ R* H end;9 K. a l( }$ M! r5 o" u$ e
@.CurrIcon := "drivingHome";
2 X. C) s# z1 r& {6 r: B% I @.DrivingHome := true;
2 j: n; W2 H, Y end;
, {! d( I! c6 d else -- the vehicle @ is empty, both vehicle and part are in the same dock station
8 |) ^0 [8 Z. o( _, T: \ part := @.transpOrder;' w2 @. p6 Z4 i4 o) a. ~% m
part.move(@);-- load part
4 c, b" [5 `' z. P @.CurrIcon := "load";
9 K# R6 x5 l3 _ GlobalDistObj := part.globDestination;; a& w% j$ p& h
assignLObj := rgmanager.rgAssignL;1 m5 i# g0 u. y+ u* D
row := assignLObj.getRowNo(GlobalDistObj);
+ t2 k" k& q, `+ o K4 R if Row = -1 then -- since 70
+ a) m1 b$ @1 d if lan=1 then5 f" }7 K- l/ S* e% C' u; k% g$ O) Z
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),& b. i, D' z; L
to_str("in der Andockstation: \"",?.~.name,"\""));8 x5 S: @0 G" E: u% x: E- u" g
else
) e% q" j8 z N: j6 v U6 S0 n# a promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),$ z0 z5 j/ R3 d! `9 a
to_str("in docking station: \"",?.~.name,"\""));
+ B: f9 a. d* V end;% J6 c5 \6 r# @; B2 |* ? x/ Y
else
+ M2 h6 g* z* M @.Destination := assignLObj[1,row];3 t7 d7 j4 x$ f/ J3 y `% y
end; $ o- u5 S. C% G9 k5 Z( v5 Y
newDirection(@);
! f3 G' o1 w, P _. D @.HasOrder := true;. a; D1 {( ]/ F9 Q; @
end;) s( a0 Q1 C/ L* Z1 b0 y, s
end;
3 I6 f* ?( B) p* j6 x, m% eend; -- of the method
L! p" ` W7 C# v+ W$ I0 X' o |