/* called by: entrance ctrl of the object 'track'
8 i; j. S$ K4 V6 {0 _# u+ w*/
/ M! j2 z$ n0 p) sis
3 P: H- S; P: w8 ~ part, GlobalDistObj, assignLObj:object;row,Lan:integer;- Z8 H7 ?- j/ d: z& `! S
do8 V6 w. s' {$ \# D0 o
Lan := rootfolder.Internal.Tools.AOLlanguage;
8 I% f4 g/ c. k; a$ E* B if current = @.Destination -- else return
2 z/ a9 N1 z0 S5 K then0 A/ }* P3 K' _
@.Destination := void;
$ Q& k1 _5 F3 ~- h Z& B if @.occupied then
, H: I- c! e! M/ v! W) O9 T part := @.cont;
. j. l9 K A! N! V @.transpOrder := void;3 y! \; }! E& y% [
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
- b: I% M+ Y9 ?7 N. _+ ~) R @,root.eventcontroller.simTime);
9 u; @( U* J, q* M5 }: K, _- |; N @.HasOrder := false;0 `& L3 H( s$ n' t
@.DrivingHome := true;$ ]" q2 M5 u! E R% Z/ V; F
rgManager.tryToStartTransOrder;( E- r# k2 T, q4 m6 w" ^* j
if @.Destination = void0 z& V4 o6 x5 L W
then -- no transport order for vehicle @
+ M# H, w3 f( s/ R' U0 [' U6 j& U" q @.Destination :=' B4 b$ b! k1 T |6 V- M
rgManager.nearestFreeStation(@,track.~);; A# Z0 l8 I/ _. G# u+ O) ~! L
newDirection(@);
6 n5 _$ B" d, f' \! p+ X/ A if @.Destination /= void then
( K2 t; q& a. F, C @.Destination.NumReservation :=
- H9 {6 ~- c. |8 Z. b! l, a0 ] @.Destination.NumReservation + 1;# E s) ^. ]% ?% x5 @+ p% |8 S- @
end;# r6 @& V) g/ t
@.CurrIcon := "drivingHome";
! J; [/ W4 U- ^! g @.DrivingHome := true;
7 I" f7 [: }* `2 m1 w- ^ end;
, a$ s+ G9 Y0 g( _5 R) R a4 }4 [ else -- the vehicle @ is empty, both vehicle and part are in the same dock station
- w, P: C1 {) v, W% ~* z part := @.transpOrder;6 m5 b w0 n8 l3 v) f% V$ j! s
part.move(@);-- load part4 X' g% ?+ J( n+ K8 u
@.CurrIcon := "load";
1 Y7 ]% c K9 j% x' P6 Z* Q4 R GlobalDistObj := part.globDestination;% C1 a+ w; m0 |
assignLObj := rgmanager.rgAssignL;
# c3 Y$ S6 b1 M' k row := assignLObj.getRowNo(GlobalDistObj);: h( q* @' ~2 `6 F% l! y3 i. I
if Row = -1 then -- since 70% z* Y3 x4 n' a; J" E4 k) Y
if lan=1 then
/ B* A' r* p7 X8 A; c- f promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
" _% D/ q* R6 `& m; J% q to_str("in der Andockstation: \"",?.~.name,"\""));
6 [1 @2 N0 b) U- Q1 u& `/ r8 u6 s else9 j2 B2 u: B: ~5 S# h% R
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""), L i" c6 @* B4 O0 y- ?5 J' H; ?
to_str("in docking station: \"",?.~.name,"\"")); % k4 c( h, h8 c
end;
) i0 v; M+ R W2 A2 r else
6 Z4 R4 W; @1 e$ {' { @.Destination := assignLObj[1,row];( Q9 H" A4 ?0 j2 O
end;
; H9 e* |7 t9 N newDirection(@);$ U6 |! g! E) [4 U. `9 H; T. I
@.HasOrder := true;7 B# D/ h6 _0 _) N3 J. o
end;
0 J a+ o' V% A3 Z# E end;# }, K: V7 o3 d* s# C
end; -- of the method1 U1 j- b/ u9 l% y
|