/* called by: entrance ctrl of the object 'track'
# L, C2 ~8 F7 y3 {( G, u9 g$ J f*/7 H) K- F; T* N" b2 d
is; r) d. ]7 ]' _3 g& M
part, GlobalDistObj, assignLObj:object;row,Lan:integer;2 D: n3 M0 U7 k, D7 L8 _
do' d4 A* N/ z. ?; w$ P0 T
Lan := rootfolder.Internal.Tools.AOLlanguage;( R. O, B7 |2 h9 Q
if current = @.Destination -- else return8 F8 ~& x9 k* C; [
then4 a' _# A( }3 ^2 p& `, b
@.Destination := void;& t% U7 e5 ]: Q% h3 u' v+ k! d# O
if @.occupied then
* y2 X2 |5 ?4 J0 X# \ part := @.cont;
3 u, S0 X' s$ m+ F. a/ H, G' ^7 T @.transpOrder := void;2 ?: \ v6 r0 ^* s& {0 a& a8 [
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,4 \7 |& R$ n7 _& z7 y8 {% }
@,root.eventcontroller.simTime);
6 W* a5 K9 g5 l% G* R/ U: [+ X6 U5 N @.HasOrder := false;! P% ]# \ W. \, Q. M- m
@.DrivingHome := true;
# z2 p! S& _3 j, N+ h9 [% J rgManager.tryToStartTransOrder;6 k' n8 F5 z4 g8 N
if @.Destination = void
7 G& ~5 K- F# {/ k- V then -- no transport order for vehicle @
0 F& E) t5 Y7 G7 x6 I+ Z @.Destination :=: M( p3 d1 i2 @5 r
rgManager.nearestFreeStation(@,track.~);
+ Q, E1 `6 h1 { y, ~! A0 L newDirection(@); 5 W. v) n- ], n1 C
if @.Destination /= void then8 B* S5 R( A4 |! q5 l; {
@.Destination.NumReservation :=6 O; a* Z, D7 p
@.Destination.NumReservation + 1;
' ]3 m# |- H# v end;
9 A& z; t' ^% o, Z# r( e2 } @.CurrIcon := "drivingHome";' e, O* ?% R, G) y# W% |! z
@.DrivingHome := true;
" B) J/ w7 K* M0 T9 o end;
e9 s$ J9 l; Y8 R3 Q: _1 I else -- the vehicle @ is empty, both vehicle and part are in the same dock station+ \+ H% V M2 l6 h$ X$ t" h' J
part := @.transpOrder;1 v' }4 b% C$ D
part.move(@);-- load part; u& s3 f! x' u% ]( ]' y
@.CurrIcon := "load";8 h/ {. a3 N" q$ |+ N- ~' N
GlobalDistObj := part.globDestination;
( o l3 `2 v$ C& J) t) L% ?7 o assignLObj := rgmanager.rgAssignL;7 i0 Y0 x% X3 G, p; N( r
row := assignLObj.getRowNo(GlobalDistObj);
3 m2 `* l/ E8 ], N if Row = -1 then -- since 70/ ^# o% s: ?8 U# c# B
if lan=1 then
4 ?. U# [0 L& Q. O promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),1 d/ T3 H E+ ~8 G
to_str("in der Andockstation: \"",?.~.name,"\""));: ]4 }$ z2 p/ R" h; X$ }. t, t
else7 ^- K4 t( Z0 W* D" q
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
0 L! ~. P! i5 u0 q9 \! d2 [& I to_str("in docking station: \"",?.~.name,"\""));
" Q# r3 j1 d1 @2 u6 a4 {3 E end;
* c# y$ m+ i, w! n4 m7 r q else0 G$ w+ O7 D! V
@.Destination := assignLObj[1,row];
+ V8 ^. d" a i* u end;
9 ^) m. A& A! b# h/ [0 [8 k9 d" R newDirection(@);
' }6 d) W4 r; I Z \% l @.HasOrder := true;
( h$ f5 x2 F. K6 n end;
1 G/ W" L: v6 J( d' v2 b3 \6 N& J end;9 m' c) K. |6 G" t; J: B6 y% A
end; -- of the method
: Q7 }5 f; N, n4 R8 i0 Z- J$ ? |