/* called by: entrance ctrl of the object 'track'4 B7 j Y {/ @
*/
/ {$ ?' Z. J! C# u& Wis
9 u" t; A! N) ~( a: w part, GlobalDistObj, assignLObj:object;row,Lan:integer;
9 J* `) D* R2 ?+ b; s9 c( \. U" ndo
1 ?% \& X) {9 b5 d% V( E2 P' g. k Lan := rootfolder.Internal.Tools.AOLlanguage;
( C# a" \: d0 d7 m if current = @.Destination -- else return1 S0 w) _( \8 C, L3 P. L+ S
then
- }/ g% I, m% [( }4 ?+ k( i @.Destination := void;# G& n# g; h4 Y. S
if @.occupied then
& S3 `/ f0 j6 R, H) F' G part := @.cont;
; x+ f* F; ?& o6 Q @.transpOrder := void;( f& x1 c& q7 c4 P& u
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,: m2 P" l* O4 e5 W4 ~, \9 g
@,root.eventcontroller.simTime);
, g2 L2 t o9 S$ ` @.HasOrder := false;
2 K, N1 ^* W6 Y6 a' u @.DrivingHome := true;; Z. {+ p6 I5 m) I6 x) K) x
rgManager.tryToStartTransOrder;' j0 o- r1 J( `# b H. i. [/ Q) H
if @.Destination = void
/ L5 |: a+ `! \# ^3 Y then -- no transport order for vehicle @
) v" O |# X' H) d0 E; a T @.Destination :=1 [$ O5 I; j+ w6 Z" D" G
rgManager.nearestFreeStation(@,track.~);: L+ t+ V1 M0 N, y
newDirection(@);
# ^ B1 f1 ]0 @( D Z/ D if @.Destination /= void then8 l5 X2 M4 x# G: U- \, {
@.Destination.NumReservation :=
* g; s8 y" b/ N F0 m @.Destination.NumReservation + 1;( J* `! T" L* ^: Z1 j
end;
% R. s- r3 N( B! _# ? @.CurrIcon := "drivingHome";- s) n. J/ i0 C" b9 k `' M
@.DrivingHome := true;& w" d$ n! w X( u: ~! v+ q
end;
+ B# s$ K) U4 y! K! L else -- the vehicle @ is empty, both vehicle and part are in the same dock station, G j) \" @. I7 N
part := @.transpOrder;
; x% T+ Y7 }9 J part.move(@);-- load part
+ c7 o2 I- Z. ~' d1 A2 l* f @.CurrIcon := "load";* k1 W8 O# T- W' i; K8 } S
GlobalDistObj := part.globDestination;
D! ?8 s" Q2 t3 A/ L2 r% o& V6 R assignLObj := rgmanager.rgAssignL;
7 W4 @& H$ B+ Z5 C$ Z+ F row := assignLObj.getRowNo(GlobalDistObj);
* @8 F5 ]7 }& D. p) `$ `/ B if Row = -1 then -- since 70
0 x/ p4 S6 x U; i( ?& M) h* { if lan=1 then3 u m; f; A8 _& S. C
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
; J" w; @# F# L, C$ h to_str("in der Andockstation: \"",?.~.name,"\""));
7 p2 D4 w# L5 b& a else
. i+ `% f; F; D; T# t promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
/ n2 r; O& z! A7 \; O k4 @7 a to_str("in docking station: \"",?.~.name,"\""));
5 z, ?! ?: S* }( S6 A end;+ z# B0 z' e8 q0 q* Y4 H
else
& B/ d. [) W; s& r, s- ~: N9 A @.Destination := assignLObj[1,row];+ m) }8 w# [. a# h$ f
end; $ u* J. k U; y7 \
newDirection(@);, Z2 s5 J. h' }3 f; x" k
@.HasOrder := true;
! o9 l' a7 K/ F0 Q* b7 J end;
! z0 o6 q% k0 K, W7 z end;4 X- z" N$ I" {3 B2 p6 X3 p+ {0 [" D
end; -- of the method
, E Q4 {" V/ F: D7 z& r+ Y |