/* called by: entrance ctrl of the object 'track'
# z3 i: V! p# Y" P6 s*/0 B3 ]0 Y& { N' G3 \) E! {
is
1 q; X9 t3 h9 J c/ t part, GlobalDistObj, assignLObj:object;row,Lan:integer;0 p6 \, D0 } I9 |' R* H) `
do
; `, v+ k4 n$ J- T, c4 {9 z Lan := rootfolder.Internal.Tools.AOLlanguage;
- J1 T/ ]7 R: ?0 C" ]% Y if current = @.Destination -- else return# s2 h, E; R) k) z6 ]
then
5 T5 B# A& n/ m2 h! N1 K- Y @.Destination := void;" x* b/ r1 @; K- Y ~) Y
if @.occupied then
- O ], ?, C8 |8 g: [ part := @.cont;
+ t! ]9 Q4 _. H; q p0 g0 Z* ^4 R" M @.transpOrder := void;
5 @. Z7 h" u/ G5 V% e7 _8 p part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
+ w7 Z2 y* _* I3 E* d: W9 Q @,root.eventcontroller.simTime);
6 w% P" F5 H9 G4 q9 C @.HasOrder := false;
1 }& d3 D. q) V @.DrivingHome := true;
* s1 [' P. L6 i+ l7 t5 V rgManager.tryToStartTransOrder;# X8 P* ^( I( l& @; W
if @.Destination = void8 ~8 {) ]$ K' H$ P, J4 e
then -- no transport order for vehicle @
; E% V7 O! V; E, r# w( |+ V @.Destination :=
5 N4 b- G8 K, x9 p8 B ? rgManager.nearestFreeStation(@,track.~);
( B) R6 Z# C- e3 r( ^! s newDirection(@); ! ^6 Y) e. z6 S# R' Y8 t
if @.Destination /= void then% e% g/ S, E$ |: {4 n
@.Destination.NumReservation :=- l X. S! o. L7 \" e5 {0 F9 S
@.Destination.NumReservation + 1;
1 Y6 c& B# o, `7 j/ R end;
1 J# u* ^ L0 Z+ o3 ^* g+ o @.CurrIcon := "drivingHome";
" F' c' J8 ^5 a# G0 a- z @.DrivingHome := true;, r6 P- w) C& d q! r6 U
end;. Q( K+ g, b% {2 s" o* }
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
/ n2 r# n1 Z9 b$ M, m9 L# \/ x/ h0 P part := @.transpOrder;. `& g9 J4 }6 q7 O7 D% \
part.move(@);-- load part
$ K- h: w& n. l5 c, q) t @.CurrIcon := "load";! X( g( P1 V" ~3 m8 y/ D1 e
GlobalDistObj := part.globDestination; M$ d- {8 L' z: d2 U
assignLObj := rgmanager.rgAssignL;
' r1 a% O* k3 c" E row := assignLObj.getRowNo(GlobalDistObj);% x6 W0 Q& O+ ` l" U
if Row = -1 then -- since 70" B6 Y. }+ b3 x( A) i1 D& h
if lan=1 then
6 O) l' M$ t( E promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
% e7 y3 v7 y7 t1 G* V; p to_str("in der Andockstation: \"",?.~.name,"\""));
# K+ v* b! N, s' b' q& o& |+ m else
/ I' o, c6 I) A5 T2 ^$ I- r promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
! c' U* v" E- P to_str("in docking station: \"",?.~.name,"\"")); ' M# h% K. Z3 ?+ X
end;
' T' P$ L' r' z* y else
: A' `( D. M; R% s6 W @.Destination := assignLObj[1,row];
5 C2 x: p- O; C$ V5 k+ C) @) T$ r end;
; k) V" K S. l+ F+ k newDirection(@);: \. R) x* R3 D$ B; ~
@.HasOrder := true;2 R4 b" q4 _; ~) C8 m
end;2 k' y7 v& p6 r' F4 J4 }0 F
end;
0 B2 N4 v' Y, p, r& |6 J$ O( w: V# l' fend; -- of the method4 O) H: e. g! ^6 W9 @1 M# o% S: e
|