/* called by: entrance ctrl of the object 'track'
. ^' V8 b6 a ]# U ]# e0 O( h*/( ^" y; G* Z+ O8 L
is
0 X0 c2 z# e+ L8 U( u part, GlobalDistObj, assignLObj:object;row,Lan:integer;* Q5 V4 W- M( J m: Y% X
do
. q/ R1 ^; A3 H7 ^% C3 g Lan := rootfolder.Internal.Tools.AOLlanguage;8 f" @5 v3 u5 b
if current = @.Destination -- else return& ?3 H" N: z$ P# Z% Z' k+ J
then& H; P+ N8 K, H* ]* p0 a& U
@.Destination := void;( M* S3 s+ z7 |: @
if @.occupied then
& i ]' M; W* T$ R7 c part := @.cont;
! f) w: i. u5 H2 E7 L5 o2 {' o! ]" V8 M @.transpOrder := void;0 s; j# s/ n S8 P; l9 ?
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
' `# ]3 E( ^1 L$ j @,root.eventcontroller.simTime);
8 X# R, U0 V7 W2 `2 ~5 Z @.HasOrder := false;
/ F! }- [! O* F9 {% L0 O @.DrivingHome := true;
! u: ^0 k% a' v% q3 {. {% |& `1 U rgManager.tryToStartTransOrder;
" [' }! f9 ~9 D* \7 r, x if @.Destination = void* m7 `/ q/ \% T2 `- k
then -- no transport order for vehicle @4 F6 G) @+ O/ v0 C
@.Destination :=
- N) g5 i- a6 K! x) I9 b rgManager.nearestFreeStation(@,track.~);
& e) k" A, H! r- d newDirection(@); * f2 S4 f2 S V, T
if @.Destination /= void then
9 C# }: z( B; Y @.Destination.NumReservation :=4 d1 s9 n! M7 L# m
@.Destination.NumReservation + 1;3 G4 Q9 ?3 G5 g4 N8 N9 Z
end;
7 X6 m( s7 P- `1 n @.CurrIcon := "drivingHome";
1 w0 Q- h% H" E* S- Q* J @.DrivingHome := true;6 z0 w$ _9 z3 c* H$ v& e
end;# A% E! V6 f, X0 ]
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
# h4 W) v& n* i r5 u part := @.transpOrder;
" i3 o; w* N! G: Q$ p" S. X/ V( ~ part.move(@);-- load part
8 a0 n7 [5 s- |0 c @.CurrIcon := "load";
7 K: e4 E! P- k: Z3 G GlobalDistObj := part.globDestination;. t: X- ^3 n" |2 G+ v! e
assignLObj := rgmanager.rgAssignL;
* u$ {0 P- V9 k6 b2 ]3 T7 S2 @! f" `/ z row := assignLObj.getRowNo(GlobalDistObj);$ m+ `0 M( s [8 y% T3 C; X
if Row = -1 then -- since 701 l0 G* M/ L* j! K ?7 b! ^, R/ |
if lan=1 then
. r. ]9 S$ N" k; d8 d promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),. e! f1 q# F: V3 N: S: ~7 J9 `3 Z% [
to_str("in der Andockstation: \"",?.~.name,"\""));2 p4 g0 y4 q* m0 y# A
else1 U8 J+ C+ W5 |2 \6 ]" w
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""), t) a. Z5 H! H. Z
to_str("in docking station: \"",?.~.name,"\""));
4 z u2 o! r7 e$ |3 Q0 F8 H' b/ H/ ^ end;2 O3 t6 X1 Z0 L
else
: z( I' z6 M3 O9 L @.Destination := assignLObj[1,row];
# l A) @2 o) M5 O7 K$ g' d end;
$ \! x W) n8 l% d, U newDirection(@);- t& ]) l" A& [# s9 t
@.HasOrder := true;
9 T ]. B; n( u% x, b end;9 I' N2 R3 a! q1 j) F* w
end;
8 W# ^) L% f" O# I8 r* N! N) oend; -- of the method
4 z" |4 R* T0 L# Q; R* { |