/* called by: entrance ctrl of the object 'track'
D" b9 V6 z2 O- x _*/
- r8 s$ u1 |# f$ R! lis
( W; p% e+ ]9 f' r: r part, GlobalDistObj, assignLObj:object;row,Lan:integer;
, q& |% f, S) Q/ I3 ldo
' O( v" v& Q6 H Lan := rootfolder.Internal.Tools.AOLlanguage;- j$ u8 O/ S) Z7 o2 c8 e
if current = @.Destination -- else return
N, V5 v: A7 j5 z# n then$ @" Y3 O3 [. ?+ `
@.Destination := void;! p+ `% m4 E1 \& Q8 U5 j
if @.occupied then- s0 j3 t+ D; S; v% v! y
part := @.cont;! G& J& E# h3 j0 M0 Q6 X
@.transpOrder := void;& R' @3 W+ M6 b' t$ x A
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,& i8 c4 E# x8 ^- ]# ?8 x& t- w
@,root.eventcontroller.simTime);
$ e- q+ ^6 v& c: T) b9 y @.HasOrder := false;
. X- ~! ` k/ ]: F) Y+ E! v @.DrivingHome := true;* b. g/ W7 ?. ?( W% a( ?1 a) D1 @1 \
rgManager.tryToStartTransOrder;
5 ~7 W$ j! N$ a+ L% Z4 v, p; T if @.Destination = void6 {6 ?. h8 ^) o( p5 W4 [* |
then -- no transport order for vehicle @7 p9 y7 A. H S( B1 n; U
@.Destination :=
`) s2 M m" G- C G7 L7 M( j9 P7 m rgManager.nearestFreeStation(@,track.~);
4 R* X7 C4 X, G+ o# B# {; h newDirection(@);
% X3 t' G- {0 A5 j8 u if @.Destination /= void then
" J! y5 q# |$ @2 P2 w. K( m( u: Q @.Destination.NumReservation :=- _ F/ ]0 v' p" a* e4 {# j; m
@.Destination.NumReservation + 1;
9 a- j/ D" Y$ [5 B8 I9 v3 d8 a end;+ V# S2 G' z8 E- K
@.CurrIcon := "drivingHome";5 E( H+ ^2 W+ j d1 H
@.DrivingHome := true;8 `% o* v# j) m; X' V
end;5 h3 S- j! _1 p B
else -- the vehicle @ is empty, both vehicle and part are in the same dock station4 h+ |' N; d5 ^% c/ G0 c4 g
part := @.transpOrder;
2 X+ {1 Y4 d* g c part.move(@);-- load part
$ a0 Q; t% Y$ N( i" A @.CurrIcon := "load";
1 ]" X9 F! u$ e, ?8 V5 C GlobalDistObj := part.globDestination;( ~. u6 O2 F0 P
assignLObj := rgmanager.rgAssignL;
& ^* P# c/ g u row := assignLObj.getRowNo(GlobalDistObj);
9 M# g% i0 R( I% R$ B1 B if Row = -1 then -- since 70" T0 H. x( O# C3 L6 B
if lan=1 then
3 M- D+ A; i5 e$ _! ~ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),- s* J$ R6 d+ C2 e$ A/ ^
to_str("in der Andockstation: \"",?.~.name,"\""));6 [* ?3 L+ D! g1 a2 i
else
! _6 Q1 g3 ?4 ?9 O promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),4 g3 R9 E9 X' _! H; j# S- m
to_str("in docking station: \"",?.~.name,"\""));
, P" r9 S: r+ X end;
) v2 p# P: ?; X- L7 g3 _: |. h else/ e& t7 B" K, g+ z" I1 e. |
@.Destination := assignLObj[1,row];
) Q8 n( h! @$ X5 A! x1 H- i3 t end; / s8 N' G0 c4 V [
newDirection(@);
8 j4 u& i# A# m+ ^ @.HasOrder := true;; _ u+ v: Q+ O1 a
end;
5 l& v$ l: X+ q' a4 _( Y2 @# b end;
+ q T9 K- C4 v( D. F; ^- `8 lend; -- of the method9 b# Q$ P9 G' y L: W4 m9 I1 D8 {0 q% i
|