/* called by: entrance ctrl of the object 'track'2 Z) s9 X8 p. f' c9 d
*/
1 n; U# F' K8 k+ r2 F: a4 K( m$ @is
9 F) o0 ?9 c# {2 i5 R) `8 o5 ?* N: {# H part, GlobalDistObj, assignLObj:object;row,Lan:integer;
# b- e* E8 ^: Q8 t# y$ L7 Ldo
, l3 {0 N, T. c/ L0 j Lan := rootfolder.Internal.Tools.AOLlanguage;
1 y. h. r7 O0 v/ Z if current = @.Destination -- else return7 P4 p' y3 p: b1 ^7 C! z
then
- r8 r" n* b$ ]. |' G @.Destination := void;) L: R$ L( q& M2 \3 q
if @.occupied then
5 e7 z8 e1 N9 D& T' e" ] part := @.cont;
3 i" V7 w8 s; D @.transpOrder := void;
) o' x: y. {7 M w: m# L part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,* }% x9 f/ X, H$ L, t
@,root.eventcontroller.simTime);' ~3 Q* n8 Z: }4 N3 z
@.HasOrder := false;
, `/ @8 n! s" g4 I7 ?6 K @.DrivingHome := true;
. y6 b- a ]: \, u' [ rgManager.tryToStartTransOrder;9 C, X7 u' i7 u
if @.Destination = void
4 d: b$ B- w+ s' P& u then -- no transport order for vehicle @
# z2 `7 J1 N! g" m4 x2 [ @.Destination := k( q* r* s5 u1 K1 E
rgManager.nearestFreeStation(@,track.~);; W/ K B* y2 P* [
newDirection(@); 7 ?. Y. F. x5 `- {, B$ B
if @.Destination /= void then
0 o- l3 X- C9 W [3 I+ Y @.Destination.NumReservation :=
$ h G! b7 D4 r. p) f) T& h @.Destination.NumReservation + 1;
( \0 F2 Y& j, w end;
4 n( Q _0 o% @2 k+ X0 [ @.CurrIcon := "drivingHome";
, f) C% M0 L2 u5 y; | @.DrivingHome := true;" \+ A8 i+ N# V! f3 m
end;) S5 o" z% ^' s+ r# }
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
2 ]; x" s6 Z3 Z part := @.transpOrder;7 z i6 q4 U; {# l# w* _7 {$ B
part.move(@);-- load part
4 G* f7 C; @- X @.CurrIcon := "load";
3 |8 d4 X2 i, [5 a GlobalDistObj := part.globDestination;3 a) q6 K# t, ~2 `
assignLObj := rgmanager.rgAssignL;
# R( A* [$ W# b( B/ Z0 A row := assignLObj.getRowNo(GlobalDistObj);
# K b$ B4 W' L3 W( D if Row = -1 then -- since 70
0 g+ ]2 Z1 H/ l/ A, Q5 n$ Q7 M; a if lan=1 then
4 w. v* S. ]; Z* { promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),7 q* [% N+ p: X
to_str("in der Andockstation: \"",?.~.name,"\""));
$ O7 M$ A7 P( E+ v5 y& z else* G! s) C7 A3 @3 W' P/ H
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
5 j U0 [% Y# t# A2 ^# p to_str("in docking station: \"",?.~.name,"\"")); + q% r6 f, K" v2 {1 M: B
end;
3 L1 m' f- C! [+ I: u else
& B7 W9 s3 _1 j1 P @.Destination := assignLObj[1,row];
. J4 ^7 V0 g$ p# R" o end; * n& q/ e: U4 S' @! J
newDirection(@);
% O& d9 l. o0 J: x0 X! P @.HasOrder := true;- C% z9 o3 R7 _8 a
end;
- _" U! Z" f ~ b6 v7 Q end;0 _* a* B- E9 a
end; -- of the method
- Q2 z) I" C$ Y% x5 E& x2 |) L |