/* called by: entrance ctrl of the object 'track'; Z/ d, y5 ~5 }' K. c1 Q( {& s! Y
*/
/ P$ u7 p( V1 T# pis7 l5 X- ]' [- @! [3 H+ M# X
part, GlobalDistObj, assignLObj:object;row,Lan:integer;3 {3 `: ^8 Q! s! j. W" a
do
. M$ e4 f9 @: p: _6 L Lan := rootfolder.Internal.Tools.AOLlanguage;9 q" x% w0 v6 p0 H$ Y7 |8 O- Q
if current = @.Destination -- else return: ]8 \4 N* A5 F5 a( i7 f3 D; l9 [
then) p# J/ b3 v7 `
@.Destination := void;/ c0 P" w7 q3 m6 d# r
if @.occupied then
$ f3 }0 H8 l: L# n( d part := @.cont;
% g! b9 h6 V1 g& g5 @9 }7 H- C @.transpOrder := void;
+ M- A1 l3 ^0 U# Y0 r% ]/ e% W( E part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,8 W. M. d0 H6 ~$ C8 a8 a
@,root.eventcontroller.simTime); A# q4 g, w7 Q
@.HasOrder := false;
& K5 r, z5 f. v/ M" n1 e @.DrivingHome := true;9 _: U' _% v+ R* r0 G# \6 D+ M5 \
rgManager.tryToStartTransOrder;
; p: L8 f6 K& l8 k& [ if @.Destination = void
$ l; k x/ v$ g' S" U" x then -- no transport order for vehicle @
6 q) P& Z' v5 {) ^% S4 Q6 Z @.Destination :=
9 V1 l' w6 h- i rgManager.nearestFreeStation(@,track.~);& D7 V9 Y$ j7 a8 [
newDirection(@);
4 P3 O7 v1 h8 l if @.Destination /= void then
' u/ e- m3 @- X! B0 h @.Destination.NumReservation :=
2 [- [ o: F0 m: Q @.Destination.NumReservation + 1;
# H. S6 ] p' F end;* x8 Y; R3 J$ p
@.CurrIcon := "drivingHome";
9 a$ x6 t, H3 Q1 p) U @.DrivingHome := true;5 b" l- |! ?/ k( c
end;( _) F/ k# v' ]5 y/ W
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
: F, G, K( T6 ^, Y* g6 a) q part := @.transpOrder;( b3 `1 @3 ]# { a
part.move(@);-- load part
1 q7 v; Z5 y- ^$ i) y @.CurrIcon := "load";, O/ i4 h* S! t
GlobalDistObj := part.globDestination;: K! e' H. [0 Z2 v) [: x5 N
assignLObj := rgmanager.rgAssignL;/ K6 o; O) k9 ~' n' H
row := assignLObj.getRowNo(GlobalDistObj);. T9 D4 a5 i# X, k g7 R
if Row = -1 then -- since 707 E! ~; |; `2 n' C# n
if lan=1 then
* f" C- Z4 E. z& _: O1 y% e2 J0 E promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),. F" y: w' F3 e/ `. K, o
to_str("in der Andockstation: \"",?.~.name,"\""));
- K: e' [# g) A" S5 K else6 |, Y/ m4 G H L2 n6 W
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),% }5 t& s8 \# \; g3 g( W% [+ g" ]* a; W
to_str("in docking station: \"",?.~.name,"\""));
) _- L6 X, S6 F b end;
; @( Q& l1 b4 U, z6 J* g3 U else
0 C% O5 @0 ?- y: B: t @.Destination := assignLObj[1,row];% o% ?" B* @- y& ^0 M5 h
end; 2 }% z1 }* P1 C: ~ {
newDirection(@);' S4 u# Y5 {. t" y4 I3 X3 D
@.HasOrder := true;- N6 t- s" N2 S: D: t/ p# }4 D' g
end;/ L4 U7 T/ e* {. K4 }7 F* O0 m
end;! w% }; F5 @# R* ~/ ?$ b- Z
end; -- of the method
% D8 c4 t) M6 |* H+ E5 ?2 e |