/* called by: entrance ctrl of the object 'track'
% H) Z# Y) F& c+ w- s) s*/
: L% L! R7 l$ G1 Wis) ~9 ~/ p& m2 i+ n; V& z& Z/ d+ `
part, GlobalDistObj, assignLObj:object;row,Lan:integer;5 Q# X2 j0 `; K2 }7 k& p7 T
do- d$ x5 l5 e8 f- R9 [( L- P
Lan := rootfolder.Internal.Tools.AOLlanguage;# D5 u* C1 f0 e, Q9 P$ H- S
if current = @.Destination -- else return7 L6 @% s! s) p I
then
. G9 \" f! l* q+ R+ p0 b @.Destination := void;8 U+ B) a0 ?2 v7 U3 U
if @.occupied then0 [! y/ Z) D7 Y
part := @.cont;
2 q; {) Q+ U- j/ j @.transpOrder := void;
/ s! i% i' V7 X7 m; |- R part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
/ ?& F; `, w" t! ^' p @,root.eventcontroller.simTime);
1 t( O9 _9 n' ]0 r% ?, C/ ^ @.HasOrder := false;" j8 o3 ^! Z# x5 ~. ~( B! I
@.DrivingHome := true;
( W8 m7 i7 m5 |6 p. c. w% Z2 }) | rgManager.tryToStartTransOrder;2 {/ F* i% ^! n$ o# B8 x
if @.Destination = void- K7 N# o m& M% S
then -- no transport order for vehicle @, @2 N3 Y9 A5 u
@.Destination :=
( h1 b F6 i; \) t rgManager.nearestFreeStation(@,track.~);% n1 c* v `4 U
newDirection(@);
; r0 F% Q4 D3 G. @, L0 c3 U if @.Destination /= void then/ B2 a$ O; {4 q& S# K
@.Destination.NumReservation :=
2 B' i0 m# W5 m1 P5 z) G& E( H @.Destination.NumReservation + 1;7 X: c- d/ W( J
end;% `2 j( X( V( x3 H, N$ g
@.CurrIcon := "drivingHome";
$ T4 h, w. g0 S* R @.DrivingHome := true;
% @' d% o8 N2 Z end;
+ ]! C" v$ b1 X" b4 f# ~, \; E else -- the vehicle @ is empty, both vehicle and part are in the same dock station
+ L9 |% Y1 T: F O& T" v part := @.transpOrder;
# _: T3 Q: Z1 Q8 V! N' m# J9 ~ T: Z part.move(@);-- load part5 O2 r J2 d) `2 M5 X+ m4 E4 O+ k
@.CurrIcon := "load";! v1 {* @# C7 c1 o: [
GlobalDistObj := part.globDestination;7 ~5 w" {' F# w; q# e
assignLObj := rgmanager.rgAssignL;6 B8 e, ` u+ P9 d8 J/ B
row := assignLObj.getRowNo(GlobalDistObj);# M1 q. x0 |2 z
if Row = -1 then -- since 70
3 i: b' X7 L% g9 H2 L if lan=1 then
) D0 ?$ W# r5 y3 s0 q$ Z7 N promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
4 B+ _' `2 |/ _; v: V' Q. i8 U4 X to_str("in der Andockstation: \"",?.~.name,"\""));
+ ]* g: P& T0 R$ G( s" n+ \' C: Z5 ` else
3 W7 j5 e: P4 g: H( o2 p promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
* C5 }1 K, K! O2 B5 e* d6 \8 I to_str("in docking station: \"",?.~.name,"\"")); - S* |: j1 z* T; ] B$ a& I, a
end;! H8 {0 z$ D' \9 c& s
else! F7 y9 U( f4 S
@.Destination := assignLObj[1,row];8 Y) a+ \$ {/ x6 I4 b! i' ?6 V
end;
/ I; `# P7 t5 z8 F3 M) z0 s newDirection(@);
6 Y' _6 W" | `& T8 T( l& l. c @.HasOrder := true;; K8 k" `, A/ |' ]% n. x
end;
+ D; v7 [0 a m0 n8 U' Z end;
) m* H& v2 S9 P" d; Kend; -- of the method
+ c$ x, B3 }) p |