/* called by: entrance ctrl of the object 'track'
" {. t* `) s3 w2 [' v2 x*/4 z+ j; S3 F' Q/ I u! m
is6 B2 p7 _/ t) H/ o }: }
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
; E: \3 t8 x% x7 C8 M! Hdo+ a6 a0 A) u" p n% `* c" g0 c
Lan := rootfolder.Internal.Tools.AOLlanguage;3 u$ @7 }' \, L- b# z3 @# ]
if current = @.Destination -- else return
* W8 {! t$ P8 b4 X3 q- e then+ S. s! c0 q# q4 r/ p5 Z8 u$ T! A
@.Destination := void;
2 q# D* J9 Y3 q) S, w: d if @.occupied then
# ^* e2 S, q- o* t0 h part := @.cont;
0 T! {0 \+ ~! b8 \6 _! S U @.transpOrder := void;
* g& Z, e4 s+ P7 b; v# ~, r5 v! e part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,$ k4 J& i! p" O F, y
@,root.eventcontroller.simTime);
( ^4 U; ~7 D+ v5 }* J$ w' s2 g @.HasOrder := false;
V+ ^6 Q# C! ~" M* F @.DrivingHome := true;
' k1 u1 M( ` _- t+ m rgManager.tryToStartTransOrder;
8 A9 n* R/ E# R4 h _ Q5 Z if @.Destination = void- s0 ]. e" s5 y. o
then -- no transport order for vehicle @
$ ?3 j5 K: T( E5 D# [9 @ @.Destination :=
7 a- I: `; F9 L3 a rgManager.nearestFreeStation(@,track.~);0 |" F; Q0 J/ L: J& \" p
newDirection(@); i" q1 V. ^' ^3 i- z$ i) U2 h
if @.Destination /= void then
& R, I# N6 z: ]0 A" B7 R, A @.Destination.NumReservation :=
$ X* r6 N+ [. O: M& \) e @.Destination.NumReservation + 1;
. e2 W9 |) Z2 y6 R- G2 S end;
8 F# r. K# ~$ [% h! b @.CurrIcon := "drivingHome";8 s1 r4 z+ c* b( b
@.DrivingHome := true;
" k9 _! g, X& [& G% Z1 ^ end;: n, S* V+ I7 O' f( G0 d
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
( h* H8 L" P3 a3 _# P! }7 @9 C part := @.transpOrder;
: \+ y) ~! P$ K6 l' X2 ~; s part.move(@);-- load part
. {% l0 C0 A! i" t+ v) g9 M @.CurrIcon := "load";
' V6 W ?7 m& y GlobalDistObj := part.globDestination;# G- }% E! O% C5 |0 e( F F2 p* N; D8 @
assignLObj := rgmanager.rgAssignL;
8 E4 e3 |! O# f F1 M row := assignLObj.getRowNo(GlobalDistObj);5 i) f3 \/ k8 C6 w
if Row = -1 then -- since 70+ Q& R3 e* l2 ~) p) N; i: k3 u* t
if lan=1 then. k3 m+ y; z% J* t
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),: z4 a$ f; S& k( X
to_str("in der Andockstation: \"",?.~.name,"\""));
4 d5 F5 y' P; n) X4 g: p else- ?5 S, p- x1 s3 C# U/ U
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
0 m, `; C$ x& P to_str("in docking station: \"",?.~.name,"\"")); ; K: e- ] F' [8 ?
end;1 ^, ~% h$ o$ i
else
/ @4 t6 e* C* u" @4 E6 v G @.Destination := assignLObj[1,row];
* Z0 {) T: A3 q6 h5 ]" K$ u end;
+ S' ^) n5 A& o. F3 a+ A newDirection(@);0 A$ z& `4 ]$ H& K' U
@.HasOrder := true;
" W+ E+ X/ N. V; A! t2 ~/ @ end;3 g0 q9 i! T- g0 g& p
end;
3 h3 E+ w, \7 B; u% ], {; u$ S+ rend; -- of the method
3 g4 L+ f& Y( v9 l9 D |