/* called by: entrance ctrl of the object 'track'9 R. |: l/ N( ?7 ?8 b6 \0 v/ O0 ?
*/
1 O8 i; o: {8 A! D# Iis
/ }8 E; v7 G) @; g2 \ part, GlobalDistObj, assignLObj:object;row,Lan:integer;
* L4 b8 M" K& s# x% O6 ?do
$ M! o8 ]" F8 I5 | Lan := rootfolder.Internal.Tools.AOLlanguage;
0 |! L- {7 [9 W& C/ h9 x+ T if current = @.Destination -- else return
1 V; |$ k/ J$ f# |( B+ t% t then
* @0 g' C9 L- r6 w6 z2 L e! ? @.Destination := void;
4 y4 c6 f/ I# Z8 \& u if @.occupied then; d! @; K5 `8 l! j2 d+ l. H
part := @.cont;( a; `, {% N6 H% f3 }# a7 E' W
@.transpOrder := void;
* `# F" G g7 V& ]4 ?5 S; ?& B6 O part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,+ l; j! [2 p/ x' C4 j
@,root.eventcontroller.simTime);/ \+ a; ]1 @9 P) ~ F: \7 t
@.HasOrder := false;, A6 Z5 Y3 g. D
@.DrivingHome := true;6 `9 F7 `$ n# D4 i+ }/ f0 z
rgManager.tryToStartTransOrder;
* A0 x5 j" u. h6 h a4 |; N, E3 P if @.Destination = void4 d S8 Z9 M ]6 o+ ?
then -- no transport order for vehicle @
' N( t6 X7 ?% G) E2 p# F3 k8 C1 W& c @.Destination :=
5 S3 T1 x3 Q$ j rgManager.nearestFreeStation(@,track.~);
4 ]" i2 a+ j6 Q) K$ O newDirection(@); . E L9 x4 c9 R4 ~* P8 K3 L* J5 ~
if @.Destination /= void then) \+ ?9 B( N5 `" X
@.Destination.NumReservation :=# E; c L1 Z9 a0 `7 ^
@.Destination.NumReservation + 1;# H1 u! y f# _* x
end;
" s0 {7 T$ s/ j; r @.CurrIcon := "drivingHome";
' v) u7 Q& \1 v7 |! G" q @.DrivingHome := true;
% x$ P C6 L" Y- o end;
( z* @: N p" C: n else -- the vehicle @ is empty, both vehicle and part are in the same dock station( w6 O: C+ v" J: X- N
part := @.transpOrder;4 u6 E* O; w! [) y$ ]
part.move(@);-- load part
# `6 R c6 V! h8 w1 |/ S @.CurrIcon := "load";/ A) d ?$ ~- G% V& M; H8 o
GlobalDistObj := part.globDestination;9 E9 S6 m+ J3 Z3 ^, f- ?/ [; T. A5 f
assignLObj := rgmanager.rgAssignL;
F* b9 N H% H# G1 M$ V/ m+ L, w row := assignLObj.getRowNo(GlobalDistObj);
6 t) g- y4 j2 d' n0 Z+ g9 v if Row = -1 then -- since 70
3 x2 I( G: h; d2 L if lan=1 then
* s( V" q' U+ i" j6 H# \8 Y; c promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
M2 p$ D+ a- e! S# _ to_str("in der Andockstation: \"",?.~.name,"\""));
: M" }# Y, B# S# X) U6 o$ K else$ R- O! X% J' v; U3 m" N: w
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),( H5 W7 ]! @$ z! s! T2 i4 X
to_str("in docking station: \"",?.~.name,"\""));
; _; L1 @4 d% m" ] p* G' \& O1 l end;$ t( q# C7 ? R1 M
else: y# A, s6 x1 y( c. U, ]* |- [ G
@.Destination := assignLObj[1,row];
7 J6 _# U5 j% [$ _9 T7 _9 W, p end; . Q$ g+ |& }7 L% v
newDirection(@);6 H, R6 P$ b3 R" n
@.HasOrder := true;5 ]4 `# X3 M0 Q0 {+ g2 T
end;3 p4 [) g) z4 x$ C9 {5 D
end;- w* L+ {0 P1 @
end; -- of the method
8 A- h; F) H/ r8 l% D( I |