/* called by: entrance ctrl of the object 'track'1 w7 e2 S F2 T
*/
4 ~: s5 q) k; j$ N1 Jis7 M9 ]7 h1 z1 c: w- g
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
7 S2 i* i9 M* j* H/ u0 Tdo% [. _7 _. m5 s7 P0 z/ X
Lan := rootfolder.Internal.Tools.AOLlanguage;
4 Q; G3 [) V1 }6 c if current = @.Destination -- else return. r7 i2 i- @. V5 @: z
then5 [, \% I2 @9 G3 V' u) n5 ]" s
@.Destination := void;/ x* a- s. Y7 G; g# `$ ~
if @.occupied then: C' P" V7 j% N9 ~' h) |- U. G
part := @.cont;3 U& {7 i9 ^0 [
@.transpOrder := void;
: `% L" j; y5 S7 A$ _ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
: O/ e5 x/ ^) b/ \8 Q1 c @,root.eventcontroller.simTime);
4 H }/ u( X2 v- L, Y @.HasOrder := false;
6 s8 Q* D) t2 Q% h/ l% ? @.DrivingHome := true;! K H/ t% _) }- w2 t2 i. y
rgManager.tryToStartTransOrder;
0 ~: n2 ^/ A/ d G4 }) R. y if @.Destination = void
/ P: d% S% d2 z6 N- n then -- no transport order for vehicle @
: e7 n, M0 `+ K; C) ~) [1 [ @.Destination :=
$ z. Z& ^/ o. f( u& w, H rgManager.nearestFreeStation(@,track.~);! n$ A: b( D1 y) [9 j! ?/ }7 U
newDirection(@); ' j4 S; F5 ]! z; F/ X
if @.Destination /= void then* A9 i, M( t$ B0 |" R2 v( O
@.Destination.NumReservation :=' k. } T* x4 D# @! T5 v
@.Destination.NumReservation + 1;- T v5 P" K& l {/ @& J% [, S
end;
, l S$ \+ `$ i: }, o) z6 h( l @.CurrIcon := "drivingHome";
, b; E" R/ J) H2 h# \ @.DrivingHome := true; W3 Y, v- L( T T, x" h0 O
end;
) F, x* C+ d6 M6 m$ f! d else -- the vehicle @ is empty, both vehicle and part are in the same dock station
6 W( p H2 U. g. a part := @.transpOrder;
6 g4 E$ H7 c3 D* Y$ T! P) m# ] part.move(@);-- load part, O7 ] `4 q0 M0 v6 q5 u
@.CurrIcon := "load";
* T( i1 W4 P' h9 ^) | GlobalDistObj := part.globDestination;
" d. G2 Y* |' R( i) c assignLObj := rgmanager.rgAssignL;
. [) n! a: {+ X2 b row := assignLObj.getRowNo(GlobalDistObj);! |3 G1 M+ l0 o& n5 K
if Row = -1 then -- since 705 T( w' x/ P! v4 P) `1 @( Q
if lan=1 then1 E; y6 l4 Z: d5 |9 l) A
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),! p. C$ q- m( H, k9 M4 P% `
to_str("in der Andockstation: \"",?.~.name,"\""));
8 |4 w6 @* _$ c9 y. \ else6 L. `% [2 r6 ~2 Y: V/ E
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),& ] A% k/ W* k% |
to_str("in docking station: \"",?.~.name,"\"")); 8 [. u8 u$ E+ |- R. o9 I9 t B
end;
4 `% L8 M/ i, \6 J" p: I. o% @1 X$ ^ else
. k; O3 J- i8 l @.Destination := assignLObj[1,row];/ m; S8 G6 u5 j. U) m( s( o' b
end; $ g4 _( d; g) N3 x. f! _
newDirection(@);1 Q0 ?# }5 V2 c& Q; K
@.HasOrder := true;2 `/ K5 s& c- ~. F7 I
end;1 u+ d |4 R1 m( V- Z: F& h( ?( U
end;; C; z+ y% D5 j& _1 r5 g
end; -- of the method8 B5 Q8 W w: l% M
|