/* called by: entrance ctrl of the object 'track'
5 h; N7 X8 e* E0 s: a. d" R*/+ P( q8 G9 E |! Q9 s- q
is( M2 r6 g6 a, D6 r% p
part, GlobalDistObj, assignLObj:object;row,Lan:integer;9 E3 j0 f4 J3 h i/ N/ [4 ^
do
3 h/ c9 r3 {2 d% l0 {% Q, @ Lan := rootfolder.Internal.Tools.AOLlanguage;
, C8 M: D: Q9 C: U" V$ S3 } if current = @.Destination -- else return
" p" X; M Y( \; h+ }7 ^% A then
: @/ S- h; y( y @.Destination := void;
3 `: H( \* d% r if @.occupied then
1 K9 g2 L" M# a) W part := @.cont;
; @$ ~1 q. F" [% m' K' \ P @.transpOrder := void;
) @2 I9 a/ u8 b5 V1 E- [1 e+ m part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1, s4 r- u4 y/ n/ @1 z" u% T& o. [
@,root.eventcontroller.simTime);4 X# j0 O, u4 q- t$ ^
@.HasOrder := false;
% F4 a' D' y9 J7 v: W3 H( H+ r* S @.DrivingHome := true;
* B) y v2 I% q! z) x$ D rgManager.tryToStartTransOrder;
7 C" s- O: s6 M5 L$ @4 i( }( t' s6 _ if @.Destination = void. w% y, I1 k! b, p
then -- no transport order for vehicle @
* \7 C5 C6 D" j5 ]# s @.Destination :=. F5 @; A) w$ o# R/ ]! n
rgManager.nearestFreeStation(@,track.~);
' a5 @+ j* i7 a newDirection(@);
' I) s' }* p2 h; N$ f3 a if @.Destination /= void then
& e& Q) ~( N4 B+ V3 t0 _' j/ q @.Destination.NumReservation :=, l, S U5 S6 [
@.Destination.NumReservation + 1;
' _' u7 P2 o, q6 K7 {9 j end; n- l. v9 T6 l+ e0 `
@.CurrIcon := "drivingHome";
0 t4 v1 y/ v+ Y/ t7 I6 ` @.DrivingHome := true;" K% |: q) X* M- d
end;: j# R8 W6 {3 M! U
else -- the vehicle @ is empty, both vehicle and part are in the same dock station/ \1 H$ J) ]# `6 j4 k" ^0 Y7 H
part := @.transpOrder;
+ c' t) ]* v" y part.move(@);-- load part
6 Q/ K7 {* {- o& ?1 r0 g; U" \ g @.CurrIcon := "load";1 e$ B4 x6 n4 B1 A1 z" }
GlobalDistObj := part.globDestination;
( F. e. y; g6 F4 p/ Z4 O assignLObj := rgmanager.rgAssignL;6 m: v8 K, X2 n: D/ J* r& S
row := assignLObj.getRowNo(GlobalDistObj);/ Y0 S2 R1 B, I# V2 l9 V
if Row = -1 then -- since 702 h% c0 C& f: }9 S$ W8 J' u+ ?
if lan=1 then
7 _+ @4 P9 l% e$ y: d# m promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),* e0 I3 T; \# s% ~
to_str("in der Andockstation: \"",?.~.name,"\""));2 _% @2 R- `( @0 U1 g! J
else' i6 }4 N* A$ @+ L' u# ^
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),; z) ^8 g& O, `& n/ @
to_str("in docking station: \"",?.~.name,"\""));
# @2 {/ T# L; U6 J* C# `7 ~ end;; c" g) D8 N' G, @
else
% i, B4 ^% Q8 m( v1 j @.Destination := assignLObj[1,row];
6 `2 A5 \7 c8 y/ \0 P end;
5 ?) M% Z0 N6 B newDirection(@);
( t' Y( C% @) A& ^* w& `3 e* V# x @.HasOrder := true;
. H& v% |2 l+ N# [! f3 Z: S" @ end;6 N5 q# x. K3 H; Y, F& X9 Z
end;
; u# o$ P c1 \- _1 Oend; -- of the method
: K/ X4 e% Q& r; S |