/* called by: entrance ctrl of the object 'track'0 v# H5 |0 U$ ?0 a7 ~! g
*/5 s* l+ o8 m. k- ], f; u) f
is9 r9 d6 D% S8 U) I
part, GlobalDistObj, assignLObj:object;row,Lan:integer;/ z1 ]1 K9 Y# Y, K5 k
do# Q7 }6 g6 O( o( g6 O
Lan := rootfolder.Internal.Tools.AOLlanguage;6 p. j3 d; }; O1 d
if current = @.Destination -- else return( B, i$ `3 Q6 {7 H3 E8 \1 E2 ]! v
then$ w: X \6 M% R4 L. Z6 m1 G; D0 E
@.Destination := void;# j. @0 ^7 p. ?* m5 g' K9 h0 u
if @.occupied then
' }3 ]- k( S6 \, g; I! K( q! y part := @.cont;! L9 l6 R. f" L$ w( b* I
@.transpOrder := void;( c( Q6 i2 Z+ X# s9 e, j8 f) ~
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,: ^1 k; S% [/ a5 J
@,root.eventcontroller.simTime);! q/ F+ K( U8 m9 Y2 C
@.HasOrder := false;
# B8 N0 _, L n" X @.DrivingHome := true;
$ R. G' m! }( f( o rgManager.tryToStartTransOrder;
0 b$ a, t* }- X+ X if @.Destination = void# x( S2 S# x9 g( m: t
then -- no transport order for vehicle @
! j: E8 V; Y! y7 I/ A @.Destination :=
) X- r/ ?- t- V) x: V rgManager.nearestFreeStation(@,track.~);
. ]0 _, ~) `& G3 { newDirection(@);
! [2 \! q+ X* d. C if @.Destination /= void then
$ ]- I" B& ?5 F. P& J5 ~ B4 z- C @.Destination.NumReservation :=
+ N8 A" S0 G, ^' C7 ]% g$ S3 w @.Destination.NumReservation + 1;% l3 D# g I$ O8 }" R& M
end;) o3 h R% y8 k" L z: U% r, h
@.CurrIcon := "drivingHome";) R0 b. K3 _' x; f6 f
@.DrivingHome := true;( g0 @7 q& g# O- e2 w4 A
end;# N3 C" ~7 V) B2 Y v+ R6 R( V
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
# O# {" \9 a: s) B2 a7 y* Q: s* G part := @.transpOrder;0 p" G$ h" u2 |$ O" ]/ T9 _( K
part.move(@);-- load part. h8 c2 M* S& v2 d9 C+ v
@.CurrIcon := "load";9 w: ^7 R% ?/ J, Y) _, t) M7 ]( p
GlobalDistObj := part.globDestination;
0 k2 c; u( ] l1 q. u' Q+ d assignLObj := rgmanager.rgAssignL;8 N$ N+ w8 ~. m5 H R1 U. A
row := assignLObj.getRowNo(GlobalDistObj);4 y$ T- R8 m2 |
if Row = -1 then -- since 70
4 ]# h: @+ h: `: p if lan=1 then& R9 C" j# W. R. L" }. ?
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\"")," u6 j! d2 s/ [ q$ L5 |7 s9 E
to_str("in der Andockstation: \"",?.~.name,"\""));% R1 j+ E% { F
else
0 x* W9 y+ Z0 h$ ?- d6 C7 | promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),( b( d& _ C0 j# z
to_str("in docking station: \"",?.~.name,"\""));
8 f9 \: [7 o! I2 l0 T$ t end;# ` N' X; Q& E4 M
else* h7 q* T6 @# \ Z3 X3 L8 q
@.Destination := assignLObj[1,row];
: y% {" z* i @, T* Y; W end;
; L- H. x& p K newDirection(@);
) S, {* s/ j1 Y0 H9 o @.HasOrder := true;
0 R. B" B# j. o0 g end;/ m. M2 x5 C8 ]" B) X/ b
end;7 Z+ l$ M5 X' G# ` p
end; -- of the method4 |: U9 a; S. j. K# Y- _ x
|