/* called by: entrance ctrl of the object 'track'9 P$ H, D8 Z6 s* A& V& H+ O
*/
7 i1 F+ N' C! `- uis. k' ?; k- {5 |7 P+ X
part, GlobalDistObj, assignLObj:object;row,Lan:integer;- q/ [0 M6 d$ n, J7 ]/ ~7 d
do
! y# F- B6 z) s* U, _; l Lan := rootfolder.Internal.Tools.AOLlanguage;( F0 H7 b. p% n' ~% e! Q$ D
if current = @.Destination -- else return
( x1 `3 l, T! S- d; L/ M then
6 {! k5 H' R7 l% p2 H8 Z( J1 ^ @.Destination := void;
. b+ T% m, {( @2 t5 ? if @.occupied then
! ^1 c0 A" b$ s part := @.cont;
" B/ }5 E# _5 O% T$ | @.transpOrder := void;/ w* o4 m+ {$ O, k \" `% I
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
/ O9 S/ [0 Q- w# }+ g0 ~+ z @,root.eventcontroller.simTime);7 B/ I% M' j1 u6 V: ^3 y$ c |
@.HasOrder := false;" ?& q+ Z- |3 X8 V0 c; q& I
@.DrivingHome := true;" M' k) b3 r0 O a
rgManager.tryToStartTransOrder;
$ n" F7 a' W" o if @.Destination = void, H: Q7 V0 v" Y: k) m; i4 E" m8 X
then -- no transport order for vehicle @
9 t2 B$ v" `; Y( G2 N# {) P @.Destination :=
6 G9 G2 S8 W+ a) |, u) d rgManager.nearestFreeStation(@,track.~);
3 q+ `2 w( q5 E5 n8 } newDirection(@); ! w. j, X- A, Y T! a3 C
if @.Destination /= void then: `0 S: w$ j" _ @) Y
@.Destination.NumReservation :=0 @4 e- R: M+ U' H$ l/ W
@.Destination.NumReservation + 1;
9 `: c5 |: J2 M' H end;
* n' a6 m# j- c( z0 Q- u @.CurrIcon := "drivingHome";1 F8 a( Z+ r6 Q# L
@.DrivingHome := true;
1 L4 [+ L, o, M. q+ J% b end;
& l/ Q) t a4 [ else -- the vehicle @ is empty, both vehicle and part are in the same dock station
$ A9 P% Y$ e$ ^) g$ j( T9 \ part := @.transpOrder;& ~# P @0 k; n& d1 U
part.move(@);-- load part
* L- _* q, Z l9 Y6 ? v' r @.CurrIcon := "load";
, _0 V$ h9 y0 p4 @! P% {$ w4 W GlobalDistObj := part.globDestination;: c) T. z6 I+ }, `0 w% H
assignLObj := rgmanager.rgAssignL;
# f) P/ a. o7 ?& d row := assignLObj.getRowNo(GlobalDistObj);
$ a- k4 W3 ?% Q if Row = -1 then -- since 70
5 e# p0 e8 R7 a# g if lan=1 then! _0 y" I+ a# l% e$ _: g& h. e
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
! j1 B: D: O# k0 v9 l to_str("in der Andockstation: \"",?.~.name,"\""));, d9 J" G' }. @3 @8 z: A
else1 X: F9 F- q" n1 X
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
- f/ b9 i) O+ I1 }' x to_str("in docking station: \"",?.~.name,"\""));
- ]/ D, V0 F: G+ i* z. L5 } end;3 ~' o6 {& M" m6 Q) s( X& ^; o
else. H- f" M& K2 v- j. f9 a0 W
@.Destination := assignLObj[1,row];- n) F0 R3 p+ a Q2 v3 G7 ?1 ]
end; 7 m7 r+ V$ f `# c0 V7 z6 f4 s. J
newDirection(@);
; e: K' s. q u7 ]3 v$ p6 r @.HasOrder := true;4 ~( q! r: N! j& `5 f. f X' }
end;# c: [: _5 w( n
end;2 A6 x. q& g5 h5 R# B( ~
end; -- of the method
# E; W, C$ f2 q& [6 u; U) }2 f' V |