/* called by: entrance ctrl of the object 'track'
3 E7 }6 ?: H. `1 b2 ~/ ]- x*/7 _% k; G4 D. P* i4 h8 `, n
is
! B7 a# P8 y: K8 G- F part, GlobalDistObj, assignLObj:object;row,Lan:integer;
$ t0 N( n" ^5 D( K" v- Udo
9 c; y- U7 x3 E4 w Lan := rootfolder.Internal.Tools.AOLlanguage;
5 x6 ^" j# T9 P% p' k if current = @.Destination -- else return
/ r; C+ Q0 n, ]- F; o z then
( `9 j- F0 \' a1 y4 A- x @.Destination := void;- T1 F* |! R. D1 D% C* u& q1 Z2 u
if @.occupied then, |% Y# F0 \7 N. N
part := @.cont;
) Z1 D. x/ g% H4 R, v/ P @.transpOrder := void;
* T& K0 Z* C' H* e' E part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,0 J6 E% {, E2 i) E# ^+ V
@,root.eventcontroller.simTime);
( P1 e: F \: _# z/ Q3 J' L @.HasOrder := false;
' d$ ]5 E+ Q* C. v& e @.DrivingHome := true;
s! \9 y' o$ f ?* j rgManager.tryToStartTransOrder;
x4 x* m+ O: h$ {- [ if @.Destination = void4 P7 {. e! n }( X
then -- no transport order for vehicle @
8 j6 x8 ?9 U' s4 X @.Destination :=% E4 ]. u. p' R' W% i) v
rgManager.nearestFreeStation(@,track.~);$ S) l9 {; g9 }1 R9 z6 i; {! {
newDirection(@);
6 X) ?, y! T: t& M! u; H8 I if @.Destination /= void then4 @% l2 R7 {7 K" t6 @3 p
@.Destination.NumReservation :=2 u9 x, u; F9 q) b- E
@.Destination.NumReservation + 1;: ~* E: w/ I$ N- d" n
end;6 w4 i* b$ I. }# u3 u+ R
@.CurrIcon := "drivingHome";
5 i# r$ I* J6 s$ ?2 i. b @.DrivingHome := true;
9 ^( e* @% @9 e+ E end;
5 y8 U' N+ l: Z: V. _ else -- the vehicle @ is empty, both vehicle and part are in the same dock station
- ~ _ W; G! H part := @.transpOrder;
# k' M+ f R# M1 e part.move(@);-- load part
# Q9 S; W% ^2 b7 S5 I- P8 V; B2 U @.CurrIcon := "load";% _( S9 u6 t1 E4 L
GlobalDistObj := part.globDestination; c; }& O$ J# r$ T" ?
assignLObj := rgmanager.rgAssignL;$ v9 r, t2 H% |& q
row := assignLObj.getRowNo(GlobalDistObj);
1 g& a8 b, A: n0 q7 { if Row = -1 then -- since 70
' z6 P) n9 u' [& T# m8 a$ u if lan=1 then
. ]( a3 [; _& q" O1 O promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),: w/ e5 A; q; h0 O$ c+ o0 W
to_str("in der Andockstation: \"",?.~.name,"\""));) R0 g9 o" R1 |$ P: n. x
else0 l9 d) E8 w/ F0 q: [
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
8 s# a8 V' w- c! c; P1 w to_str("in docking station: \"",?.~.name,"\"")); + x) n$ U8 ]* b5 v) X- s' o
end;/ s3 K% v/ |, v
else4 T( r4 C- A* ]
@.Destination := assignLObj[1,row];
% }8 \7 }+ t" g/ B) y# A/ o end;
# |) ?4 u0 D; c) R. J/ V! X newDirection(@);
& h$ W' B( q( r: ?# [2 S @.HasOrder := true;
7 i1 |" }" G% u* M* U9 [, u5 _ end;9 d+ K0 M. J* m' f( b7 F
end;
: u6 d7 k. `/ S- h qend; -- of the method
% Z. G7 p! q/ Q9 _8 ~: l |