/* called by: entrance ctrl of the object 'track') f9 O- c$ I( d5 G' G! l$ t2 ?+ X
*/
8 l _$ h- B9 Yis
1 y! @8 u" D9 v9 m) |3 u part, GlobalDistObj, assignLObj:object;row,Lan:integer;
! t" `" O# u0 }3 B7 |do
9 }; {) R3 i: _4 X J Lan := rootfolder.Internal.Tools.AOLlanguage;
; t- ~# y) i* m9 Z+ O' s if current = @.Destination -- else return
* {8 G% f) p1 M3 I then$ f" w- K" I5 U* H
@.Destination := void;8 r' F7 j* Z- x% S8 _2 }/ Z) r+ |; A
if @.occupied then7 @' u& e+ O; I$ q
part := @.cont;
3 r: Z$ y! g$ O" {, q @.transpOrder := void;8 q+ ^% @! E6 v, l. ?! L" K
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
" Q# t. o+ c6 i7 s ^ @,root.eventcontroller.simTime);
) z) R7 T, n7 o$ M+ n @.HasOrder := false;; }% p" J% q1 A
@.DrivingHome := true;) }4 Z/ R7 f' X1 t
rgManager.tryToStartTransOrder;3 v/ S8 i0 a9 v& p
if @.Destination = void( q% I# u y' d( r2 S8 R$ ~3 V1 e
then -- no transport order for vehicle @) V# f9 j9 _: J' ]" h6 j. Q& B' e
@.Destination :=
/ I( Y: o6 M8 X6 n+ O { rgManager.nearestFreeStation(@,track.~);$ d; \) V( g ] {- i
newDirection(@); $ O5 U0 `4 R+ O' E" {4 X' A/ F
if @.Destination /= void then
" t' h1 O( k1 x) B0 m/ _ @.Destination.NumReservation :=0 q# O `+ f0 Z9 [# V1 O* L* E
@.Destination.NumReservation + 1;
" @: x( f U: \" u/ [$ Z+ p end;
" S: S6 x- U. v+ [0 ` k2 j/ Q @.CurrIcon := "drivingHome";
: }0 `% A" E, ^2 Y& ^- q/ R4 q2 s) U @.DrivingHome := true;9 c3 T& j/ z. P1 _9 ~$ V
end;! x& N+ @; O% | _" _0 F: b* @
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
% f f& e2 R5 Q! Z0 O2 J) I' Y part := @.transpOrder;7 E5 P1 c! {/ ?' U1 ?% G+ a2 S
part.move(@);-- load part/ h- b. P- a6 l. u9 E9 \& T
@.CurrIcon := "load";
3 Z B( f0 K+ I& H/ u/ z6 s GlobalDistObj := part.globDestination;3 c9 h) Z8 X" m5 P3 z/ h' U3 W
assignLObj := rgmanager.rgAssignL;9 ^. \( a" X2 n( b* l7 N( `% m
row := assignLObj.getRowNo(GlobalDistObj);! u0 ]: n8 |+ e
if Row = -1 then -- since 70( |3 p5 g1 K4 c' J4 T
if lan=1 then
6 `) G2 {; T J7 ]5 [; w promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),' _1 m, e, S+ U( R' `5 m2 O# z
to_str("in der Andockstation: \"",?.~.name,"\""));4 L6 u; A; @# I2 f# |/ p
else
; m Z* ^. A1 ` promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
7 o. b$ H# D; X+ |9 O! m' x to_str("in docking station: \"",?.~.name,"\"")); $ d" l+ H: n# T4 U2 c' v' M
end;7 N6 I& ?7 Q! X5 E5 q
else
, Z |) m: ?3 j @.Destination := assignLObj[1,row];* j5 ]; O) c/ B5 L/ M& D
end; 1 z+ u4 Q; ~7 j; i7 l$ w+ T, y I6 C
newDirection(@);
/ R7 S( o" n) R% u$ N4 _: \) ^ @.HasOrder := true;
# w9 L0 e( F$ ~$ i& _ end;
- t. R- ^' [: i4 n( v2 H. U; x end;7 U0 B3 r* N3 r3 { P( B Z0 {
end; -- of the method4 N9 Q) i2 l9 @- F; v. }! W) K* p
|