/* called by: entrance ctrl of the object 'track'+ k5 [2 }- n" L" q* W! h: q6 H
*// K3 |1 S& V9 }% a9 r* R
is
7 ~3 E# f4 W, d9 x( h) a part, GlobalDistObj, assignLObj:object;row,Lan:integer;6 \$ e4 q/ i0 e: K) {9 X9 R' C7 q
do3 Z W. a$ Z: f4 ~* E
Lan := rootfolder.Internal.Tools.AOLlanguage;
0 E0 d, W* ~, W' Z if current = @.Destination -- else return
6 z9 O: w! x+ l. X then& D. ^# v! ]' T; }3 y
@.Destination := void;
& `$ m$ o- X e' j5 X- m+ C if @.occupied then6 h4 k8 @" a7 O
part := @.cont;
9 E" |, R7 A p9 @ @.transpOrder := void;
) n* }5 p3 |5 C# _ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
; X# g# i# S: Y: ~6 V& Y @,root.eventcontroller.simTime);
1 K% k" ]0 c" f% a- s% u. _9 x# _& o @.HasOrder := false;
. i/ @2 \4 ]4 x; X7 v# q* X9 b @.DrivingHome := true;+ B$ s0 N6 I6 F4 R
rgManager.tryToStartTransOrder;5 G6 F0 L: t$ ~; n$ l
if @.Destination = void1 a' o$ o( y0 {# j2 m$ \0 Z6 i
then -- no transport order for vehicle @
' Q& j9 G2 c1 X @.Destination :=
, s/ U. o8 R. }+ ~. O9 y rgManager.nearestFreeStation(@,track.~);9 ?" \' K5 U8 v
newDirection(@); 0 n4 z J* Z) @) ]1 o. _) G, S& x
if @.Destination /= void then
- W* R @ m4 X0 a) B T+ C# ^2 W @.Destination.NumReservation :=
2 N% D1 n0 h, w! _# F% p @.Destination.NumReservation + 1;$ G7 u D. V" u
end;" C" e+ t' d8 m0 t
@.CurrIcon := "drivingHome";6 C; R H' r2 x* @- ]8 ?( n
@.DrivingHome := true;/ T( T0 `$ V( I h, ^* k3 E; G. ~5 y
end;
# O, J v$ P7 \% |9 a2 [3 u/ r2 z else -- the vehicle @ is empty, both vehicle and part are in the same dock station
* N( x, S) d' v, r part := @.transpOrder;( M x; L/ [9 T# q7 p
part.move(@);-- load part
$ F; u2 ~ o# l. V- p/ x @.CurrIcon := "load";8 I {: { {) y$ n- \' W4 U" Y
GlobalDistObj := part.globDestination;8 L2 ^ m7 P$ W8 w
assignLObj := rgmanager.rgAssignL;4 D/ [& v- m) k" \
row := assignLObj.getRowNo(GlobalDistObj);
+ i4 j4 H* r* `. K; H5 { if Row = -1 then -- since 70
3 {4 v2 D* E# f" X, | if lan=1 then
9 b# I I* @! x promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),% p* }& V: O/ @+ u S# S
to_str("in der Andockstation: \"",?.~.name,"\""));
; {) q8 z4 u" t& d6 S else Q1 ~1 h r5 a' _
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
~# p2 L. Z: [3 K to_str("in docking station: \"",?.~.name,"\"")); : D* T, K4 d1 B
end;9 Y4 h+ m* f6 @1 | x, U" Y& D k
else/ D3 Y( L- h: k/ O7 y; H6 @0 x
@.Destination := assignLObj[1,row];/ N* O2 h2 K- t8 s
end;
* s* f* K, |# ^7 y4 r7 P. y newDirection(@);
# A W8 X& t9 j9 j @.HasOrder := true;
( z* {) l" Y* R end;
+ o2 g" V8 ?+ o. ~ end;
/ N( A' g$ \/ T) i& q7 W6 U- A7 Zend; -- of the method, [% Q' J9 y. m! k
|