/* called by: entrance ctrl of the object 'track'
0 Q: a& ^0 C- e' u% z2 R: M8 q*/
6 O, H+ p8 r) {; Qis
1 ?+ M7 V* w8 b' g+ {! H part, GlobalDistObj, assignLObj:object;row,Lan:integer;
' K: @ j) n! p' t& Edo( ~7 ?$ k, T( ~4 f
Lan := rootfolder.Internal.Tools.AOLlanguage;
0 F8 ]5 K( [1 ?% @- F1 S# w) f if current = @.Destination -- else return. c$ p, K% E B3 A# X! X9 ~2 g
then
7 x4 D8 P- }" D; k4 _9 e1 |+ @# i @.Destination := void;
7 |2 Y- G1 O* v+ s if @.occupied then
% X7 M1 @4 {' }6 q; F part := @.cont;7 C# _1 R6 V; w( A' @
@.transpOrder := void;
+ V+ ]8 [5 y, I5 u part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1," M* L; m5 R: U6 y
@,root.eventcontroller.simTime);# I6 `8 G/ _5 S
@.HasOrder := false;
+ Q0 ?+ g) l( @ w$ b% H, M$ k, g. S @.DrivingHome := true;8 y+ e5 d8 {; N9 r- M
rgManager.tryToStartTransOrder;
" Q' }$ e' T( v$ @6 j if @.Destination = void: N, j, Y0 ]2 G4 l: n% [
then -- no transport order for vehicle @
3 G- j5 j/ q/ E( [5 s; I! ~7 r% r @.Destination :=1 i5 C. R5 @, n/ M; v
rgManager.nearestFreeStation(@,track.~);
9 Y+ y$ `; ?* J7 `3 x4 s newDirection(@);
6 |* Q, @6 c% `( `. p if @.Destination /= void then& P9 G9 v& z; L/ G$ E
@.Destination.NumReservation :=0 |5 q+ }; K( ~- y: D
@.Destination.NumReservation + 1;
# Z9 N( _' w/ _8 [; j end;% a6 i* K( F* t& j! m K. A
@.CurrIcon := "drivingHome";
. \+ U* E: I' a# [ @.DrivingHome := true;
, i, R8 M! U7 _- f* M3 `5 S end;
$ \1 K) O' E* ^4 \. ^+ z' a* a else -- the vehicle @ is empty, both vehicle and part are in the same dock station
/ q8 W9 o9 h( L& p, t part := @.transpOrder;
4 {0 y" ] m u: M, p7 l3 \' p part.move(@);-- load part9 q! t5 H6 N8 l0 p/ Z
@.CurrIcon := "load";
( M# Z& ~& v0 K; d! O! K: j9 U2 ~ GlobalDistObj := part.globDestination;
. W9 C B0 Q1 S7 i0 L$ L! Z assignLObj := rgmanager.rgAssignL;. {/ Q3 \8 ?2 M
row := assignLObj.getRowNo(GlobalDistObj);
$ h# R2 G; N+ I! W0 R if Row = -1 then -- since 70. m3 K' z$ r8 s: e% E. n- a; i) k6 m
if lan=1 then! D5 m; x8 z, @+ D, O8 G- t: p3 f
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),! T4 |8 G' W: l7 g- b" j" [
to_str("in der Andockstation: \"",?.~.name,"\""));
# Y$ i& F2 r: {4 o1 A3 x5 y else
" j: e6 Y# A# E3 C/ k promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),7 j# I) g" |1 K* U4 b
to_str("in docking station: \"",?.~.name,"\""));
) u% w) O4 u* J; y end;
' ?! }) ^, p5 c& d8 V" G else& x0 T5 j4 c4 [
@.Destination := assignLObj[1,row];
! U* Z6 v/ s0 Y1 M+ f; r) ], G. u end; $ d+ L( h' m1 N5 Y9 ?. {
newDirection(@);
7 x: G( b2 ?, \) N% G1 M @.HasOrder := true;
; D& x( {$ C. i4 Q- p end;6 p8 B* D& A" J, p& [+ Z4 H# p+ b$ P
end;
9 Z% P; V+ m% K5 Aend; -- of the method( w/ E/ z# y! |3 R$ F
|