/* called by: entrance ctrl of the object 'track'
7 I2 x2 E- \- ~3 Y*/
% U: |! ~# H3 T7 Iis
: E7 Y6 N+ [) ?. ^4 G6 [9 b part, GlobalDistObj, assignLObj:object;row,Lan:integer;0 b7 r7 { l3 w* h
do
% r0 d5 u5 J' ~) E( S5 j+ U5 y Lan := rootfolder.Internal.Tools.AOLlanguage; o* L s! |; Q* Q. h
if current = @.Destination -- else return
8 H4 A& F$ D8 K" X' e" O, l9 \: v then3 v2 \3 Q t$ ]" w# t) o
@.Destination := void;& Y, O( I# Z' }, I3 p% @/ J7 J
if @.occupied then
0 u3 |8 V2 J6 d, X part := @.cont;
7 t1 m' Y1 Z+ R/ {+ D5 v @.transpOrder := void;6 ~2 b3 |* |1 G) O6 `
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
) J* d' g# l. A, r8 e @,root.eventcontroller.simTime);- `7 ^: A2 r3 S$ B6 J7 }, _0 F9 m
@.HasOrder := false;
% b/ g |8 |) g, q @.DrivingHome := true;5 M0 u* S7 B4 J
rgManager.tryToStartTransOrder;+ E# y8 g6 g; T8 {
if @.Destination = void$ o; r/ H. _$ C
then -- no transport order for vehicle @
6 u0 s! o$ O4 X0 |8 e8 f5 b9 J5 y @.Destination :=( `: d. V) @2 }2 M* T
rgManager.nearestFreeStation(@,track.~);" f) l: q' _! y# S' d, L' t
newDirection(@);
9 |% I9 b- }, G$ N; T! [ k if @.Destination /= void then% ?2 D% l: U: s1 C
@.Destination.NumReservation :=: N8 J s }" T$ J
@.Destination.NumReservation + 1; e8 b" |* J( M
end;3 \& V5 C+ v5 c9 b: j4 q
@.CurrIcon := "drivingHome";
( _' Y( {$ _& e- U+ H/ T& J5 Z1 n @.DrivingHome := true;; c# A6 P" J2 m( a/ s; h; b
end;5 J8 D& `* t$ \' U8 |: u$ v' C
else -- the vehicle @ is empty, both vehicle and part are in the same dock station3 t" x# ^' V5 F, ?
part := @.transpOrder;: Q1 R% Q4 \. p: X# d' I/ G
part.move(@);-- load part
: k9 p/ d7 R$ S4 O* n/ V: T @.CurrIcon := "load"; L. G; c5 k% o* n. {% b
GlobalDistObj := part.globDestination;
' j/ J7 K) e* r h* a assignLObj := rgmanager.rgAssignL;9 y& [, Z4 I7 W! G- i* \" X' @
row := assignLObj.getRowNo(GlobalDistObj);
& {: n+ o8 K) i0 h1 X6 m' `4 @( n if Row = -1 then -- since 70
/ z$ G6 k% G, X+ o" | if lan=1 then
- z9 `$ }8 P% k7 d2 I promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
& j: J- Z( r" ~: O to_str("in der Andockstation: \"",?.~.name,"\""));
* E8 }* L$ u7 m# u; o else, \+ j* d' b5 ?' I
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),+ v4 u. j9 g+ S
to_str("in docking station: \"",?.~.name,"\""));
# t: d0 j2 F- o* Q6 | end;0 H6 T5 z" K5 ]
else5 G, `2 ?5 w( W
@.Destination := assignLObj[1,row];
) A7 f" P: d( g5 _, K+ f7 C3 c. R. y( Y end; 9 Y+ \ t1 C- w o* K3 p; e# x
newDirection(@);) s, o4 M+ b4 M$ ]) Z
@.HasOrder := true; M/ \6 R7 r9 ]
end;
! d, y R4 @3 y: h8 ~1 C1 m% a. [ end;
2 L S& j) ^* {8 j4 qend; -- of the method: t/ g6 U3 V3 g. Y
|