/* called by: entrance ctrl of the object 'track'
, J/ d$ i( l! s* r. Z% u*/
& ?0 x5 g. g9 h: L/ ~5 f' kis! C) k3 N" k# q _; @- z
part, GlobalDistObj, assignLObj:object;row,Lan:integer;3 R3 x8 ?# N) O3 w' h; S2 B. U
do
. h* T" S7 o( m9 V8 U( n+ @: s0 l Lan := rootfolder.Internal.Tools.AOLlanguage;
0 w* Y6 ~2 |, h$ b5 _7 J# P G if current = @.Destination -- else return' X! C; O2 U0 r; Y& ^% q
then2 ` |) M& l$ _6 K% |0 H
@.Destination := void;8 w$ y/ N4 ?& ?# N- T/ M2 y& y
if @.occupied then! i0 P' i. q4 |( O, t F
part := @.cont;
' B3 F* z+ L8 X6 @/ q; d& x) X# d; { @.transpOrder := void;
1 A% C8 c* {) @& O6 o; I7 u part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
* b5 ~) H0 i- _, P2 @$ h" p! @ @,root.eventcontroller.simTime); k% _& x5 m& ^/ A
@.HasOrder := false;1 Q. U9 q2 D: \; g" O* i X$ [+ y
@.DrivingHome := true;: r6 \- y. B y! ` m- a
rgManager.tryToStartTransOrder;& W' U- c9 X, g, b( Y/ `! Y. i
if @.Destination = void3 ~# A/ S6 w4 I0 P. x0 S# H
then -- no transport order for vehicle @
8 k& Q5 Q( a) }7 }9 G P2 k @.Destination :=
7 D& j) ], y1 D, F2 J; o rgManager.nearestFreeStation(@,track.~);! M9 [/ \! x8 d; `. q0 D G
newDirection(@);
0 d# y w; B5 a5 ~) X if @.Destination /= void then" d) D$ N9 P# i; N# F2 h& `7 T3 A
@.Destination.NumReservation :=
( I$ [5 `5 Z; ] @.Destination.NumReservation + 1;" V7 L" l/ Q( ~# M
end;
9 G& G1 J0 Y6 [/ Z @.CurrIcon := "drivingHome";
- U! Y0 [/ t- ]* a0 k9 u& J$ q3 D. C @.DrivingHome := true;
0 @, n9 |0 a. H- W$ y0 L# M end;1 X9 R2 W0 p' o, n5 k
else -- the vehicle @ is empty, both vehicle and part are in the same dock station0 D! E0 s; b" S5 h! F6 |
part := @.transpOrder;8 c4 z( v9 X! o: z' `9 {
part.move(@);-- load part
; W+ T$ z' C! z+ Y% K! e3 ] @.CurrIcon := "load";
: h6 Q% g/ S: j- H2 L/ ^- L! W GlobalDistObj := part.globDestination;4 m; C. j4 k3 Q" f
assignLObj := rgmanager.rgAssignL;
# \ e. a& s9 K( Q, ` row := assignLObj.getRowNo(GlobalDistObj);& i: [; h# P. |3 s# E C
if Row = -1 then -- since 70
# u; v$ y. U* c( s F if lan=1 then- o$ L$ t+ M, ]+ R8 A$ E3 j
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),0 V( O/ l! {) o1 n7 x( j6 F
to_str("in der Andockstation: \"",?.~.name,"\""));8 }6 y7 m, U% l3 X
else& s" C- J/ z" v( S
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),8 ~7 X; |4 M1 f4 M" H/ u+ o
to_str("in docking station: \"",?.~.name,"\"")); ' J) M5 y- X, c# O( |& ~
end;
# s1 R( G; Y* K4 V else( b8 `! j j" n( ^5 X
@.Destination := assignLObj[1,row];
3 b, J( G* {! n end; % j. T* h1 ]0 ]7 k- S( R) }9 i
newDirection(@);3 Z7 b5 g. F8 S7 I/ C4 U v; l6 o* n
@.HasOrder := true;
& V) }; M8 N; c4 x% P6 Q end;/ E* B! k U7 ]5 G3 _# T
end;
, B3 H0 T3 h( k6 T; L9 qend; -- of the method
% ?* M6 k& _( M# x+ {5 Z! D |