/* called by: entrance ctrl of the object 'track'6 z l/ S* ]& b7 @
*/
5 {3 e2 x$ ~$ d2 n' |* l6 O2 gis
1 z% b& n( [, H& C9 a part, GlobalDistObj, assignLObj:object;row,Lan:integer;
8 ?% ?! k% c1 [: T! F% H; cdo
) W3 S4 [! p2 W }$ W Lan := rootfolder.Internal.Tools.AOLlanguage;. s/ }' \# V# D6 I
if current = @.Destination -- else return8 V! b5 @ _0 C x
then3 G4 C8 G$ W; }( ^& U' `
@.Destination := void;) T1 Z) e7 ]# l7 V. k
if @.occupied then
% U0 ]) r* `( |% F part := @.cont;
* h2 a. j# o" @& h7 v @.transpOrder := void;
) e+ g8 n# P6 s8 l part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,& Y. T4 I- W( h2 g# `% U
@,root.eventcontroller.simTime);3 v; O( r7 V" m1 [( b# W
@.HasOrder := false;! U( Y+ Y( Z2 g
@.DrivingHome := true;
. g/ t3 W9 _" s; g0 F rgManager.tryToStartTransOrder;) R8 r0 m- [- r: u
if @.Destination = void
8 n3 I) x a0 x3 V$ e# Q% ` then -- no transport order for vehicle @. v3 b; c" b" r9 S& p9 r1 v3 |% X& s
@.Destination :=
: ]0 j: ^9 U! j% O J! u8 Q rgManager.nearestFreeStation(@,track.~);( K! k4 W3 j9 g$ J, ]
newDirection(@);
. h5 b% D# a5 h" X1 b! g/ f" Y if @.Destination /= void then
) n7 c, p9 n( p, z/ K" V! Y* y. O$ Z @.Destination.NumReservation :=. J: n9 x( W, |5 F% B+ A7 I3 h
@.Destination.NumReservation + 1;
4 v2 t6 |: K( g; E# F end;
1 v6 D I; o u1 E, r5 O+ W @.CurrIcon := "drivingHome";
) [( S; n7 m/ @ @.DrivingHome := true;
8 B2 d) f2 y2 J/ _9 Z+ ~2 C, f end;( z0 R+ u% b) j+ J
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
2 `$ f4 d# W0 p* |$ M part := @.transpOrder;: b9 T1 K" B' z2 @" j j2 h2 K A" b
part.move(@);-- load part
t+ C, w. t3 N( ^8 ^- f @.CurrIcon := "load";. D: d: z5 D1 v, {( B7 x* Z
GlobalDistObj := part.globDestination;
1 k& t# a) r; t- u# L/ T3 {. R assignLObj := rgmanager.rgAssignL;/ a4 ?% U4 p+ K3 o7 o5 W% e9 j% T
row := assignLObj.getRowNo(GlobalDistObj);* T2 B3 p7 k3 b8 a
if Row = -1 then -- since 70( D7 e# _1 E5 c8 A3 O6 ^
if lan=1 then0 \- l' Z3 O. s% G- j! H, A
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
W7 l; z0 z% u ?1 Q( G; O9 F to_str("in der Andockstation: \"",?.~.name,"\""));; p$ U. F: m7 Q' r* E, v9 C
else$ U2 b$ }4 g9 e$ h( O" Y
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\"")," i: D6 s$ v1 M G3 F' e: k1 S
to_str("in docking station: \"",?.~.name,"\"")); % h: S5 w5 p. ?
end;
6 z# G& `" V* A! T4 n+ w6 Y' L else
' ~0 u) {: a+ K1 F/ ]/ X3 J7 @4 | @.Destination := assignLObj[1,row];3 ]% b; @ s9 L( N
end;
2 J6 K& R! B7 g& |9 {+ I" H newDirection(@);. E; I. u# G% K# y1 r, X
@.HasOrder := true;
; f9 K0 {/ w5 t! }1 Q end;" X3 w9 K( t* D+ ?; f1 B
end;
4 t; X# R4 H% l' Z0 S, vend; -- of the method
! S1 e2 w" e9 i$ @! d) V |