/* called by: entrance ctrl of the object 'track'# a- `3 G4 Q6 u/ X1 V5 |
*/
! x3 u$ P" u6 [' C' m+ X6 P Nis- ]! }9 e" z! Q
part, GlobalDistObj, assignLObj:object;row,Lan:integer;" J$ H: z) A6 K y
do
, L4 S% W% W( i1 l Lan := rootfolder.Internal.Tools.AOLlanguage;
! }% O V( [* I2 @, c if current = @.Destination -- else return5 ?, {0 U5 d. D6 J
then
@' e' T' h6 p @.Destination := void;3 |5 C+ h$ N& x9 Y
if @.occupied then+ w+ ^0 y5 \) x% f4 Z
part := @.cont;1 b7 s' Y& A: |9 F
@.transpOrder := void;$ A; N" r7 t' f0 L
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,, a- N" N0 E% \9 v9 O0 ]. G s
@,root.eventcontroller.simTime);
$ a. [1 W0 d& z2 B) \; x7 S! j @.HasOrder := false;& H! E5 ^: N5 e5 m" c
@.DrivingHome := true;
# X7 |5 [6 R( y rgManager.tryToStartTransOrder;
) C/ N# c+ A+ e. s1 h* j6 I if @.Destination = void; U3 k8 Y# X4 ]8 [5 \
then -- no transport order for vehicle @+ S# U, H" I& w; ^
@.Destination :=
" F! H! _! M* a8 g6 u4 _. M; _ rgManager.nearestFreeStation(@,track.~);/ c1 k0 f4 }1 e* O
newDirection(@);
3 f+ M7 _/ b9 ^% @ if @.Destination /= void then9 ~- N7 x- a' C) h. |# P' U
@.Destination.NumReservation :=( g/ T. Y- V3 E5 s/ N" o$ p) G
@.Destination.NumReservation + 1;
* u3 [$ i9 @" Z4 W7 s end;
9 D& h; I# K; t/ F# D9 x @.CurrIcon := "drivingHome";: M, T) B) p& \ x: E) F
@.DrivingHome := true;1 {' U% d7 ?3 B/ }, J/ K9 a
end;8 ?# a A, F9 O4 n- q
else -- the vehicle @ is empty, both vehicle and part are in the same dock station5 a. N ^2 }+ m7 N
part := @.transpOrder;
8 z- C4 A1 t& ?- R9 w part.move(@);-- load part$ Y% R! D" u+ |9 z, c9 J
@.CurrIcon := "load";
! p4 J; Q! }2 j GlobalDistObj := part.globDestination;
. |, j7 o; w3 b1 p, c assignLObj := rgmanager.rgAssignL;
) }2 ^% A+ p; S0 F row := assignLObj.getRowNo(GlobalDistObj);7 c! l" Z1 z) [& r' @& R! J
if Row = -1 then -- since 70+ |& x6 S& w1 b8 `/ v. m
if lan=1 then
: H! T! R3 L: ? promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
1 Z7 X" P2 g7 ? to_str("in der Andockstation: \"",?.~.name,"\""));
; \3 D8 |; A' P7 ~- Y7 P4 s else, r; d" B( q" G+ l
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
9 T8 o6 H+ p6 k6 w9 P" ~ to_str("in docking station: \"",?.~.name,"\""));
% M( v: W+ |/ h' s0 y! ]! A5 _ end;0 j# E6 W9 `& _' j. X
else& `9 _' n* `; @* q* w3 Y
@.Destination := assignLObj[1,row];
9 e' B$ J: G8 s/ a5 s& ~) i end; / O% a7 g+ E7 `# a B; G( s+ e, k4 M3 C
newDirection(@);( T/ s7 O! l7 u8 S0 P$ F# B" @" K
@.HasOrder := true;8 ~( T7 ?: d, l$ ]2 S! V+ X/ a' ]
end;8 z9 ~! Y6 b" n' [1 ?% V
end;9 U2 u- n6 S: o ?" h( m
end; -- of the method$ c% B4 b B+ X W% _/ F$ w, g
|