/* called by: entrance ctrl of the object 'track'0 S, T% I: D+ M; Q" k: Y
*/! W$ k$ P1 w5 v+ S# j( c1 Y
is6 V" G; x6 k% d1 ^* [/ V
part, GlobalDistObj, assignLObj:object;row,Lan:integer;8 I9 _. A+ Y3 J% Y9 R; D6 x
do
5 C8 b: @0 O1 y" F f Lan := rootfolder.Internal.Tools.AOLlanguage;, M% v2 P+ l% k& D: A
if current = @.Destination -- else return( Y" T$ T! x) f2 ^6 x- |/ L
then
2 z% h$ C: d% V; q. S0 y: E @.Destination := void;
3 b& f$ X: B; a7 t9 n6 K/ D if @.occupied then
# M' J0 ~. M. {! e! R# V5 n5 V3 P part := @.cont;
7 y1 G0 d* w& V& Z) { X4 Y @.transpOrder := void;5 F- w9 ]8 ?( h' Z& V3 R
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,3 Y; L- c! ]& {
@,root.eventcontroller.simTime);0 w3 k+ [( n C* ?$ U
@.HasOrder := false;5 s. R. U w, A
@.DrivingHome := true;
/ r: d M. y1 `( z" p- V' x$ i rgManager.tryToStartTransOrder;8 b8 g- x8 F4 x
if @.Destination = void
y4 v1 k3 h. }" C+ w+ D+ W then -- no transport order for vehicle @
! N% [/ o1 G/ l! Z, v) [ G @.Destination :=
, q, k6 y; ?& j rgManager.nearestFreeStation(@,track.~);) ?$ K" f* k- B# _& M
newDirection(@);
1 N' t, q5 `9 w2 N$ z; m if @.Destination /= void then
( ]" I L7 a0 j, a8 U; K @.Destination.NumReservation :=
+ f, h% [- \/ p9 U @.Destination.NumReservation + 1;
5 g1 i: A- M/ [1 P end;/ b9 t% Z5 d- l$ p1 j
@.CurrIcon := "drivingHome";3 e/ i. \/ D$ l4 D: m
@.DrivingHome := true;
( J0 X! {4 i7 I# _" E end;
& D' r1 f/ }/ n else -- the vehicle @ is empty, both vehicle and part are in the same dock station
, f' F: p O, g part := @.transpOrder;5 D2 w$ d# o9 T/ \( ^( h( y& U
part.move(@);-- load part+ E& A* i6 ?) M* k. ~: Q3 L6 C" s
@.CurrIcon := "load";- y/ n$ \# J% p* J- N
GlobalDistObj := part.globDestination;
5 T; w9 L& ]2 @4 ^, `. H& I% y) [ assignLObj := rgmanager.rgAssignL;( n0 W; j& A. y) ^
row := assignLObj.getRowNo(GlobalDistObj);
, t! U% Q, \6 w0 N s$ d8 F if Row = -1 then -- since 70& r4 t- X; O" J ]4 h
if lan=1 then
% ^5 K D5 ?3 {* n: Q/ V promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),4 |' }* u: l4 K0 N
to_str("in der Andockstation: \"",?.~.name,"\""));" U7 b1 g' r2 B+ I
else
1 `% C: G, \" @( Y6 z1 O: _ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),8 p0 U7 N1 ]' Y
to_str("in docking station: \"",?.~.name,"\""));
( s7 A5 S; D2 i end;, R3 x* @( G- O% {5 a
else0 k- }1 f+ a6 K/ J
@.Destination := assignLObj[1,row];; C7 R* }; V$ R
end;
$ G% Y V; H1 W* p6 D newDirection(@);
( [- a+ Q3 R8 j( q' y @.HasOrder := true;
# ^4 V$ N8 ~4 w! A" @# ? end; {6 S, E2 a% F
end;
" V; ]3 J' M T, P: b+ z( ]end; -- of the method
$ N! i) u3 g+ p- ~ |