/* called by: entrance ctrl of the object 'track'# U9 \5 }9 [) J- }4 }
*/
4 o8 ^0 ]% F8 Z3 K; @. Q+ ?. V* }7 Wis
3 }/ T7 U% V7 {5 { part, GlobalDistObj, assignLObj:object;row,Lan:integer;
) O2 S# R6 g3 z2 x3 V8 R% o6 ido' r6 E$ H' q) ~. S& _
Lan := rootfolder.Internal.Tools.AOLlanguage;
' C; \/ z$ e7 t3 R( q! w; S/ P/ C if current = @.Destination -- else return
' F* g- }. E" t4 f( m then/ c( m6 n1 _. y7 J7 \
@.Destination := void;! ^- }; ~- J. Z6 G( m
if @.occupied then* \' g# u6 j$ g! Q
part := @.cont;- [& `5 D/ i8 v4 I4 S
@.transpOrder := void;
. R" Z% t) O1 v/ ]0 P part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
' |9 o5 C+ L/ {4 B0 h @,root.eventcontroller.simTime);# E- U+ C: b" x# @; u
@.HasOrder := false;
4 D2 b& M" b& n: E3 s$ _ @.DrivingHome := true;$ }1 \8 C9 p5 ` p; T7 c
rgManager.tryToStartTransOrder;
: |3 x& P% Y% D7 e8 d0 D# f- y if @.Destination = void
% }1 ` _- m* B9 ^7 ] then -- no transport order for vehicle @
* C: ~. D+ D8 B* \9 ] @.Destination :=
- E" r/ _' {% P7 g7 w# J rgManager.nearestFreeStation(@,track.~);% L) `* v# ?# g$ V
newDirection(@); & T7 M3 r) O4 u7 |
if @.Destination /= void then+ i3 H+ H. s( m Y
@.Destination.NumReservation :=; @0 u @5 O% h1 e* k' O
@.Destination.NumReservation + 1;
! \( f* i1 W4 T6 T9 y$ i/ F3 Z. x& H end;
/ X4 D; D$ z: L2 g+ h i9 G) \" \# G3 g @.CurrIcon := "drivingHome";/ L. u2 P! \1 S# @ |9 Y
@.DrivingHome := true; z6 f8 u* z9 H/ {1 j; a
end;5 ^. F( e% L$ d6 g* C0 _
else -- the vehicle @ is empty, both vehicle and part are in the same dock station6 G7 i2 H2 i6 u# e
part := @.transpOrder;5 a! k" Q2 Y5 Y( T; Z* r5 h
part.move(@);-- load part# l& g' p. W! W. y
@.CurrIcon := "load";
! _( m; N" l5 B- F6 p% v GlobalDistObj := part.globDestination;
; i Z) S+ G+ W/ Y6 [ assignLObj := rgmanager.rgAssignL;
1 c! F: r1 z. ~' { row := assignLObj.getRowNo(GlobalDistObj);
- D }! _$ @# N" z if Row = -1 then -- since 70
5 |% s, r+ [4 I- y" L if lan=1 then
, ?0 w: U3 d8 C* O. s$ I promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
0 o3 B% z9 S6 ?8 Q5 R to_str("in der Andockstation: \"",?.~.name,"\""));
2 u1 v) w+ M' O3 v6 Y7 H" k2 U else3 I3 n. i0 {4 k' `4 y! u4 [
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),. @: k( j L6 q. \, Z8 t3 R7 a8 b) s
to_str("in docking station: \"",?.~.name,"\""));
8 c) J4 M- u3 D% @ end;
0 b$ M. H. w1 |% { else/ g- t( L' X+ I: }+ Y' O
@.Destination := assignLObj[1,row];
% }' j- f2 x N N: { end; 9 v- P0 I: \$ ]% U2 R2 n
newDirection(@);' b5 ^1 n, N, P$ v- f( F: D
@.HasOrder := true;, q- h, z t* c4 a
end;7 X3 a- S+ `# Z9 }5 j0 z6 T
end;
) O) _3 k4 h" V$ v) i+ \: S) Xend; -- of the method/ o) x' [7 ?6 Y
|