/* called by: entrance ctrl of the object 'track'
8 \: Y0 J) ?7 C% Y*/: B8 F& U" }; Y
is
$ R* V1 f. \1 d0 P part, GlobalDistObj, assignLObj:object;row,Lan:integer;- j4 t3 ~3 Y0 p6 d6 k; P) C% Z
do
0 P0 U: k4 D( U, X Lan := rootfolder.Internal.Tools.AOLlanguage;1 ?$ Q# i' ?/ G& B, f, X2 ?7 S
if current = @.Destination -- else return r2 @! w d3 ]8 ]
then
0 W2 @* z- y a/ Y9 R. r- s @.Destination := void;
* M0 }* f6 C( I) j% ^ if @.occupied then
6 B, p2 y* z" E: n6 c part := @.cont;' Y3 |/ U; i* K M! A' S( W
@.transpOrder := void;; H1 b8 `1 D! B0 I9 W$ b
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,4 V& A' d3 e% p4 N/ j3 W( v8 w8 y
@,root.eventcontroller.simTime);# K5 i f' ?2 F
@.HasOrder := false;
2 t9 a7 ^- O% H8 |( V @.DrivingHome := true;
* M3 u6 H6 x- n" w2 C+ i rgManager.tryToStartTransOrder;
" G _# e) x2 A: K L; m( j2 t if @.Destination = void& u# @' ^6 b! d3 I1 o
then -- no transport order for vehicle @
) O1 U" \6 f3 k, N' x @.Destination :=
' u7 W* q! p* x: I- H! r9 h6 [% i+ B3 \ rgManager.nearestFreeStation(@,track.~);" q3 z( z0 J; I/ Q; w: w- u
newDirection(@);
! r& M! Q. @ l# J. Y if @.Destination /= void then6 n Y. u8 N' C
@.Destination.NumReservation :=& B6 i8 I$ W! j- z$ n+ Y* [
@.Destination.NumReservation + 1;
$ f; @3 k- Y) Q0 P# G end;2 D1 P9 o& O1 s( s( l" _; X3 Y# ^
@.CurrIcon := "drivingHome";" q$ [; D w6 R' S0 i8 M7 s
@.DrivingHome := true;
6 p# Y9 u) o* l5 A; q end;
( z' G R# \8 n8 E6 y* U else -- the vehicle @ is empty, both vehicle and part are in the same dock station5 N, c# t# H! j2 o9 s2 ?
part := @.transpOrder;& F6 g- ?' d* ~3 _! ]. N6 g
part.move(@);-- load part
( I% A1 y2 k) }4 O6 t# b. X. Q! } @.CurrIcon := "load";7 p' X4 P$ W1 X: `
GlobalDistObj := part.globDestination;$ ^$ W# d# f1 O; l
assignLObj := rgmanager.rgAssignL;$ ~& p ?. C/ b2 ]. d" o% {+ G
row := assignLObj.getRowNo(GlobalDistObj);# s& x1 o+ }0 f+ Y9 r
if Row = -1 then -- since 702 o1 B w2 n0 p6 I9 |1 Z& V( s
if lan=1 then
0 M6 w- ~7 ?4 t. O8 B, _( \ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
5 q5 H" m4 t+ o; m2 N to_str("in der Andockstation: \"",?.~.name,"\""));
, q" }& K' w( P* s8 C% f else
$ c, f: Y- g% j promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),8 p6 M% {% r& R7 r! H& \& u
to_str("in docking station: \"",?.~.name,"\""));
9 ?) v0 i# w9 }6 K! T2 q8 } end;
, H1 D# V/ |" q else
6 P% g9 x+ P' Q4 V) U7 ^* L2 d6 } @.Destination := assignLObj[1,row];
$ V8 M7 Z" F+ V) C1 ~+ D: w end; 8 E& R! a' ?* ~" r9 q8 t+ C
newDirection(@);
. l: L- n A: B; @ @.HasOrder := true;
) b5 {; Q1 I, B3 K0 Y" K Q end;
$ f# j s6 @9 }3 K' E& _ end;
) t7 W( S9 c( I. zend; -- of the method
2 J6 L: S8 W. U' r# M# p) [: c |