/* called by: entrance ctrl of the object 'track'
' V( [# ^8 j- Z0 T% L* {+ Y$ L*/
0 D9 ]- e# g5 M- h/ o" [+ W0 A# h. Bis
$ Y: C: v9 m3 N' Z part, GlobalDistObj, assignLObj:object;row,Lan:integer;
* D- V5 _. Y0 O9 x6 U# u+ h) V4 edo
7 k1 u' _, o+ h3 @ Lan := rootfolder.Internal.Tools.AOLlanguage;. e1 ]; ^# h! d* ]6 v% n; V
if current = @.Destination -- else return
! V) a& k( @% }- z; s# y then( ~6 W- y0 ?, d0 c* B
@.Destination := void;' X) U7 N. P: _; j
if @.occupied then6 \" D- X* P! N" ?0 j! s1 V
part := @.cont;7 w+ \9 B% x% @ c6 g* u; Y
@.transpOrder := void;; r. q. g G5 d0 @1 G% g
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,1 {4 E' h) N/ g6 V. s1 L+ k: S" f" d! h
@,root.eventcontroller.simTime);5 F, M- @0 n4 \
@.HasOrder := false;
* ~$ x9 J1 E; \2 S2 f @.DrivingHome := true;
4 Q- N9 ]) M! |6 l1 h& E rgManager.tryToStartTransOrder;% G' n5 m/ M" @1 z( r
if @.Destination = void3 ?( [2 l- H( z* G1 U0 s' x
then -- no transport order for vehicle @2 B& a( b5 x) P" \
@.Destination :=
! u7 e* P/ H- o3 [# x# k& m rgManager.nearestFreeStation(@,track.~);4 ]& e& X1 y; t" b G
newDirection(@);
, k, h, g2 S3 X, \ if @.Destination /= void then$ _& `. R$ g/ X+ ~
@.Destination.NumReservation :=1 z7 g4 r( J) ]3 I' r2 W3 K
@.Destination.NumReservation + 1;
. m% y9 n: m3 D; U end;) e- W: b! F$ X# h6 \+ [) S
@.CurrIcon := "drivingHome";, l5 ?8 t1 e5 ]3 t i
@.DrivingHome := true;9 N2 p7 H# e$ x& w/ y6 J
end;- G: `9 d2 g' x" ~8 X# K) l
else -- the vehicle @ is empty, both vehicle and part are in the same dock station G* s' s7 v6 M; S. M" m
part := @.transpOrder;
" k5 s' J+ `" z* a part.move(@);-- load part: P, {% K& r* c$ \! O! n
@.CurrIcon := "load";
1 V/ @ H8 d; L+ f3 O3 j GlobalDistObj := part.globDestination;4 ]! i5 L; u; e" a
assignLObj := rgmanager.rgAssignL;( S! b9 U4 u3 p7 i: z1 b5 \
row := assignLObj.getRowNo(GlobalDistObj);
" r8 D: w7 \$ T$ }4 g if Row = -1 then -- since 70/ }8 j, ]& L( T. _/ w1 Q6 U
if lan=1 then
0 t; l; C# j" c* L8 C+ P! q. E promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),& e: j3 [ ~- |! t. ]9 l; N
to_str("in der Andockstation: \"",?.~.name,"\""));
( L. S0 ]# a, R$ p: E% D else# Z3 J( y- \+ ~1 y5 Q! T8 z
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
* c2 T$ q }8 `/ V to_str("in docking station: \"",?.~.name,"\""));
9 Q1 {; `1 s: L8 l c" G( x Z. k end;
. e0 i) ?' Z, C3 u0 B9 m else* l4 y: Y1 N5 l0 Z* q+ {
@.Destination := assignLObj[1,row];8 B6 A9 F) ~6 t6 A& @* p, B, d
end; $ `: l$ l G; _% {8 J
newDirection(@);
* l* }! ~8 s3 k @.HasOrder := true;
4 t8 j- K/ n ]! [1 {( v7 x! ]) V end;
& z' K5 `4 O1 J# I) Z end;
0 f% {5 W9 b* X, P6 n1 cend; -- of the method7 R/ ?) t ? ~* `
|