/* called by: entrance ctrl of the object 'track'
+ K( H+ }% ~+ d u; c7 U3 N*/
. r: X/ N, Z2 W# G: }+ X' d4 ais
. B! Q4 c0 @5 s2 U4 _7 s part, GlobalDistObj, assignLObj:object;row,Lan:integer;3 n9 n7 |1 Q: [+ J" c' G
do a! ]( R& L, K8 k
Lan := rootfolder.Internal.Tools.AOLlanguage;4 v; j; P0 c V- C! x
if current = @.Destination -- else return. T1 M* a2 I; y. n6 E. L
then o/ U4 c6 z2 D1 h6 z6 x6 {8 ?' B& i
@.Destination := void;/ o# w2 C- o3 n* F; S. E) M
if @.occupied then+ U W2 ~- Y+ L& n
part := @.cont; \) q% D$ q' V9 c5 o. }! b
@.transpOrder := void;
6 j) u8 ]2 C8 v! E+ L$ l* I: q$ ` part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
) C1 ]2 H) h; i- @9 S8 P @,root.eventcontroller.simTime);
+ v& v4 d2 k8 r; I @.HasOrder := false;
! H* ]. y) k4 N* f! i) e @.DrivingHome := true;
8 M) b# n/ \! N( {" g* \. e rgManager.tryToStartTransOrder;5 i1 _2 O: E p
if @.Destination = void
" ^: D# K3 M' W6 v0 p9 x then -- no transport order for vehicle @+ v7 p9 t- q F/ V1 H1 N/ ^
@.Destination :=, [# J) @8 \! j2 e1 ]6 k2 A: D
rgManager.nearestFreeStation(@,track.~);
]: p! l: E9 w0 X newDirection(@);
( ~7 ], s. Z7 r if @.Destination /= void then4 G' B% H: a7 I% @; c1 R5 M
@.Destination.NumReservation :=7 F" [% J+ t5 d. d$ g
@.Destination.NumReservation + 1;
8 _3 g$ I/ u/ f& b7 x( G end;6 C7 Z; W9 @! R# ?
@.CurrIcon := "drivingHome";# k2 Q0 q5 e8 v
@.DrivingHome := true;2 D! L" M e2 v$ Z O
end;
( T* {" @2 B6 T, v9 E else -- the vehicle @ is empty, both vehicle and part are in the same dock station
5 c! t2 u8 w( y) ^ part := @.transpOrder;
' F2 w; K! [' e- g4 C0 ?4 ] part.move(@);-- load part" w: c* r6 R# S& H
@.CurrIcon := "load";
4 r4 [7 |3 Q% G% F GlobalDistObj := part.globDestination;
4 O5 z+ ^" `8 \ assignLObj := rgmanager.rgAssignL;/ E& K g( z$ A/ B0 V
row := assignLObj.getRowNo(GlobalDistObj);) i- G6 l4 K! M5 F
if Row = -1 then -- since 706 b, E) X/ b2 I# u8 K( r( X- p
if lan=1 then- t! W0 K: r# n2 G, V
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
, \3 Q8 C$ p* H# f& G% p9 E% q to_str("in der Andockstation: \"",?.~.name,"\""));
8 [/ x5 k" u1 U2 e/ ~& b/ c else
8 e* q8 H- d7 m8 s promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
, N0 a6 {# E0 O; m. N& w to_str("in docking station: \"",?.~.name,"\""));
8 k) l \: C$ D( m" J6 {- [ end;
' k, H: u6 [/ B3 G1 N. k& q else8 d8 o7 S1 K8 ], f, ?
@.Destination := assignLObj[1,row];
- P) E! X" v4 }, m. C- f9 | end;
$ h% \3 n( B8 p6 K2 s/ P" m% a2 W newDirection(@);" J& ^2 F% z2 h$ \+ ]9 S; r$ v6 A
@.HasOrder := true;. D4 e% d( B: b' }9 @
end;
1 F' y) k9 q1 m: S% N% q end;4 {) f& a6 h% v) P
end; -- of the method: J+ J$ t9 s p- p
|