/* called by: entrance ctrl of the object 'track'
4 I3 ~; b2 h8 \: D*/
. _& g- d* T) u% V( kis
( E5 X( @! P3 c' ] E. N5 y part, GlobalDistObj, assignLObj:object;row,Lan:integer;
1 ^; a9 e; n+ I6 bdo
; h* t! |( s* [7 e6 c- T Lan := rootfolder.Internal.Tools.AOLlanguage;6 l( N5 m8 R* p8 |9 b# p1 P1 j
if current = @.Destination -- else return X- x) u3 ]0 C2 E/ R
then
0 [# ?% N1 i$ L @.Destination := void;" l% {4 g* _( C4 Q" H4 L: v
if @.occupied then9 A% t- o" q& X" Z1 H* i L
part := @.cont;. Z5 U4 q) ]6 j4 o. @0 }
@.transpOrder := void;
! F7 N. l3 k* i; E1 F, o \ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
0 `2 C$ T! i" m- T: c @,root.eventcontroller.simTime);" `$ I, o4 A; P1 \/ n+ @" l
@.HasOrder := false;
4 G, u9 D( h8 O* K @.DrivingHome := true;+ W' f5 _9 A' v& T
rgManager.tryToStartTransOrder;
$ \% C- `0 W" ^3 B( u, y if @.Destination = void3 C/ K9 H' N) K0 G, O3 _' s2 Q
then -- no transport order for vehicle @
: u( p* w5 W: s @.Destination :=
$ |4 B% w1 K" K/ H rgManager.nearestFreeStation(@,track.~);) @( e! d B+ L! W* h! i
newDirection(@); " P0 s4 G7 D2 T& \
if @.Destination /= void then
0 ]6 o3 a8 y, U) B5 \) b @.Destination.NumReservation :=
/ z0 F: X* [4 B; \# O6 W @.Destination.NumReservation + 1;
% N: b$ F" [) Q, Q" P end;- @# I. X& ~0 N5 K- F1 }1 }" _
@.CurrIcon := "drivingHome";0 [5 |, K0 @1 J9 |% D
@.DrivingHome := true;1 K* A+ ^/ F, n p+ i' f6 v
end;
, h9 D% c6 |5 f" R5 @ else -- the vehicle @ is empty, both vehicle and part are in the same dock station
% L; s5 {6 ]# i) s N6 b part := @.transpOrder;3 ?, e' [" k2 I% u; d5 I7 g
part.move(@);-- load part+ y2 i0 S, z7 ] y5 y- A- y, q. Z
@.CurrIcon := "load";4 J% T9 i. z+ p: k
GlobalDistObj := part.globDestination;
# W9 n+ O/ ?5 \$ [) |* H' f assignLObj := rgmanager.rgAssignL;
2 a" G+ c- ?, z7 p, } row := assignLObj.getRowNo(GlobalDistObj);
. ^ Y9 Y0 a' f3 d1 F7 j; u if Row = -1 then -- since 70
7 ?/ }7 H0 K7 I1 R, }! Q S' t if lan=1 then
; l! ]8 b+ w3 M" V5 N! I+ ]9 | promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
: ^& ]/ q# f5 d3 ?5 A to_str("in der Andockstation: \"",?.~.name,"\""));6 F0 F/ i5 L3 O0 x/ @) F7 z
else
6 r: {: J; V$ ]2 a: S$ @0 l1 a promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
, R1 O! v( c& v* @. w4 Z9 W, S to_str("in docking station: \"",?.~.name,"\"")); $ G9 o" ^. z U
end;
0 `1 m. n0 [6 b4 s; j. }! O A else
2 o H- S4 ~# E/ d7 _2 G, j @.Destination := assignLObj[1,row];% b! {' F' |# h" F4 t" V W3 `
end; , T# y- b% Z8 m$ @
newDirection(@);0 q3 r+ {* z2 ^
@.HasOrder := true;
6 q, m9 R, ?( M6 \) ^7 @ end;) i- a9 [6 y9 q7 O' `
end;6 T8 n1 n7 ]+ Q% A0 A2 {. Y* K) C
end; -- of the method* z( g5 B' {9 R4 M0 f& d8 V
|