/* called by: entrance ctrl of the object 'track' O# S- ^$ M9 {7 \. C, k! c* j4 t
*/* k" {! }% z/ L7 Z/ c+ T
is' U, ]/ ?; J! b7 c( h
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
1 ]* X `! U8 pdo$ p) S6 C D0 n. n8 {. {8 l
Lan := rootfolder.Internal.Tools.AOLlanguage;2 X7 K' r+ I) M
if current = @.Destination -- else return
# u7 X; p) s5 \$ ~/ V6 \1 c then* g3 Z V/ Z5 O! w" N
@.Destination := void;
" D! p C8 M }9 v( N. L if @.occupied then
, v) B5 y) I2 u3 i7 s! _, h part := @.cont;3 x$ f8 g+ s- v$ \ r3 U7 d. M7 v
@.transpOrder := void;% H- O7 |3 ]* J/ N# y
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
1 F4 T( Q/ X9 S5 v0 s; \ @,root.eventcontroller.simTime);- g" B- w9 l& l! O- \
@.HasOrder := false;1 ^/ Q' F- @9 ?+ \4 j( n) G% w |
@.DrivingHome := true;/ c0 G- u# V4 M- W, A7 b1 N; T
rgManager.tryToStartTransOrder;) _$ r' G: c4 X6 N; O0 ?/ m
if @.Destination = void, V0 T2 e5 E( ], C/ L2 [% J4 k
then -- no transport order for vehicle @6 y; h# W' p. ~, P9 h
@.Destination :=
1 |( @. P+ L1 p rgManager.nearestFreeStation(@,track.~);
O1 O- M8 ^( u8 U' j, X- ^ newDirection(@);
+ z+ s0 N" S) n: ]' I if @.Destination /= void then
( l' g# z" n, U% y) m3 _ @.Destination.NumReservation :=
* E' m7 ~) Q8 F0 Q& K- D7 L! E @.Destination.NumReservation + 1;2 y" R! @5 P' J9 q4 [
end;
0 A7 M' k8 u/ `5 a0 W) u @.CurrIcon := "drivingHome";
0 {" |7 e8 o# v. r, M/ d* U @.DrivingHome := true;
9 S( S# m& O# B2 k6 d end;
+ H/ A, y& ?1 {2 J else -- the vehicle @ is empty, both vehicle and part are in the same dock station/ A8 r" e, {. e8 \4 c" U+ O
part := @.transpOrder;
3 R4 g, L X) O, ?" d* K part.move(@);-- load part" Z Y, m( p5 ` ~& ~9 G' i: c$ g) @
@.CurrIcon := "load";; V& |7 P) z' C( ~
GlobalDistObj := part.globDestination;" R5 V* K+ i( ]" N
assignLObj := rgmanager.rgAssignL;
" g5 `; H' \' [% `; q row := assignLObj.getRowNo(GlobalDistObj);
+ b; [$ @( k$ {! ~# D/ B if Row = -1 then -- since 70
5 b s" S" z4 s if lan=1 then& A8 l F$ K, ]5 a" J3 x ]
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),5 [6 Y( q! o) o# g
to_str("in der Andockstation: \"",?.~.name,"\""));4 c3 ~, `6 ~: z4 Q& q
else ~5 w3 c# H9 {+ g$ j
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
7 k9 |" B% p! k- x& }6 y- O; V to_str("in docking station: \"",?.~.name,"\""));
8 U$ s! o* ?9 B end;
( y4 F: Y' M2 {6 u! {8 @# d6 }7 R else
1 V F& w# K$ y# v1 v! O7 ?! b @.Destination := assignLObj[1,row];& G1 y9 j1 K R0 }* x
end;
; q# o" I8 J, V; ?3 w4 ?# y newDirection(@);2 {! @8 p( D, \/ j/ E0 n
@.HasOrder := true;# N2 B4 E2 V. X# A" `1 o! r
end;2 ~' C& d% e. i, X$ L9 f$ G% f; O
end;
9 \' A5 T+ j4 q4 Kend; -- of the method
8 D# n1 R$ Q$ I* O5 F) L+ ~, y) G5 d |