/* called by: entrance ctrl of the object 'track'
6 M i& I( k4 I8 X; _& u*/, j5 V" l: Z7 L1 K7 T- u
is
" O0 E- }( @5 R d part, GlobalDistObj, assignLObj:object;row,Lan:integer;
2 F9 T$ V7 _. Y) `* bdo8 Z8 P# ?. @8 p; y1 T
Lan := rootfolder.Internal.Tools.AOLlanguage;
2 P( {3 D3 W, O X# b: |0 J if current = @.Destination -- else return' m, t* k+ f. P. @8 i+ D
then* I" m) k! P- {' z
@.Destination := void;
3 S: n& Z$ a) h- d, R if @.occupied then
; m2 z! \& m% `9 y8 T! g2 K* h part := @.cont;
" S4 _: P/ @7 z, @2 r, y: z' [/ D @.transpOrder := void;! G+ V# c8 @* e
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,/ f& s A' o' r3 O) h) J6 H
@,root.eventcontroller.simTime);7 W4 I* |, I5 p" F6 O
@.HasOrder := false;3 C! j- K, J1 m+ ^' d
@.DrivingHome := true;9 |; N: H; L5 I. X
rgManager.tryToStartTransOrder;
. E8 r7 |6 H6 f' f% C: b if @.Destination = void
) J3 d8 V+ {* b+ ^( z then -- no transport order for vehicle @
. U% ], E* a- b9 [% f. ], ^$ p u @.Destination :=
( K! V2 W& i- } rgManager.nearestFreeStation(@,track.~);* s) L" W7 Q- X# p/ p9 O/ _
newDirection(@); 6 t9 H, v# \( W- c2 N. A. R' X
if @.Destination /= void then$ _4 a7 e: S# C* q2 _- u
@.Destination.NumReservation :=
( U7 V; B4 g; ]- Q0 }# [ @.Destination.NumReservation + 1;; q7 M2 X+ h. W( v
end;- E* V; r6 C& G s" e! I% d0 C7 v
@.CurrIcon := "drivingHome";6 E6 P- o; H* K3 m! u/ _
@.DrivingHome := true;
9 i- W/ i o) w8 B1 `# z+ G end;
* M4 f- d+ d$ @0 c+ ` else -- the vehicle @ is empty, both vehicle and part are in the same dock station8 O9 V' Z# g$ {/ z# W; \
part := @.transpOrder;% C3 }# S" ^. i' t, O
part.move(@);-- load part0 \! U$ X& i& A# ~! C6 h
@.CurrIcon := "load";' O- d8 A2 k/ R/ r
GlobalDistObj := part.globDestination;
7 e+ h' H$ M ^" X assignLObj := rgmanager.rgAssignL;
, x0 h! [$ R( I' A row := assignLObj.getRowNo(GlobalDistObj);
0 t4 h1 E- _. I if Row = -1 then -- since 70; W# ~$ {& O- Y ?" l; R0 Y4 Q
if lan=1 then6 H4 x/ i& @. s3 [
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),1 e' g% \: s& s6 b& o8 Y2 G
to_str("in der Andockstation: \"",?.~.name,"\""));: q* z* a+ ~6 z! T" r
else
. F4 O& \4 o+ n. ?2 i' B promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
; M& J% j: `: Z4 Z% f0 G8 o( m8 c5 u to_str("in docking station: \"",?.~.name,"\""));
- T+ Z- k; b5 v/ F7 A% J5 v8 D end;8 W$ y/ w. |# X' @ D
else5 W0 m3 I1 Q# U
@.Destination := assignLObj[1,row];) A4 w6 p% w' ]9 O2 `0 \3 ]
end; + J+ _9 \/ O l4 n" J7 n
newDirection(@);" ]6 X. r3 k: L
@.HasOrder := true;
2 c5 ~( K3 q7 c! u# ^1 }0 P$ r end;: E$ w5 ^$ [- @
end;
( i% M/ C% ?! f- q2 ]end; -- of the method- m( k$ @4 ~# F; |
|