/* called by: entrance ctrl of the object 'track'" |8 T6 l2 t* U) X; M& a! v6 e7 }
*/2 x0 q& ]; W" v; V: O* i1 K
is- X9 ^; `4 X- N$ k7 F: m+ h+ a
part, GlobalDistObj, assignLObj:object;row,Lan:integer;: g( a3 v ]8 H9 Y# R
do# U `4 q8 s: V9 U, A, i+ b
Lan := rootfolder.Internal.Tools.AOLlanguage;
- W6 _5 |2 s* @- V6 `0 u3 K' b( e6 ^- A if current = @.Destination -- else return
. H* X& z4 n- C6 G then
: ~5 Z, w, w3 W* y1 u* v( N9 ^ @.Destination := void;* M6 k. m8 s) V
if @.occupied then
& }- t, J: F1 C5 y part := @.cont;
/ P9 t; K5 R4 P3 s. r1 c @.transpOrder := void;* }! k; K: z" @4 K) S1 H
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,! N2 h- I( A# L/ Y+ N% ~
@,root.eventcontroller.simTime);4 w, v. {( d8 e) L+ Y2 u# q
@.HasOrder := false;
4 Q S' b; n0 s2 G0 l# ] @.DrivingHome := true;
9 a) }5 X2 q8 F+ M* Q rgManager.tryToStartTransOrder;
- I& c6 ~) Z5 _! e3 q if @.Destination = void
! z* Z6 A* Q) l4 X then -- no transport order for vehicle @
/ o* I' p1 k y$ p @.Destination :=4 u4 W: i* ~2 K. g# E
rgManager.nearestFreeStation(@,track.~);
; u0 Y: f% y* x# W" A2 R& y$ @& U; k newDirection(@); 2 ]2 U8 G8 r2 O9 L' P% @: _
if @.Destination /= void then
3 l! F$ t3 c a; D- B/ q" E @.Destination.NumReservation :=
+ _' U1 x+ C/ }. A0 ]3 c0 B @.Destination.NumReservation + 1;
7 c# h) Q9 g: ?# T/ k' m4 d; M end;
( J, v7 s. q; |9 K @.CurrIcon := "drivingHome";
7 N/ j1 P0 u8 H; W @.DrivingHome := true;% N5 y/ k# H- }3 I! _# s8 R
end;
1 p7 A4 i5 V4 A0 U. z/ ~# N3 r else -- the vehicle @ is empty, both vehicle and part are in the same dock station% ~0 ^1 w N( S9 k0 Q, P
part := @.transpOrder;2 n+ A2 E U ^/ m. v9 S" y
part.move(@);-- load part
5 ]) g4 d7 o& d% ]7 F @.CurrIcon := "load";0 v) I7 T) R7 X2 X" F4 w; b
GlobalDistObj := part.globDestination; Y4 J# h- I" j% c# R1 V. u
assignLObj := rgmanager.rgAssignL;
) p8 r; E1 Z$ @ row := assignLObj.getRowNo(GlobalDistObj);
4 K1 q+ b& K& r) o7 P if Row = -1 then -- since 704 z# @5 C& ~6 `) ?. Z0 ` i, x# D
if lan=1 then
2 E! `, Y3 e& e# F6 `1 r b promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
2 f9 p! i7 D( ]+ f1 T, q: a to_str("in der Andockstation: \"",?.~.name,"\""));$ M1 G( H1 P" k3 S+ W! L G3 F
else
8 \6 {: t s! u/ K, h* f& l promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
9 t3 t, p: O) c G; P2 z# {* B to_str("in docking station: \"",?.~.name,"\""));
0 {) p- }$ [8 L end;0 i( n6 a! N+ P
else
5 F ^1 S1 [2 a5 E9 s @.Destination := assignLObj[1,row];
" C* k: Q2 ]! u8 y end;
" m1 |+ T% R! _1 C newDirection(@);- Z9 [1 w+ n3 e0 @$ y( W3 Y: X
@.HasOrder := true;% k& T8 S0 z% O3 S* `
end;
( W1 \9 p* E$ O* X end;/ a. Y7 M9 c2 B* h- I9 t# t
end; -- of the method
8 V# X2 ]2 K, C |