/* called by: entrance ctrl of the object 'track'4 x. R' }1 E- j1 e: U" t
*/* d5 L8 {5 S9 k, s8 A2 q
is, I, G8 u0 X+ [! A' K
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
$ q; F, s4 J$ ~4 s2 q) Gdo9 ^2 \3 H! b+ H4 d
Lan := rootfolder.Internal.Tools.AOLlanguage;
7 C9 Z* T& |; U, C if current = @.Destination -- else return, c! @" i! W& r
then4 R; F0 Z6 }/ h' a3 Z' s* l9 p' T
@.Destination := void;8 o5 U; f# G5 {9 J7 I, s
if @.occupied then
/ a# _* |8 Q d4 n& i part := @.cont;
& u; h- g3 ?9 a/ ~9 A @.transpOrder := void;
, b0 P4 L& x$ b0 I/ R/ n+ _ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,/ I/ P' s& {' U
@,root.eventcontroller.simTime);
5 H" D; s! x. k @.HasOrder := false;
* O0 T$ C t* j& \4 Y. V* ~ @.DrivingHome := true;8 j* P, d1 g9 @) H! ]9 f M
rgManager.tryToStartTransOrder; F. \1 y5 m7 d6 L& v) ?$ j
if @.Destination = void
/ Z2 _+ s1 E: {' y then -- no transport order for vehicle @3 W+ ~" k b( }9 r" `$ J4 X6 s
@.Destination :=
* {; M; a# {, }4 F* G rgManager.nearestFreeStation(@,track.~);( a8 ^7 V7 x- W! f( Y. q
newDirection(@); " S/ y5 R2 d% U) i8 p
if @.Destination /= void then
; o0 T7 i2 @) v, D @.Destination.NumReservation := J5 O, c! o& i' v. B8 {# Y% T& u
@.Destination.NumReservation + 1;5 M6 b5 M3 L8 p* f2 V0 k4 M
end;1 F! g3 ]& r0 g) z* O) c* E! X) }& ?
@.CurrIcon := "drivingHome";
% |8 l3 l' G( p. W; G, m. D; Y8 W8 p @.DrivingHome := true;
2 t: p- G/ n9 Y8 E# Z- ]8 ^, J) A end; z/ P% @" I+ l: C- k8 ]
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
9 h* H* ]; W& K9 a, p part := @.transpOrder;3 D$ o( ]% O: |, @
part.move(@);-- load part
9 \0 ?1 E9 O0 N& V; z+ I @.CurrIcon := "load";
. q2 `" w4 o/ f! I! F GlobalDistObj := part.globDestination;
0 r' O8 w; F! {& _: { assignLObj := rgmanager.rgAssignL;
3 F; D& K0 K) y& W$ |3 C9 s row := assignLObj.getRowNo(GlobalDistObj);6 m& P1 y. u. M0 F
if Row = -1 then -- since 70
( T8 p, |9 @' Y, g1 T$ s if lan=1 then
. e3 f+ k2 }5 E promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),/ ~) [% I* ~3 s: w! I2 s/ O0 W
to_str("in der Andockstation: \"",?.~.name,"\""));, K# y h ^" C1 d9 H/ _4 D' ~1 k8 H; `
else3 `" g, L$ [9 B' B& {# ?! U G
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
/ t* y' M5 o' @( z( }6 E, a! ^ to_str("in docking station: \"",?.~.name,"\"")); & @0 C7 J/ L" B7 ]
end;/ m3 E, ]: b- e5 s h; h# {. h
else
) ~' s- F) b( ~% O7 [4 V @.Destination := assignLObj[1,row];9 f. d' `) X Z7 _# s
end; - _5 [$ y' a# K. l+ f
newDirection(@);( I1 [( q5 @( p1 H. T
@.HasOrder := true;. j2 R) c- [3 J( ^/ J
end;4 Y1 X' M( X4 V% c( _
end;; s* X9 a: x- X' q( K7 W' t
end; -- of the method# m: f$ z, b7 n2 f: [' j: v, B
|