/* called by: entrance ctrl of the object 'track'- k( W2 F% }: F: V9 x M
*/. }+ B# f+ q c A; m
is, u% ]" x8 ^/ [. W, D/ m" b
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
5 r9 c2 t) M4 f' Q* C; Hdo9 Z% k9 O& Z: V
Lan := rootfolder.Internal.Tools.AOLlanguage;9 m/ I- S: Q1 X. F' o6 k8 o
if current = @.Destination -- else return
7 ]* J4 [8 x2 \0 Q2 @ then) }' M5 `1 {. m# I9 ^
@.Destination := void;, i: D; H0 ?4 F* C3 \2 W# W1 a
if @.occupied then' G( c8 x) E f/ V4 z4 `
part := @.cont;$ T* G2 J+ `6 Y( p U) @7 c
@.transpOrder := void;
3 F S7 c; \2 w8 {% y' l2 p part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,1 F* B5 u7 E0 y- p3 H" N
@,root.eventcontroller.simTime);, d: B* k7 k3 L4 s) t6 E
@.HasOrder := false;9 p- \3 Y4 Z" X+ X5 f
@.DrivingHome := true;
+ F. _: W$ t3 c9 {2 }# B rgManager.tryToStartTransOrder;- k, k" n% P! M" g7 t9 T! [
if @.Destination = void
7 [5 R5 Y' p8 [; m, U/ b then -- no transport order for vehicle @
0 X# o# D' I7 b& y5 s* g, M @.Destination :=7 [2 T: A. @3 D5 ?
rgManager.nearestFreeStation(@,track.~);
/ V' l( q6 E& F ^ newDirection(@); * ~5 o4 x; j8 ]
if @.Destination /= void then8 w- \- X @7 _( U2 S% c. @- ?# L
@.Destination.NumReservation :=
# n0 r* e0 ?, P% j$ j g, c/ K @.Destination.NumReservation + 1;; X. p$ f' H+ p a' i
end;2 i% w: I' W! b, e& h! z
@.CurrIcon := "drivingHome";! l: o& b# b$ W3 K% d2 X8 O8 ?
@.DrivingHome := true;# P) ]5 y" @1 W2 ]. g
end;( @5 ^6 U4 k5 V2 l
else -- the vehicle @ is empty, both vehicle and part are in the same dock station8 S/ Y( E; k# q" I
part := @.transpOrder;8 R( n n: m% T: f0 F
part.move(@);-- load part6 a# R0 ?* Z0 V! Y% Q
@.CurrIcon := "load";8 Z4 g# y9 H- a& r* \! O9 B; q
GlobalDistObj := part.globDestination;0 ~5 r8 T0 r' b
assignLObj := rgmanager.rgAssignL;
* L7 j5 H) x0 f row := assignLObj.getRowNo(GlobalDistObj);
; B; K3 M& w) R I if Row = -1 then -- since 70
' Y, J* P. F3 P if lan=1 then; W5 ]$ ^+ y' E+ z
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),, c2 B1 e( i" y9 K: B# Q
to_str("in der Andockstation: \"",?.~.name,"\""));( G" ?8 R- A1 M, z7 v- Q* E
else
( i! E- q5 g" L R1 ` z promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
( D, I% A( l9 U+ i' ` to_str("in docking station: \"",?.~.name,"\"")); ; Y; V5 Z# W2 V0 U
end;2 R- d0 Y( ~, O) n+ s& z* o/ i5 f' @1 S
else
/ ]" P& t r& c i @.Destination := assignLObj[1,row];
3 p+ o+ m% T9 R3 a. W" Z* S end;
9 P' a$ X% T2 J% L6 T% C0 u newDirection(@);
3 s$ V" U+ ^" U, q e0 a @.HasOrder := true;- p% x! b8 k& ? q
end;
R7 b o5 `$ y1 q. Y" p end;
0 \/ W7 g5 z( o. o$ F6 ^( c' p$ ~end; -- of the method! S7 K4 B# ~1 h. o0 t1 h
|