/* called by: entrance ctrl of the object 'track'7 \9 W! E1 y _! Z
*/1 H7 F4 s" N% A4 p3 d. L B- M
is* m$ E. ?: W0 z% H, Z# W4 b0 R( v
part, GlobalDistObj, assignLObj:object;row,Lan:integer;1 E$ M! N. H5 p" S2 Y) o
do
7 e7 [, B- { z3 J: q& _# P Lan := rootfolder.Internal.Tools.AOLlanguage;' X! E% ]% B) j N
if current = @.Destination -- else return
9 T5 Z% G6 x& J( b+ F6 H then
3 e0 d* q& `$ M8 ^: g& s @.Destination := void;
6 |* r2 H! t$ ?: E* X if @.occupied then& H. K0 b f: ^$ @8 G, l
part := @.cont;
1 X4 d! }# k, I @.transpOrder := void;; o- w3 T" @3 E5 w; M% n; o" L- B/ U5 V3 Q+ h
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,& \# d/ D+ O+ w3 f
@,root.eventcontroller.simTime);
/ q1 O# w5 I$ P% D' E3 ~$ s @.HasOrder := false;
, E L0 j [+ _. d @.DrivingHome := true;
! t8 I6 q% Q; B6 a: b rgManager.tryToStartTransOrder;& V% ^6 h" C- z# Z5 N
if @.Destination = void- B5 n1 y" q8 B8 e& @6 M b
then -- no transport order for vehicle @
: y! G5 E% [( E8 w/ F: H& t" s9 Y1 K @.Destination :=7 x- `) |2 s5 ~% s; Z' E$ \
rgManager.nearestFreeStation(@,track.~);2 R M i2 d6 i+ S l3 D8 u7 w
newDirection(@); 9 E3 [6 D% m& {6 C
if @.Destination /= void then
9 a* c' H) k4 S7 |9 e @.Destination.NumReservation :=
' N; m9 Z6 q. v- H/ l @.Destination.NumReservation + 1;' k2 ?9 A7 j% @
end;$ V. M/ s& ]/ N+ Q+ l
@.CurrIcon := "drivingHome";
" I ?" P. r1 s8 ]6 |* y @.DrivingHome := true;9 W" M: y% v% }8 j9 b
end;6 A6 P9 C5 i4 f
else -- the vehicle @ is empty, both vehicle and part are in the same dock station3 w0 I1 d; x( ~6 J. I9 q/ Z e
part := @.transpOrder;: ^" j6 t& e$ J/ C0 j2 k
part.move(@);-- load part
% ~' |$ W# g) R @.CurrIcon := "load";' E+ O9 E q- z# C3 `0 A* D+ Y3 B
GlobalDistObj := part.globDestination;
$ z, @+ N* S8 c( [ assignLObj := rgmanager.rgAssignL;
3 A5 L+ g* ^. t0 x: T4 P0 Y row := assignLObj.getRowNo(GlobalDistObj);
+ }+ U$ b8 E2 c' \; z4 ~& h0 A if Row = -1 then -- since 704 j9 t$ L- B5 O+ H, K1 s
if lan=1 then
% n1 X; V$ a9 y3 \/ A" T# Z2 a' p! L promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),+ J0 i0 s& C6 n1 Y! K
to_str("in der Andockstation: \"",?.~.name,"\""));
f7 e3 L" Z2 \; f# j. r2 J else: P" V9 |1 f9 x' X: Y6 F, h# Y- X, l
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),% q; W1 w( y% Q9 S
to_str("in docking station: \"",?.~.name,"\"")); 4 I- u* H' K$ {/ N. J6 p( ~
end;( F& h# I" W2 U0 U
else
. ^- U- h, H. X' ?, C @.Destination := assignLObj[1,row];
& D7 i7 w( I1 G0 K* C( B, U end;
. r; D1 F4 d0 {0 c: O+ F newDirection(@);
9 ]; t2 _% v0 g/ ?# e @.HasOrder := true;9 ^4 Z2 g& k6 G* s2 k
end;
2 O3 l) l; E3 w6 v4 `" W end;
4 T4 X* @5 m! G6 ?' H5 S5 s7 D" Fend; -- of the method
1 i$ w! ^+ z% ]7 q8 M! m- ~* @ |