/* called by: entrance ctrl of the object 'track'
- J$ `$ k) O& \5 J*/
% _& l7 B w4 D3 T0 I4 sis
; a% J6 Y9 N3 N part, GlobalDistObj, assignLObj:object;row,Lan:integer;2 S3 I+ Y& U1 b
do6 u- t* S# { b3 Y0 ], U" \, u
Lan := rootfolder.Internal.Tools.AOLlanguage;2 X+ T4 s6 @3 h2 u6 n' f
if current = @.Destination -- else return
/ h; z) z* X/ O. R# {& b. B then2 |- |. y+ n( S0 P" A
@.Destination := void; V9 i& t2 w1 C; B6 s! i2 [; l1 ?
if @.occupied then
4 @ h7 V* i* B: ~9 I" V part := @.cont;7 R N5 X8 U$ W
@.transpOrder := void;$ U9 u" a0 U9 k& b) C+ s& U% t
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
# {- N, {6 Z$ m) A1 m @,root.eventcontroller.simTime);( e5 D8 M x0 `6 u2 j) c! d
@.HasOrder := false;
+ x$ v/ z3 n$ `. ? @.DrivingHome := true;. q; N3 b& y2 ?5 Y
rgManager.tryToStartTransOrder;
$ H0 ~2 L- C7 O9 P& {0 G if @.Destination = void
. o4 E A1 d \* E then -- no transport order for vehicle @, S4 o5 c' z0 ^$ y
@.Destination :=- R" t9 G7 k c- H
rgManager.nearestFreeStation(@,track.~);( s& c& r9 T& G* F: F6 k& F
newDirection(@); # E8 Y, y% ` @% [
if @.Destination /= void then
, g4 F* C! w: ?0 l/ } @.Destination.NumReservation :=
( D7 p) t( x- T: y0 x: D( X @.Destination.NumReservation + 1;$ K0 H2 M; k3 h( {
end;8 U, V! h' A) y
@.CurrIcon := "drivingHome";; `( q3 `6 R# c7 G+ z) l. h
@.DrivingHome := true;5 F- R& s5 }3 \0 l% T( ?# {
end;* U! X8 z& F( a z% N
else -- the vehicle @ is empty, both vehicle and part are in the same dock station* Z- \. w, e0 B6 |6 m+ r- w& D
part := @.transpOrder;% [4 j% Q% i S/ e5 Y1 t
part.move(@);-- load part
0 [5 N4 l8 h8 l" K# @ @.CurrIcon := "load";. {4 {$ ]( h- H. ]; o
GlobalDistObj := part.globDestination;
c' e: F! d" }: s A assignLObj := rgmanager.rgAssignL;
% p h, \' b N- v8 u2 W; q row := assignLObj.getRowNo(GlobalDistObj);
% q2 F1 B3 B- ?) R if Row = -1 then -- since 70
9 t! p* X! v4 d' D if lan=1 then+ i+ ^ F, a- Z5 `
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),1 T7 x6 G) y0 v$ {% H. H
to_str("in der Andockstation: \"",?.~.name,"\""));, ]7 o: M! d) s4 J+ f" K7 ?
else' m" [ E2 _2 c5 n
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
: c& `' v( t& X- I% O P5 ] to_str("in docking station: \"",?.~.name,"\""));
9 Z; a3 _ g7 C6 A end;
. A$ a# n( Q5 Q/ q/ @% f# \* | else
; J* U o0 I9 c- y9 Y7 g" ` @.Destination := assignLObj[1,row];& O6 i& w6 q. L$ E9 I
end; $ o e( |6 T) C$ P8 L) F& i/ M
newDirection(@);% I; Q) E. Q# J1 w: l# n
@.HasOrder := true;+ j! C/ S; ^0 q$ k
end;' R3 d, J2 p1 _
end;
+ ~& C4 b* t; O3 H+ aend; -- of the method
0 m" n, |3 }% U0 U# B6 ~ |