/* called by: entrance ctrl of the object 'track'
) ~4 t3 ~4 L. B; D# ?7 b8 g*/
* s0 o8 n+ j# i( v9 ^: @is
/ G8 ?9 M3 ]( }6 O& I. \- M part, GlobalDistObj, assignLObj:object;row,Lan:integer;" g: D6 S! F6 l
do
. ^) m+ }/ r0 A7 ?* x" G, F Lan := rootfolder.Internal.Tools.AOLlanguage;3 P% Q* p6 {: U; T& ~5 C8 _
if current = @.Destination -- else return
1 G# K( a* ~2 F _: ^ then
% L3 D6 a8 L& h5 a U l @.Destination := void;' `6 B1 S# M, ]! g5 j3 M
if @.occupied then- b4 ^6 R, u y
part := @.cont;
. Q* t T( q& r; I! {+ o7 v @.transpOrder := void;* d+ C( x6 n! H! S. T; U1 d. N0 k
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,1 r. ]/ R& h9 u7 q2 d! B4 y
@,root.eventcontroller.simTime);* S$ y! l# W6 v
@.HasOrder := false;/ v6 F/ p, I& ~" _$ z% X
@.DrivingHome := true;
5 }% [' Y$ |( X9 ]. m rgManager.tryToStartTransOrder;- s8 [) f7 [9 @- I/ E% I
if @.Destination = void
5 }7 ^1 j" m1 Z then -- no transport order for vehicle @: j4 J E$ ^6 D3 J
@.Destination :=
$ L/ \5 _5 @8 V7 `2 ?* q- y: Z# h rgManager.nearestFreeStation(@,track.~);$ }6 P ^: k5 u
newDirection(@); , p0 B: P1 @6 j) F8 Z
if @.Destination /= void then- I% n* a' I; o5 |1 c) L8 C
@.Destination.NumReservation :=
' V6 l) R/ w7 K, o3 o2 ~ @.Destination.NumReservation + 1;7 |7 m- i3 P2 R
end;
- e7 t# ], U% R }4 t1 O @.CurrIcon := "drivingHome";
3 X8 [. E$ ^/ p. l @.DrivingHome := true;2 ~0 L# @) ?7 w/ P& f* X! K
end;
; |) A1 J$ H3 s7 F5 \ else -- the vehicle @ is empty, both vehicle and part are in the same dock station
' O1 O t+ i# o, F7 V* B part := @.transpOrder;
% e2 p3 H. D: q3 N5 x part.move(@);-- load part0 ]! }3 d8 b G7 w1 M: ]- m+ d
@.CurrIcon := "load";) X* D$ m% M/ F9 Y. O9 a4 c4 Y7 C
GlobalDistObj := part.globDestination;
! {7 _. R5 m$ z6 y7 u% w5 j assignLObj := rgmanager.rgAssignL;
+ ?! B" ?* u3 u# s8 T6 J row := assignLObj.getRowNo(GlobalDistObj); K2 C1 k& u' ~8 _3 _: p
if Row = -1 then -- since 70( c e4 T6 a. |! D7 @
if lan=1 then
. c" s1 h' `6 i( ?; l promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),$ D; u8 b3 ?& M1 O9 }% b6 Q6 A
to_str("in der Andockstation: \"",?.~.name,"\""));: g& y$ H' G! g/ o3 p- v2 }
else
- t8 W9 p" o% a promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),) p. h6 l+ y0 n# Q' R
to_str("in docking station: \"",?.~.name,"\""));
( N; ~$ Q- X2 C/ s" k) f end;3 P* ]9 P1 ~* b5 l7 B
else3 E, X/ `* U& ^5 r0 B+ `' A8 P
@.Destination := assignLObj[1,row];
' |% V; Q0 T7 T) Y' n6 q1 c, } end; + R E: R) B7 c+ ^% p
newDirection(@);$ o; y9 f( U2 ]9 ]+ l
@.HasOrder := true;
9 {3 f+ L. D7 N% K end;/ q6 f, C3 V) o* @8 {7 g% Q
end;/ a- s8 z& w% m5 ?
end; -- of the method n0 ]9 w5 L. S- z" p2 t- ?
|