/* called by: entrance ctrl of the object 'track'" _2 a- t. k& T$ A, P. R, Q
*/( w0 S+ t8 [0 ^* P
is1 i0 ?, b, {& s
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
7 N5 M( m6 G8 P o' _: ~" tdo
' T9 G c8 b: @# h! y1 b% K Lan := rootfolder.Internal.Tools.AOLlanguage; k+ k, p% {) ^, k5 {$ {# M6 b8 d9 }
if current = @.Destination -- else return
& N6 \& x! `; Q" K& z2 G* H, ] then! J c& Y2 T- a/ s2 C" n6 M! h
@.Destination := void;
2 `; x. t1 y% U, ]7 }2 p( V! n if @.occupied then
1 y: M. a1 r. c part := @.cont;
0 Z9 i9 c! x) u9 s @.transpOrder := void;
: U& s& Q4 g# F% J6 `; @8 |* q part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,* L. h$ J0 o3 I% F
@,root.eventcontroller.simTime);9 l- V3 N7 T" {9 C
@.HasOrder := false;
( v+ }, X/ ?, {, J& r* ~; X @.DrivingHome := true;7 \6 `$ w9 P6 ]5 o* S
rgManager.tryToStartTransOrder;6 S2 ~8 z8 U7 P1 R2 Y3 o8 z- D
if @.Destination = void
% m$ u$ |! [) _+ ^5 l6 o8 V: { then -- no transport order for vehicle @# J8 L3 r0 E( a2 ]6 _3 h/ F
@.Destination :=
% ]4 R% x1 [/ R8 _! e- s0 @ rgManager.nearestFreeStation(@,track.~);
, y. B' b1 [/ u; Z+ t) O! \ newDirection(@);
0 f5 x. E. ^* Y. _ if @.Destination /= void then
# c' C0 @# S5 @/ {* { @.Destination.NumReservation :=+ ]& r6 q/ Q e/ A6 b* j; T0 j
@.Destination.NumReservation + 1;
5 c3 l7 Y) i! d- `7 o9 G' ^" C end;
, N8 n8 r+ O# s @.CurrIcon := "drivingHome"; z+ I {7 ?( o3 u+ p# h/ s! B
@.DrivingHome := true;- F6 x/ ` J* V# z9 `! \0 v- W
end;
9 K5 L9 k! k$ G. Y5 H% ] else -- the vehicle @ is empty, both vehicle and part are in the same dock station
$ s* M' K- q6 V1 v: e part := @.transpOrder;
8 y+ F6 N$ f+ o5 L part.move(@);-- load part6 J0 h1 z4 l) p8 m% k5 b: e
@.CurrIcon := "load";* V3 C5 S" O( R& R
GlobalDistObj := part.globDestination;
! a% _# K7 ^7 p. F$ g& L assignLObj := rgmanager.rgAssignL;0 b: n% m: L# N3 p+ J# e8 G
row := assignLObj.getRowNo(GlobalDistObj);
C. m7 H0 l ^' [ j if Row = -1 then -- since 70
9 O" f2 E; M. r0 P8 R- X if lan=1 then9 N5 p1 Q/ z9 }3 L C. E6 \' y7 I
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
K% B. \0 b5 N8 ` to_str("in der Andockstation: \"",?.~.name,"\""));
, b5 b0 i) W6 O# h else2 p, |9 s1 S" I# r* i S) i. b. @
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),- K9 }7 h; h+ i6 t. F) g
to_str("in docking station: \"",?.~.name,"\""));
/ l7 b& @8 m+ z4 m5 [% U& _ end;$ ]6 [- W( p! d# p
else6 t% W9 b; Z3 [
@.Destination := assignLObj[1,row];! g" w. D) ?& w+ V5 W& o
end;
6 C7 i* S4 L9 Y, z newDirection(@);- H' t7 E& p5 l1 X
@.HasOrder := true;
3 g9 |' s6 Y3 J& }* a" t end;
. m: Z& h9 @3 \6 G( d end;3 }# |8 ?$ S1 u* \( R' y
end; -- of the method7 z" _4 }# V1 ]9 r
|