/* called by: entrance ctrl of the object 'track'( f; h) ~6 A+ e6 R! G2 N3 P* b& k" z
*/
) r; O" ^3 q+ e) ^2 ]3 h1 _is
. f# G3 a3 n7 S part, GlobalDistObj, assignLObj:object;row,Lan:integer;
: r; g/ z9 z" F3 L+ X6 H1 Z/ ?) c6 w6 qdo' a2 ^7 G* P& B3 `8 ?: K" v3 T
Lan := rootfolder.Internal.Tools.AOLlanguage;
8 u6 A" h! c+ R; v2 ?1 j if current = @.Destination -- else return1 M, M. p2 K; x, c2 i* k9 P! w: e
then% Z3 Q8 _' G; s5 f, h
@.Destination := void;3 V& b3 U$ f/ {* n
if @.occupied then9 W) O8 l+ T& C5 ]
part := @.cont;
- E. o+ E$ _2 c5 b: Z2 f1 t. X P" W4 _ @.transpOrder := void;4 L2 U5 F% _& C* D N
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
) K1 C, x* L1 ?6 \ @,root.eventcontroller.simTime);( T" }3 t0 ^9 h, a9 ?
@.HasOrder := false;
) B# L6 A [: ?8 q @.DrivingHome := true;
/ R l" @9 q& X! q rgManager.tryToStartTransOrder;% m: E4 O* z$ I5 [) |4 B7 R
if @.Destination = void v- z* U$ U/ q+ h# ]0 f: u
then -- no transport order for vehicle @
1 S5 [9 {: j% [' B9 o0 `- e" n @.Destination :=- [5 [% K7 m/ C) P
rgManager.nearestFreeStation(@,track.~);
" J8 N3 K7 w* c' p4 B+ C: \' J, | newDirection(@); ) J5 v/ ]; D ]3 M
if @.Destination /= void then
( A: e- W! M b k: t+ i2 k( ]% O6 [ @.Destination.NumReservation :=
; i. Q* c6 V Z2 e8 F6 m @.Destination.NumReservation + 1;; S; }/ `' B7 I9 L+ s) r
end;. y9 H4 B: C6 T5 O6 a& @3 \# ~4 E
@.CurrIcon := "drivingHome";
* C: h3 E+ ?1 T6 g; r8 u @.DrivingHome := true;& ], O) s$ z" S+ z' Y$ `) f
end;
4 Z+ L8 o; c- J! Q. Y% t7 f else -- the vehicle @ is empty, both vehicle and part are in the same dock station
" a' |* E+ k$ m7 C; P. Z part := @.transpOrder;5 l' s# C. x5 ?9 r# k0 i
part.move(@);-- load part" _6 s& [. z0 G$ G8 Y0 T: @
@.CurrIcon := "load";
6 z V0 @0 N' x. | GlobalDistObj := part.globDestination;
3 D4 v4 Q2 j* m" D; j" g2 c assignLObj := rgmanager.rgAssignL;
! m# g' Q! @$ Z0 i8 w2 Z0 p1 g$ b row := assignLObj.getRowNo(GlobalDistObj);/ y; z% o+ @$ x# A
if Row = -1 then -- since 702 t) `7 ~# [ d7 N( e7 i; O$ N
if lan=1 then
3 ^( y9 \: P- V+ H6 w% }- Q promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
2 X3 U3 t$ ?* T9 t* R U$ ^' t5 ~ to_str("in der Andockstation: \"",?.~.name,"\"")); m# x; ~" y! X1 ?8 U
else# Y* `9 @& c* o& ~3 b2 j9 w1 K$ `
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),! D1 H. O2 A2 o5 k9 j8 z
to_str("in docking station: \"",?.~.name,"\""));
8 n$ S) M4 @7 \ J6 l. C8 Z7 g end;
* X. [: V# t/ I0 h, \; { else9 C' y8 {8 B+ c- q
@.Destination := assignLObj[1,row];
" i4 q; u; X8 c+ k+ N# c& ?% o end; ) t" m" h d% C! R* Y6 l8 S
newDirection(@);
# E5 V* K9 |3 c @.HasOrder := true;
0 y; v0 n3 d8 }" s end;
, q9 L, P( ]: f1 L( d end;
$ x P0 r4 i7 y3 g/ Aend; -- of the method# H3 P! K2 H/ K0 K+ x M9 |
|