/* called by: entrance ctrl of the object 'track', G$ ~" k( T" z" c6 [5 Q5 [1 C
*/
1 w" V# a! U% e) J+ xis
]8 F' `+ a/ X; r5 g part, GlobalDistObj, assignLObj:object;row,Lan:integer;8 c' k- R- c9 J1 N2 {, E0 e
do" ^/ O8 G% Q% z( A4 f
Lan := rootfolder.Internal.Tools.AOLlanguage;
) {5 J& Y0 M% Q/ b if current = @.Destination -- else return2 q. u* T% v- Y3 I" R
then# r! Z" \% Y3 L/ i8 ?
@.Destination := void;- H% _: b. r; X/ m
if @.occupied then
1 b' A; v. r) h part := @.cont;
! c# F3 _7 u+ t$ ^# {( b @.transpOrder := void;
4 Z7 `5 s' b$ ]3 C2 h) s9 q part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
' t: c5 q, S$ u0 ?$ [4 j$ {( ~ @,root.eventcontroller.simTime);+ K3 L1 @4 F# ?2 _
@.HasOrder := false;4 k0 `8 A* _9 A6 Y/ W
@.DrivingHome := true;4 f) y& f9 n: H4 V. A) s
rgManager.tryToStartTransOrder;
1 W, g3 F+ I6 j# M8 j4 J8 k if @.Destination = void2 ]# F: O# n4 U; o5 x* X& `
then -- no transport order for vehicle @
6 u% f1 e) i0 U! m @.Destination :=
0 L+ R: w( C2 Z7 o* n+ G" ^6 u0 U: F rgManager.nearestFreeStation(@,track.~);5 [9 ^, x/ l8 v* L# l3 L
newDirection(@); 9 m# n7 S+ p/ y2 E3 Q' t
if @.Destination /= void then
% x1 h: L7 P f) g8 K f0 \2 i. D @.Destination.NumReservation :=& C) e* a6 J( j
@.Destination.NumReservation + 1;
9 t$ n3 }. Y: h8 l% c& s" @ end;
( l8 E9 R+ g) J% R @.CurrIcon := "drivingHome";( j U# o7 b7 i1 D) y0 x
@.DrivingHome := true;
# ]3 ~. y$ }% n" _8 {6 Q end;7 r/ t) n! q# @* [1 `
else -- the vehicle @ is empty, both vehicle and part are in the same dock station' X6 P9 p# f' I' f6 c9 q" b( Y
part := @.transpOrder;( U M- C1 O1 y
part.move(@);-- load part
. t: ~6 y, ?5 i+ R- ~ @.CurrIcon := "load";
* H7 O, j- q+ L0 b GlobalDistObj := part.globDestination;9 U, h% F2 p# u( \
assignLObj := rgmanager.rgAssignL;; E% O8 e* j: R/ U: C% ?2 ~
row := assignLObj.getRowNo(GlobalDistObj);
9 E6 {) \5 P( K% d; i6 ]; {7 W8 C if Row = -1 then -- since 70
1 K( C. u( q( i if lan=1 then
; @& O, _" i! g8 _5 p4 h promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
, }; G3 k8 r8 J* M9 u to_str("in der Andockstation: \"",?.~.name,"\""));" c% O3 R* @4 P1 y/ O* ]3 A1 P
else: t1 {: W {2 I# R2 @2 E
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),/ q) }0 O u$ [8 G4 m" R1 Y8 f
to_str("in docking station: \"",?.~.name,"\"")); 9 W$ L2 q/ L! r- l1 B$ W
end;- \0 U! e6 u& U. }+ U
else- @' D+ |8 ^# @, s
@.Destination := assignLObj[1,row];+ {! b4 U- @" V, j1 m
end;
# z, C, k1 w- Q: g+ a newDirection(@);; |( n5 _. y! ?% @1 Q: R
@.HasOrder := true;2 {, Q- T6 t5 [; S. N
end;# J0 a+ B. z/ c. K% d! d5 O
end;
5 m- Y0 M2 {8 K. s: Dend; -- of the method6 ^( [6 ^- j J( M' B
|