/* called by: entrance ctrl of the object 'track'3 ]% F0 o; ^6 p# w1 D6 j; |+ H
*/% l# ^, o! b+ b$ G. N2 k; w
is* D0 z& k4 u3 j6 d" K3 t3 S
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
0 K. m0 c& K2 Ldo4 V2 ?. S. C4 O$ c
Lan := rootfolder.Internal.Tools.AOLlanguage;5 Z' x- a6 v* C/ a) T# h' G6 Z( U
if current = @.Destination -- else return
8 [$ K: ?3 P: k$ L1 v8 } then8 n0 P! n5 ?& P2 P0 L4 b
@.Destination := void;
" R3 ~$ W" x9 h9 t5 B0 B if @.occupied then, n4 I$ T" r: L/ G
part := @.cont;, @; |4 f7 P& f1 z
@.transpOrder := void;7 H5 ~7 `' k6 I2 f
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
! O. C- X% o# _. D- a: | @,root.eventcontroller.simTime);( n* m# X( O# q% w. I4 j7 F
@.HasOrder := false;' p. ~8 z1 v4 n
@.DrivingHome := true;! r* Z/ \. O7 X- I8 s9 B* z& X. S
rgManager.tryToStartTransOrder;4 Y2 w8 l% A* X
if @.Destination = void. U8 V5 k5 `9 B: W
then -- no transport order for vehicle @$ ^/ t2 t. Z: z ~5 Q
@.Destination :=
2 ?! p4 ` N U* n. [( ?# V1 Q- } rgManager.nearestFreeStation(@,track.~);
& B2 o8 j7 |+ d" E% v { ? newDirection(@);
3 \0 L! ]7 c: u4 z2 A' @8 N5 l if @.Destination /= void then
* R" A/ H8 c5 C) D: o' K4 Y9 V/ U# W @.Destination.NumReservation :=6 N p3 S0 }- E4 S2 n0 y# R
@.Destination.NumReservation + 1;
+ t: @5 \0 O4 J# c9 L _$ H end;
3 ^4 ^& X9 l( H- I# n) c @.CurrIcon := "drivingHome";5 o5 I, K' r' K# s6 M% D
@.DrivingHome := true;1 E) I& F+ [6 M8 s p% P2 D
end;/ h E c2 d \- p
else -- the vehicle @ is empty, both vehicle and part are in the same dock station+ m! o( H. R- H% _5 ?; R) G
part := @.transpOrder;
$ n* z1 q/ N2 f a part.move(@);-- load part# T' f. Q0 {" k, a: ?
@.CurrIcon := "load";* `! U$ e( r4 [# A" y" p
GlobalDistObj := part.globDestination;
# f V: ]( ~* b/ |9 G, x# P assignLObj := rgmanager.rgAssignL;
( P4 a5 r# A. }9 Y row := assignLObj.getRowNo(GlobalDistObj);
% a z- @$ k( T if Row = -1 then -- since 70
. ~+ M5 W/ x' h% ^% S/ F if lan=1 then8 W% a# b$ T/ z
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),. J) `3 Y; Q4 t
to_str("in der Andockstation: \"",?.~.name,"\""));: J: \* L4 u% ]0 o: t
else( _8 Z9 x& _5 {' e
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
- k& p/ i& Z7 j9 h5 r" N to_str("in docking station: \"",?.~.name,"\""));
" I: U/ J* ]9 \ end;
! p* O6 x9 |: q# n' G: ? else
3 f8 e& O) B' E0 Q @.Destination := assignLObj[1,row];7 o/ F# y9 ~' E
end; % Z9 D- Y4 o: j% H* L, u, c ]
newDirection(@);
7 d% ^0 m% g& X1 K, e @.HasOrder := true;' u1 [# B( }* A" q4 I( W7 I
end;
/ q+ L3 ~) j5 K4 `/ e end;
) G7 a5 k: M, N- R# H2 Gend; -- of the method& o$ S% {' n& q! u1 M4 y
|