/* called by: entrance ctrl of the object 'track'" [$ P$ _% B) q0 N
*/
7 s! R" s% Y8 fis9 J, ^$ u- X- o6 q4 X
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
% ]) Q; K5 X8 T8 i& udo
[! B# Q- @/ r& x! f' `& V- _ Lan := rootfolder.Internal.Tools.AOLlanguage;7 x$ ^, q. c& l/ n4 \/ \
if current = @.Destination -- else return) K, R0 v8 z! R! |+ P; E
then
( M- H+ n% d- Z- L1 X* e+ R0 d @.Destination := void;
- t$ s* q( v* W! K6 A if @.occupied then
; g9 Q+ l. t, r# b: C1 E part := @.cont;
( W4 ?1 G- g, @" M, c @.transpOrder := void;& T$ y' w7 [9 k. H" ^, x% `. ]
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,. p2 u+ J3 A" [# U7 s) m2 V" Z
@,root.eventcontroller.simTime);
1 G; [3 w6 G( \$ r3 Y0 g! J+ ^ @.HasOrder := false;; g/ c( d+ v0 c8 ]
@.DrivingHome := true;
% ^! V% x% f# M8 e' @ rgManager.tryToStartTransOrder;0 ?1 b: N. r$ A" ^
if @.Destination = void& r5 j" z$ Q0 M, I4 W# I/ h! ]/ l! L
then -- no transport order for vehicle @
0 c$ A! u$ r1 a F" z& l, ~ @.Destination :=
# `5 s9 q0 ?) O: Z: c% e/ Z) z rgManager.nearestFreeStation(@,track.~);" i6 ]! y6 m$ M, m4 _2 k
newDirection(@);
( Z5 X* z+ n. |# m" Z9 O if @.Destination /= void then/ R0 r7 k/ P9 o9 j
@.Destination.NumReservation :=& {* Z# K- S8 ~# L3 B+ S" d# X
@.Destination.NumReservation + 1;
! Y0 h1 w- H/ |) b" e% W end;
1 |3 R" ]1 w/ [) }( K' ?4 T @.CurrIcon := "drivingHome";( B9 s* h7 ~3 t
@.DrivingHome := true;( R3 {4 n/ l( B- J" j
end;# `8 n8 `! ?3 O, ?3 r
else -- the vehicle @ is empty, both vehicle and part are in the same dock station/ g$ u* Q- K1 W! M1 _* c
part := @.transpOrder;
' h& s/ _! Y3 d) ^ part.move(@);-- load part
* p& y- e' y& X. N! Y3 N0 U @.CurrIcon := "load";
. c9 [7 b# J7 ~3 R0 K3 k. w GlobalDistObj := part.globDestination;. Y' m9 W; N# V
assignLObj := rgmanager.rgAssignL;9 u2 E2 O" X7 x' M: k
row := assignLObj.getRowNo(GlobalDistObj);
4 T" d7 h& {5 U5 I2 z if Row = -1 then -- since 704 W8 T8 x" K3 @# Z% K2 N
if lan=1 then2 F; J7 Y: E! S' e
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),1 }8 J; m/ ^2 X# f5 }/ l) a. j
to_str("in der Andockstation: \"",?.~.name,"\""));4 I: W [# o% w- @* {
else
4 K/ x8 x M: R" H- E* E( s promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
5 Z4 a, y" H' G- i to_str("in docking station: \"",?.~.name,"\""));
" K" T% ?+ Z, G3 ? end;
9 o4 o' N L' ?5 U5 r) ]- G+ Q else
! G0 e' M$ U" F @.Destination := assignLObj[1,row];
% w% N6 ~3 Y6 S, d) `' q% F" }8 r3 w end; / o- V# _$ |) \; ?( [( s2 U
newDirection(@);
0 E1 N, z% ]: N2 R% ~6 m4 r; | @.HasOrder := true;
8 v/ _0 T% N1 j( G5 `# i end;
! W1 g* M6 G* v! I end;
: w0 g5 N5 `/ B' _# ~8 O( send; -- of the method
. K+ \4 B5 |( Y( w |