/* called by: entrance ctrl of the object 'track'
) |2 `7 a1 Q9 x( M& w8 ?2 g*/7 m4 L1 X* \! w
is
! C" G R- O0 c6 u6 o part, GlobalDistObj, assignLObj:object;row,Lan:integer;
) n9 n! Q3 o$ M* l8 G1 |3 g% b% S+ Sdo
2 Z- K6 p7 H! L9 X" w$ e Lan := rootfolder.Internal.Tools.AOLlanguage;1 L8 L* K% }- L
if current = @.Destination -- else return
/ s# Z3 M% _$ F a then
; d. O% g5 D4 S. q @.Destination := void;% u6 F+ y0 m# `$ R$ @& d$ w
if @.occupied then% X8 k. e* a! ^4 \
part := @.cont;1 q, K/ [! v; [# y* X9 ]7 i
@.transpOrder := void;2 ?" b5 q4 a! M; W! W- U
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,1 H ^1 v$ V% j% D
@,root.eventcontroller.simTime);6 o( ?2 n( k; ~7 H- v
@.HasOrder := false;
- W: t$ D$ D# `0 J! W9 n! q @.DrivingHome := true;! x- w- k6 y$ Y2 G' ?& ~9 W, J/ S# U8 z4 I
rgManager.tryToStartTransOrder;0 b; o9 T+ Q- K3 {# @
if @.Destination = void
- U( W, |+ O7 i5 y! \& R7 ^ then -- no transport order for vehicle @
* u. s& O6 V6 b a/ v5 K ` @.Destination :=
) }, {$ o" J( e& J rgManager.nearestFreeStation(@,track.~);
2 W& B" r0 `! n6 S$ ~ L newDirection(@);
3 V0 I7 w) e# K if @.Destination /= void then6 }! G/ J8 u0 K0 X+ G
@.Destination.NumReservation :=8 l4 l8 @! v- r. \8 a* N' y: t
@.Destination.NumReservation + 1;/ j; Y, X! r6 y% S: p
end;; a3 T0 Y7 t0 w& \: e/ p
@.CurrIcon := "drivingHome";0 G9 c7 t; _/ e+ R: S3 S
@.DrivingHome := true;
5 J9 D5 b% P ?. Z( M( o4 f end;5 R! H9 M- j. x( L3 I* P: f
else -- the vehicle @ is empty, both vehicle and part are in the same dock station2 a6 N! Z1 k6 s8 H3 K- L; I
part := @.transpOrder;
% [. K, C! k: Y1 t/ P' O part.move(@);-- load part
4 M5 d3 q$ G' h9 R9 n* U @.CurrIcon := "load";5 R* r6 E4 A( q3 L7 g
GlobalDistObj := part.globDestination;9 B& j4 |7 ?7 q
assignLObj := rgmanager.rgAssignL;( q) x# C% A; \
row := assignLObj.getRowNo(GlobalDistObj);# p' y' ^1 z3 E I
if Row = -1 then -- since 70
0 c r% X8 D: u. b0 P' V7 c if lan=1 then" p, u- K$ q2 `/ X
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),/ w$ C% T/ H! Z/ X/ B: U3 z( m
to_str("in der Andockstation: \"",?.~.name,"\""));# |/ @; V2 l9 p; V- ^$ x N3 U1 E$ i
else
) h0 R: |: T: v promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),& R% Q5 M) D4 b3 D5 H
to_str("in docking station: \"",?.~.name,"\"")); . s" z5 D. d+ [* j6 ^3 q8 d0 d
end;8 X) c" l; a+ d( l
else
. }4 ^5 U. S0 G/ v2 F @.Destination := assignLObj[1,row];! M, q8 s1 h( u+ E
end; % h$ Y& c$ S$ g/ h; l$ t' o2 \
newDirection(@);
% H4 ]7 D( E, D G, J3 f @.HasOrder := true;# G- ]* n# v5 u7 [5 Q
end;
- `9 j' }% r6 e" j. k0 b1 [ end;
* H U. Z/ {: P, bend; -- of the method) {, V' C) ~% j( u
|