/* called by: entrance ctrl of the object 'track'9 p, N6 F/ W, ~& Q8 ^8 z* E2 E6 J
*/" M; G5 h/ Y Q* L1 @) w) M
is
" p- S0 P% F5 l6 p) I! r3 { part, GlobalDistObj, assignLObj:object;row,Lan:integer;
* X. ?/ D! z2 y9 Odo
7 U3 L# M* F. x5 O Lan := rootfolder.Internal.Tools.AOLlanguage;3 c' f/ Q* u" ~
if current = @.Destination -- else return
* N& N0 s) Y3 ~/ ^: r then
9 Z" ^/ L9 N4 P1 G- c1 [ | @.Destination := void;
5 z' n6 A' e+ b! A# N' _3 ^3 j; t* d if @.occupied then
( X6 S! W% n- v) T part := @.cont;, P* U; L7 c0 y0 ~& d
@.transpOrder := void; ~' \, m- j- ]
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
" ]% ^/ L( u) ~% q! w0 I6 J' Z- V @,root.eventcontroller.simTime);
& A: K( H9 B. l, p @.HasOrder := false;0 p) a- E( [4 Y
@.DrivingHome := true;9 T& W: B4 r1 G4 C4 Q' H, z
rgManager.tryToStartTransOrder;4 g( Z) H& U& t& [
if @.Destination = void
, j# e2 d E, D1 `6 [5 W1 F) K& h } then -- no transport order for vehicle @
+ `$ ?( i' s5 i/ q, x. u5 \9 O8 r @.Destination :=: e3 Y" Z% s ~
rgManager.nearestFreeStation(@,track.~);
+ h3 d7 j0 T" h' c newDirection(@);
3 {4 n8 l( v# t$ x) W if @.Destination /= void then$ b/ v( Z5 ^6 i- C! G
@.Destination.NumReservation :=
! _' A4 j: a/ K6 A( \ @.Destination.NumReservation + 1;
% c7 I1 Y" d' r2 G' x' A end;
- d1 d5 c; P8 Z @.CurrIcon := "drivingHome";. J! |. \ `1 e4 E2 p8 t
@.DrivingHome := true;
- C6 s& ^6 b0 g$ H5 v* ` end;
0 b$ f& l' S# f# U+ t! h) L4 P: D, ~4 E else -- the vehicle @ is empty, both vehicle and part are in the same dock station
$ b" h0 u5 L, p$ \ v7 t) F }8 V' }/ {/ E part := @.transpOrder;
$ A* N" p3 g6 D7 t- b part.move(@);-- load part
/ }) V3 Q1 i! }# v2 k/ [, n% U" ?; C @.CurrIcon := "load";
: X& b6 R) M3 J: E E: n GlobalDistObj := part.globDestination;- D2 I+ v5 B6 M0 `
assignLObj := rgmanager.rgAssignL;
- h `) [9 H+ d$ ~! Y5 m row := assignLObj.getRowNo(GlobalDistObj);) ~( ^' p7 a1 E/ P: _; ?
if Row = -1 then -- since 702 H4 k. w" a0 F+ n5 r+ i ]/ v
if lan=1 then6 M% R5 _8 m' Z. Q; @6 f- k
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),( f9 \% X7 ^! T/ D v, e
to_str("in der Andockstation: \"",?.~.name,"\""));
# u# j! a8 e+ y) a% H6 H7 \ else
+ B. y U4 E: v( j7 ?( g8 y$ P promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),( [- \9 w' |- y/ t R7 @5 I/ }
to_str("in docking station: \"",?.~.name,"\""));
) p$ }% c% F$ `, z. a7 B end;- p9 N$ U& w: [
else6 F2 i) l0 Z, u. t4 v# B/ D: t
@.Destination := assignLObj[1,row];% g2 h9 j9 }; d, g
end;
% ^$ M" _; L5 {1 l& ^ newDirection(@);$ f6 L. o2 P5 V6 v, V
@.HasOrder := true;
- d0 M0 Q- Z! _6 X5 P0 h _/ g end;
. _! Z! @$ b: `4 t end;
7 k+ r& t1 D# w2 o+ X9 }: cend; -- of the method
) ?- f8 P0 p( u3 [2 V |