/* called by: entrance ctrl of the object 'track'" G; F# \4 n) d8 G4 [5 O% ~8 F
*/0 h2 L8 w" ]& F- d) L" |9 A1 V6 I f
is y7 R2 B6 o! F* |! J: B6 c
part, GlobalDistObj, assignLObj:object;row,Lan:integer;: T5 h# K8 k- Y
do( P) `- ~, a* h7 M* I$ y
Lan := rootfolder.Internal.Tools.AOLlanguage;
* x& [- f8 |1 e# N/ E0 V0 _ if current = @.Destination -- else return1 G" r- g8 N4 }* l4 Y4 e! f1 K
then
$ h, s4 _8 ?, f- p, l @.Destination := void;
* O7 M+ c: A3 G+ M if @.occupied then/ M/ c! R# q! X6 _7 u( A
part := @.cont;' O9 ], }4 F4 F! X/ o$ ~% w, ^
@.transpOrder := void;6 L `8 i: n: a, t, C
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
8 {8 I& H5 i1 n5 D$ R @,root.eventcontroller.simTime);. [) {* L7 j' o- m& k
@.HasOrder := false;/ V5 n7 q7 {$ U: \, p' t
@.DrivingHome := true;" p' p6 P" B& R$ x" W7 W0 Y1 s; C
rgManager.tryToStartTransOrder;, k+ f4 |6 p0 _2 y n& m: Y
if @.Destination = void# `& G1 S6 [) z6 A
then -- no transport order for vehicle @" h: ?( B; i+ P4 r; O
@.Destination :=
5 K6 N% z2 H5 }7 c- { rgManager.nearestFreeStation(@,track.~);; r. H, ?. u$ r+ u
newDirection(@);
7 m& E. O3 S( x5 a6 |& w$ a- p if @.Destination /= void then7 z. Y6 a; }5 f
@.Destination.NumReservation :=
, p# w" w- e) O; U- q. Z0 ~ @.Destination.NumReservation + 1;/ i8 q9 j+ ^! N' b: b; {& V
end;6 a: b. ^$ i# g- s% T; o! J
@.CurrIcon := "drivingHome";. t! m8 P: Q7 A8 P# }7 I& Z
@.DrivingHome := true;' [. ?! z! {* n8 n R: r2 ~7 d3 a8 w) L
end;
9 O* z9 p, j2 E( Z5 w else -- the vehicle @ is empty, both vehicle and part are in the same dock station# ]8 \- v% J* Q4 [! Q, k
part := @.transpOrder;% H' p, ?# o3 {* D0 F0 Z1 q
part.move(@);-- load part
, O/ I/ y* m7 b+ d+ f8 c @.CurrIcon := "load";( G& U O6 ?: I# |7 i9 g/ {
GlobalDistObj := part.globDestination;
* _$ ?9 K. r J, Q* ^+ }: A assignLObj := rgmanager.rgAssignL;5 C% Y- @/ s1 U* _
row := assignLObj.getRowNo(GlobalDistObj);
9 O$ [( K' \' ^$ U2 p if Row = -1 then -- since 703 [6 u& l( |0 k
if lan=1 then+ w1 e# Z p7 \- t
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),4 X9 {2 G% F8 ?8 G+ l& E8 D7 a1 Q
to_str("in der Andockstation: \"",?.~.name,"\""));
( e. \6 Q2 D0 e- N) v, T else
l+ U" Q" K* t9 O4 o promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),0 I0 T0 Z) ^) ?4 q9 M7 f
to_str("in docking station: \"",?.~.name,"\""));
( M" @2 t2 |2 |4 j9 r end;- V& Q. N, }5 t
else
# ^# f+ M$ N& h! Q @.Destination := assignLObj[1,row];4 h q- s; T. r, N4 p; v
end; 0 Q' z5 A" L" u3 r% ~1 R
newDirection(@);
& o" ^4 E1 I1 ?7 d, C8 k: M4 \5 ~ @.HasOrder := true;0 }. o# q2 s: h# y. F% |
end;" `- p) p; W3 Q: F9 m
end;
& i0 v) i4 F+ f. Z3 I% ~end; -- of the method1 g8 `8 a& ]9 e8 x6 }
|