/* called by: entrance ctrl of the object 'track'
" e+ H6 d2 y7 `4 e( }* ]*/9 e+ Y% P6 g& J- Q/ W: E
is( r& r. P/ P, `. H4 P+ s
part, GlobalDistObj, assignLObj:object;row,Lan:integer; U+ W/ [8 A8 Q3 h! S w" B' z3 `* P
do9 Y. r- }2 e" B' W9 x( B2 F
Lan := rootfolder.Internal.Tools.AOLlanguage;
2 [6 A& y- { B/ [) g- _3 v; l if current = @.Destination -- else return* h0 q0 ]9 b! b# B5 s! y; z; l' ]
then
( @9 j# V' }. r5 ?1 b @.Destination := void;
, j1 U* u- R/ P7 Z4 A$ Z& e if @.occupied then' a7 R* C" s7 `
part := @.cont;
$ }5 g7 a. P% D% v7 l! R" Q @.transpOrder := void;/ ]: d3 X# g+ _- B" f4 s; C" V
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
! z5 V2 ]. _8 O; h8 Z @,root.eventcontroller.simTime);" ]3 {1 ~% h, x: G3 c1 |
@.HasOrder := false;4 Q( W4 i9 G* j: g6 `: a
@.DrivingHome := true;
4 v- T3 l* z. H$ w& \ rgManager.tryToStartTransOrder;1 T; B1 c2 s- Q. V5 B# K* _* [: S
if @.Destination = void
F+ n7 Q' O+ K; h9 V2 ^' a: \ then -- no transport order for vehicle @
5 K( [- b+ W/ Y+ r! } @.Destination :=
1 e8 _/ E( F6 N/ B# h% z3 u rgManager.nearestFreeStation(@,track.~);+ A! k1 i* b1 _3 ?
newDirection(@); , ~" s3 \9 P% N( P: |8 e
if @.Destination /= void then- x5 _3 U5 U4 C' \8 U w
@.Destination.NumReservation :=
0 u$ N2 X0 m9 E5 m% M% ? @.Destination.NumReservation + 1;' s1 G- i: e8 s
end;2 F( F/ Y- b3 u8 Y: m
@.CurrIcon := "drivingHome";
6 l* _; U' o" y* g; |) ~+ @ @.DrivingHome := true;
. x6 f( m a$ j+ e1 ~ end;+ T, ^2 J& c- Q9 ]. n
else -- the vehicle @ is empty, both vehicle and part are in the same dock station" p- q8 j7 R! e+ d! Y
part := @.transpOrder;! `# r3 {( T/ Q4 y
part.move(@);-- load part+ ^$ `1 O7 G0 z7 ^8 ?
@.CurrIcon := "load";
: ?6 f1 k, K& N% M, |4 H GlobalDistObj := part.globDestination;/ ?' o4 d7 m% k8 r0 I- B# [" H0 P
assignLObj := rgmanager.rgAssignL;
6 B N! l+ h7 ?- g, X% L row := assignLObj.getRowNo(GlobalDistObj);; f n3 a1 ~) Q2 u* [2 Y* i9 F
if Row = -1 then -- since 70
' Z6 R! d6 w( o+ ` if lan=1 then
: E x8 p- C5 G promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
: p) t" o8 B. J9 a* a5 \- e to_str("in der Andockstation: \"",?.~.name,"\""));! a, c' u: f1 a+ p$ q: @2 z4 S. W. k
else6 U6 A9 r5 I. X
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),0 e( z% k* y d
to_str("in docking station: \"",?.~.name,"\"")); / F% A0 w+ U" W) R
end;' B+ ^" @' M9 K
else
( j& g& U+ z: b! H/ A9 e' X @.Destination := assignLObj[1,row];
/ F: q3 p5 \6 k1 _6 f/ P2 o end;
* Z& U, K3 g9 w4 B8 F1 R6 { newDirection(@);$ {" U. X+ V2 s/ {/ K. G
@.HasOrder := true;
& o$ d! o; M$ O K end;
[1 u, {# t b8 X7 \# O end;- E) k6 s9 i0 f b5 r
end; -- of the method2 P# S7 \; K$ ~2 q. D8 A
|