/* called by: entrance ctrl of the object 'track'
) D7 {6 ^! O# C: O$ c! t*/
0 w2 Z: v4 C+ z/ C6 B' U2 D4 Fis$ t/ r0 W$ \3 i2 P) {5 M' R
part, GlobalDistObj, assignLObj:object;row,Lan:integer;% }; O* y! L2 U- v
do
5 ^. g' e3 i; m8 ] Lan := rootfolder.Internal.Tools.AOLlanguage;
. O7 E/ m& u1 ` if current = @.Destination -- else return
* o0 f8 ^5 y' S5 H0 h then* a1 X! Y" n& g
@.Destination := void;
; R- Z" y/ z# r3 u/ o$ H5 u if @.occupied then
( I7 Y! k1 p* f part := @.cont;
6 ~2 Q% e( Z. n( K& |2 U9 n2 S$ N @.transpOrder := void;0 T3 S D+ C4 x e
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
7 Y% _' ~7 `$ C! H+ |! D @,root.eventcontroller.simTime);; C# |$ X, p" [1 b C
@.HasOrder := false;1 b, O1 P/ T. s0 R% x9 ^" r1 t! e
@.DrivingHome := true;+ M8 z7 R$ [% c( c
rgManager.tryToStartTransOrder;. D( d8 _; N- T& @& l4 {
if @.Destination = void- l( C/ K8 z( @4 K! i' l3 p! i
then -- no transport order for vehicle @
: [$ S1 K3 Y+ D* T @.Destination :=
7 c& j# D$ ^, a- y" @2 ^ rgManager.nearestFreeStation(@,track.~);5 v( b7 ^1 T2 K' \8 `
newDirection(@); % T* E( x+ W7 W/ |, M3 Z
if @.Destination /= void then
, D7 \! |+ i. ^2 b @.Destination.NumReservation :=
( y+ G' g) W+ w6 J& I @.Destination.NumReservation + 1;2 m! J' P8 T. T. @* [
end;
, [3 y1 `7 F7 @ @.CurrIcon := "drivingHome";) `" Q7 d6 d; Z9 L
@.DrivingHome := true; H( s$ G' P" R- e; [6 J: E" H( C
end;* g+ M3 m# o" r
else -- the vehicle @ is empty, both vehicle and part are in the same dock station4 b* M6 X: n* r" y
part := @.transpOrder;
& m% a, X+ `2 O$ P( L: V' E5 x% p part.move(@);-- load part
1 J, u: A' e; Y, e @.CurrIcon := "load";
% c) b3 C2 T- `* V! h D GlobalDistObj := part.globDestination;6 m; N$ n, [2 A* [; G8 F# F- M
assignLObj := rgmanager.rgAssignL;
8 E: }4 Q( R7 V row := assignLObj.getRowNo(GlobalDistObj);
# B6 J; G8 H% X8 @3 y if Row = -1 then -- since 70
& u: C& i# r% q$ @: k" h) ]7 N if lan=1 then t9 {; i: p% `: L9 w
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""), l3 E+ g2 n( o# }& d$ O& [9 \! ^
to_str("in der Andockstation: \"",?.~.name,"\""));
$ s* H+ _$ r, p- I- H else+ T2 y6 S& H- G4 S) q* s; k
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),: ^( ?. X) E: Y t5 {" z/ }& P
to_str("in docking station: \"",?.~.name,"\"")); , O# t+ Q6 |0 Y; a
end;$ i* {% P: t q3 l8 a4 K. |9 K
else
0 h% I) ~6 X' C @.Destination := assignLObj[1,row];' S% p& Z. _7 |. d( j; T$ }9 t
end; 6 k# j4 a. d; y
newDirection(@);
`$ N/ K4 E( H3 v- p @.HasOrder := true;
* B4 b; S7 v- o6 ~- c end;
g0 a9 o9 g% Z( P end;
& k0 {" Y! ~8 ~6 G7 t0 H7 P6 z0 Zend; -- of the method
/ }/ [% W: W' {2 `2 y |