/* called by: entrance ctrl of the object 'track'! \. l* D% ~ Y: J
*/
! A/ N% {7 S* i* }0 c, G% d& qis* Y8 d) U7 { ]# L7 U' V, z
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
+ h% a4 ?. Y' X5 xdo4 u$ C; j8 z2 ^) O- m1 K
Lan := rootfolder.Internal.Tools.AOLlanguage;
! o: Q9 F/ M/ E9 r0 b& H if current = @.Destination -- else return, d5 u5 G$ Z1 n# b, W, B4 Q4 ^
then+ d K8 W x+ P/ U
@.Destination := void;
+ u% }3 w/ P' S if @.occupied then; J" R# o5 A0 z# }
part := @.cont;- T4 a3 e) @# H( H' Y( b% y
@.transpOrder := void;
- e' J L5 E" O) u8 |. q part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
7 b9 @6 ^5 p0 s1 D7 B8 L @,root.eventcontroller.simTime);& T% O% @/ a2 |- b
@.HasOrder := false;+ m9 t# i& Y+ Z/ l+ j% T" q( R
@.DrivingHome := true;& q, S, p" u; O4 r& H! {8 s5 u# f" n
rgManager.tryToStartTransOrder;
9 C0 w1 G* ^6 u4 R' g8 X if @.Destination = void
" x/ `9 S9 n+ o V" L k then -- no transport order for vehicle @
" K k7 [9 A4 j0 m4 k$ Z3 Q9 G4 Q9 D @.Destination :=' Y/ v$ w$ l8 E% {& D1 S; _
rgManager.nearestFreeStation(@,track.~);7 c3 a5 y/ e$ t: y
newDirection(@);
+ S t! [3 K& y( ]: [ if @.Destination /= void then
+ R$ `' C/ X3 | @.Destination.NumReservation := t1 A! l8 l! P2 N2 X: F, t' l: ?
@.Destination.NumReservation + 1;: j) C; _7 r3 H" @; T% w
end; d, j/ _6 w! P2 w! ~
@.CurrIcon := "drivingHome";# w* w+ I! ~' q# H W' ?: l4 c# _
@.DrivingHome := true;) H. C1 C+ X* j2 y" p6 j. l- o! U
end;) g" l6 v5 W+ k; c2 F
else -- the vehicle @ is empty, both vehicle and part are in the same dock station6 t4 z+ J, x d6 j: {$ j% \, h; J
part := @.transpOrder;& U* a! ^# U+ Y( l0 P8 n
part.move(@);-- load part
7 a3 ^" D. j/ {/ x' J7 [ @.CurrIcon := "load";8 y' j$ ~" R6 p; v: ^3 S
GlobalDistObj := part.globDestination;
& X" H- m0 l3 h# ] assignLObj := rgmanager.rgAssignL;
6 x' {: _- H6 i2 v1 v% g row := assignLObj.getRowNo(GlobalDistObj);" @1 s; ]! ~ D J( Y% @9 H( s
if Row = -1 then -- since 70
5 b1 W& f a4 P if lan=1 then
+ P$ f) q4 R1 [; c+ M* ]8 i. U promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),5 r; E) ^8 C- t0 a8 `* ^/ p8 C `
to_str("in der Andockstation: \"",?.~.name,"\""));# {; p7 Y, V( `% [* u$ Q, ^
else
, w. _- J6 A$ J) G promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
; |' M! z H, W; s/ F to_str("in docking station: \"",?.~.name,"\"")); ( w' {2 F! ?8 n/ t7 R
end;8 f, T# {7 a. U+ W5 }6 N
else
6 W0 Z- F4 @. A8 S9 v$ _6 z; ? @.Destination := assignLObj[1,row];. T( [3 f5 C# \6 f) |6 ~3 I1 P8 R
end; 2 H1 Z" W0 }# r* `
newDirection(@);
0 b, B! Z/ l9 R/ f6 I+ N U1 b# } @.HasOrder := true;
7 c) |6 _; h1 [/ Y( S& q! c! a end;
' N* J# |3 A& S7 `- i! i4 T( Q end;
6 @: O, d2 @2 a n5 D$ t# gend; -- of the method% ^. C5 V; e5 G; f4 y: p' L
|