/* called by: entrance ctrl of the object 'track'' ?1 y$ N" k" r$ ^1 U+ k8 Q
*/
; ]! w' @6 W0 \. Z4 B# b, v3 Yis6 ^4 Y+ K3 a0 T9 A' e' }6 u5 K( S
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
* |8 X2 o# k: o8 a+ a, K( Ldo* b4 E+ G( @0 w
Lan := rootfolder.Internal.Tools.AOLlanguage;3 r$ r, I1 Y% S
if current = @.Destination -- else return2 Y: A$ r7 p9 y2 y8 A
then
! [# ~% G$ S* u4 Z @.Destination := void;
6 g$ ~$ f& E8 H, w% h if @.occupied then4 H" r& ?/ Y+ \7 y/ q
part := @.cont;# D5 o* _* f) J1 c9 f! k$ w
@.transpOrder := void;
% i, N) s& r. D v+ @. {9 o part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
* j# a# |9 w# L+ t4 j+ q @,root.eventcontroller.simTime);
) f+ N" ^( c0 C6 k6 `, G @.HasOrder := false;
& t# P4 E, F5 L/ a6 ~ @.DrivingHome := true;' r, y' k. p/ E3 w
rgManager.tryToStartTransOrder;
3 Y% }0 S9 M, W# Z) {: y8 Z if @.Destination = void1 ?, r. s: @; X6 |2 U6 v
then -- no transport order for vehicle @
2 Q7 c0 v; `' u; ~6 H @.Destination :=
7 t; ~" o, _) N9 z6 S rgManager.nearestFreeStation(@,track.~);( ?& G+ _8 L. p2 m
newDirection(@);
$ |8 [5 | }1 F" u5 _/ d Q9 ? if @.Destination /= void then2 B# Q# {2 ]( b: l9 q
@.Destination.NumReservation :=
! _0 I7 q- Y# [& w2 Z$ S3 A7 B @.Destination.NumReservation + 1;, C6 b( U+ |* b% y1 Z( N
end;. U: `* D! h" m4 @$ E! J
@.CurrIcon := "drivingHome";; ~/ p6 X+ x$ f+ h
@.DrivingHome := true;; j# O6 O! b3 ?! P
end;
5 a, t2 T- e* D) f; N1 \ else -- the vehicle @ is empty, both vehicle and part are in the same dock station
m0 f, ~$ q# `3 o x part := @.transpOrder;
! f1 K) }9 N0 {* ?( [: x part.move(@);-- load part M0 f' i. X3 H; d; |) y
@.CurrIcon := "load";
! G. k/ m! [# ?2 [ GlobalDistObj := part.globDestination;+ `2 N) Y3 ]5 q
assignLObj := rgmanager.rgAssignL;
3 ]# l p/ x( I/ H row := assignLObj.getRowNo(GlobalDistObj);
9 ~6 v# \/ P9 L! C if Row = -1 then -- since 70
* g0 M% p1 H& {1 i4 a# | if lan=1 then
9 I8 s" D. r' n% M promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
" q& k9 r) ^7 D; b1 |, ~: \ to_str("in der Andockstation: \"",?.~.name,"\""));& v* \ [# v: x* ]4 |
else
, C2 ^2 P# L* n. M6 Q' s promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
" B- O3 q0 y" h8 n# X0 V5 a/ l+ n to_str("in docking station: \"",?.~.name,"\"")); + z5 C2 [6 K2 \" r$ \: a2 u# ?/ @
end;6 a6 L5 ?2 c2 O9 D* z
else
/ n5 ^. p4 g# j+ r3 x @.Destination := assignLObj[1,row];; G- V2 t) {+ o
end;
" {5 Z v- ^4 T6 c newDirection(@);
+ x, p, M& B I* F @.HasOrder := true;( r2 t+ A, x+ f' g
end;
, E7 K* A4 \. R: Y% I end;9 A/ R% X$ p9 E5 g; Y
end; -- of the method( a& ^! ~- \4 h/ i+ ?; d. \. k1 ?. z7 e
|