/* called by: entrance ctrl of the object 'track'
5 T; [/ |0 f4 r6 {*/; k" w+ r0 C+ P- |0 Y, b
is0 g' g! s q# l( T+ i9 ~. Z5 F
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
8 ?. K1 {; L* C% e$ m" n1 pdo" s5 m) A% Y' A: s! q
Lan := rootfolder.Internal.Tools.AOLlanguage;2 @7 N( U# G3 P3 Q6 D: m
if current = @.Destination -- else return
6 s0 \0 I1 L' b then
8 w/ @& `" {2 Q' Q( t @.Destination := void;
8 k3 D! H* M- r1 X& a if @.occupied then: A, v# K1 s' l1 b4 g
part := @.cont;! G$ q& ~9 f8 J1 \8 q/ G& j
@.transpOrder := void;& T% Q' ~/ z i
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
# q, ~ K, y% C1 w# u$ T3 U! `: F @,root.eventcontroller.simTime);0 U/ c( v; n% f7 U- @, ]- J
@.HasOrder := false;
K3 f: H3 t0 s" M @.DrivingHome := true;3 q! }' h$ l% i& f
rgManager.tryToStartTransOrder;
. [+ S$ E: y0 ~; ~! O if @.Destination = void
2 d& k# K8 N2 Z6 i* M then -- no transport order for vehicle @
# _9 |3 h- E' @5 ?3 L @.Destination :=6 H4 E. o* j" Y; O, _. Z( x, Y3 |
rgManager.nearestFreeStation(@,track.~);5 N! q$ @9 B+ F1 _
newDirection(@);
! i1 z0 U( k4 H& V& c- ~' Y8 K7 s if @.Destination /= void then) m: ?# T2 s; K1 Q3 T. J
@.Destination.NumReservation :=
; A9 G) g. p% d: T( D& @ @.Destination.NumReservation + 1;
" G+ S: O" i# {5 x; b end;
2 g% s" y# Q% U% p8 e, A- H @.CurrIcon := "drivingHome";1 Q b2 y8 |) r
@.DrivingHome := true;
, o4 x0 S' a$ h1 m" E end;
/ W: Y% i$ w8 ?% d' {1 j8 W else -- the vehicle @ is empty, both vehicle and part are in the same dock station
$ F! @, w+ K- I part := @.transpOrder;/ b* K" h* Y* |4 _/ z% M
part.move(@);-- load part
7 }4 w6 j' L5 L- L+ J/ k- a7 R5 m @.CurrIcon := "load";
' G% L1 J, x( E3 B. u GlobalDistObj := part.globDestination;; _$ J/ C3 ?. }4 y. z: }* {4 M
assignLObj := rgmanager.rgAssignL;
5 V4 W( W# F) U/ q/ I row := assignLObj.getRowNo(GlobalDistObj);, ]+ ?1 I: b' Y& c
if Row = -1 then -- since 70
+ t4 o. }2 R* h+ r4 J" E if lan=1 then
1 @: T0 ?+ R/ Y promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
$ R( G8 }7 @( ]9 B$ M o) M to_str("in der Andockstation: \"",?.~.name,"\""));) R6 M: J7 E" p, W
else
' }' z) C* v. T' |. | promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
. u, z/ {" U9 @) H! n to_str("in docking station: \"",?.~.name,"\"")); 4 Y6 O& T9 l- C: X* Y
end;
% r9 x9 a5 e" W- f/ N- ]9 C/ l" V; E else# B: P& x2 a( x4 E4 `, m# B9 M
@.Destination := assignLObj[1,row];
/ s3 |" x9 e1 u, z4 {! F end; 7 p `. ]2 s! K( m% x& T5 M$ f4 g
newDirection(@);! G Q: ?9 t4 J' U J2 B7 t
@.HasOrder := true;
) K/ c: R9 Z' Q& Z7 s4 x3 ]5 R* E, w end;
+ j, y2 D" k* t* f) l, K( A9 s end;
8 d- L- Z, C. `9 V& V; Mend; -- of the method
2 s3 F' ], q: b. x- a8 q/ A |