/* called by: entrance ctrl of the object 'track'
4 B7 P$ O. Q9 R+ }$ g*/; |* R; u# ?( g8 `/ ~0 d+ B1 C
is
- {4 Z2 x( X$ w, a0 t) y part, GlobalDistObj, assignLObj:object;row,Lan:integer;
/ l+ Z8 l+ z* ]- J$ t6 mdo
R# L# I$ `2 ], E* I" D _4 C4 w Lan := rootfolder.Internal.Tools.AOLlanguage;1 {# `" }1 y! |. w
if current = @.Destination -- else return
# a# a4 ~* i% i B& u D1 f: ]& H* m then
. W2 K t5 b6 @9 k @.Destination := void;* W8 |) S* G5 C1 @0 y; D
if @.occupied then) A! p/ c9 k, b
part := @.cont;
/ U* v0 N8 ]( v" I4 L5 V @.transpOrder := void;
/ v/ Z5 G/ v! _: a7 I part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1," h7 {1 J; G: R
@,root.eventcontroller.simTime);7 B3 k! T$ I4 i- ]8 h4 J" S6 v
@.HasOrder := false;4 l _0 Q/ a. e
@.DrivingHome := true;
3 U; M5 s5 C, `! ^ rgManager.tryToStartTransOrder;; [+ G% F. x, X$ ~4 }0 g, g
if @.Destination = void
# W0 T; {. a; X+ G& s then -- no transport order for vehicle @
_, J) e) |/ e) |8 H @.Destination :=
" d9 `+ J3 C+ K rgManager.nearestFreeStation(@,track.~);
$ w7 @* A/ {% c6 Q! g/ D, m4 r# i newDirection(@); 8 M$ T- f0 Q) T C
if @.Destination /= void then
9 r! p/ B3 F; A4 m8 X* v @.Destination.NumReservation :=% g( f* \* h# ]4 Q, I& i7 O
@.Destination.NumReservation + 1;
, _6 L* X; y2 T5 s( w c end;6 X1 i2 y# [* a( p6 K7 H+ K
@.CurrIcon := "drivingHome";
( z* y7 z( G3 P. }) l2 }7 b' | @.DrivingHome := true;/ N9 O# m; p* W E4 D
end; o: v* E* n5 J3 P% k9 T
else -- the vehicle @ is empty, both vehicle and part are in the same dock station" H8 p" J! Y; _ l' j
part := @.transpOrder;
. g: n# ]% [ @2 ?& @& ]7 o0 x part.move(@);-- load part3 H% t) G0 d3 T C! C1 h, b- s
@.CurrIcon := "load";
; d% d9 y2 Q$ ?( v/ u7 Z GlobalDistObj := part.globDestination;
1 T5 P3 m7 k# T" v8 d6 ~" I assignLObj := rgmanager.rgAssignL;
: W2 o$ T) s% w. Y6 o$ F row := assignLObj.getRowNo(GlobalDistObj);8 @1 s" Y d0 ~ q
if Row = -1 then -- since 70
; T1 t! o' Z- _% a. c( w7 a5 X if lan=1 then, f9 A3 v) l6 n% S7 I5 [7 R
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),% v" q1 ~! i3 {* d J( ~6 g# W' m
to_str("in der Andockstation: \"",?.~.name,"\""));3 V2 v* {8 ]5 d* y0 R
else7 ?: m$ o2 X* ?+ n
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
% B( _% _. Y; e9 }; I. a to_str("in docking station: \"",?.~.name,"\"")); . G; G1 ?9 ?- {/ N; @
end;8 N4 Z1 ]+ g3 r9 i3 ^( b7 d
else
$ [1 l" s0 i" `. Y& B u @.Destination := assignLObj[1,row];
& ^- |7 y7 X- m8 T! R: u end;
1 [* N2 ~& x2 V: ~ newDirection(@);8 Q a$ j7 l* f! x
@.HasOrder := true;+ N% M/ U; v. v- a' N/ L* h, h# e! n
end;
, K+ b! C1 Z4 T7 `! g- H: M end;, @2 R7 w, o, P; c, Z3 Z6 E/ |
end; -- of the method1 O1 Z( R: G2 ] U) s5 w( D8 n2 x
|