/* called by: entrance ctrl of the object 'track'
; }5 O0 v8 T7 m$ }/ J" b*/
3 t' W. @7 E2 N4 F" r+ v# Qis7 O# v: T1 b6 e: m( d+ E# H
part, GlobalDistObj, assignLObj:object;row,Lan:integer;+ ?# x- Y0 c- w
do
f5 a. J4 j, N% X$ @ Lan := rootfolder.Internal.Tools.AOLlanguage; E# @# K/ R# v3 ^+ u
if current = @.Destination -- else return
$ P# Z) `& h9 _- [; l' B, j$ ^ then* t9 w1 ] d6 I
@.Destination := void;; N4 i) b( w3 e- T6 R1 S$ S
if @.occupied then
+ c9 M. Y% S1 w& W1 s/ @ part := @.cont;8 O. H Y- l/ G u; z/ w
@.transpOrder := void;
- S+ H( C7 L. r1 P1 K) F part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
# G( I# a4 a! T @,root.eventcontroller.simTime);9 p7 k# x- L2 g' C4 x$ ^3 @
@.HasOrder := false;9 ?; _8 L3 M8 L7 ]% j9 [
@.DrivingHome := true;, r J" Q; W+ [; [) J0 d! t
rgManager.tryToStartTransOrder;
# A; ?, x& j2 X) C if @.Destination = void
/ H! h0 @* y+ i4 T( ~: j then -- no transport order for vehicle @
9 B* f, b9 _1 X6 M @.Destination :=: R0 T8 W" r& z% M ~: ~
rgManager.nearestFreeStation(@,track.~);- d. N# |% N, \: b5 L# j) L
newDirection(@);
j: H. I! }0 P0 H1 {/ {7 q& V if @.Destination /= void then
/ X8 t1 I$ |" G* q# `% A @.Destination.NumReservation :=
5 O9 u: O' Y: U" Z& b, Y @.Destination.NumReservation + 1;' ?' X( {& Q- A5 ?7 i- i3 o' P3 R$ A
end;
3 u: I5 T" B1 I2 E: n0 `1 \8 k @.CurrIcon := "drivingHome";' o# C4 ^1 W; D g% Z
@.DrivingHome := true;
y7 B8 \2 O' p7 Q8 X0 S7 _ end;, m9 ?$ c7 C2 x6 Y; b
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
) G2 ~. ^) f) d- a, r part := @.transpOrder;4 m5 h- e, l) ~( y
part.move(@);-- load part
: J# z' [, r" `6 B4 C% o1 i. [" w( ~ @.CurrIcon := "load";
( X/ v2 k1 g. c7 H: p* |& p q) z GlobalDistObj := part.globDestination;
/ J$ H0 k' @0 n, H assignLObj := rgmanager.rgAssignL;
& }# X2 ]/ c5 n% k$ H, p row := assignLObj.getRowNo(GlobalDistObj);$ U' k; g5 t8 A' u, i4 C5 ^4 a
if Row = -1 then -- since 706 `' Y6 k5 m- m! b5 M/ B
if lan=1 then- V+ [6 [1 d; a$ M4 N# J
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
) C y) j' r! q# O to_str("in der Andockstation: \"",?.~.name,"\""));
4 c/ G% h u$ D" m( o( B4 o else7 o0 P; g& D, h, a; t
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\"")," g9 u8 i: a& o6 c& }: z: L
to_str("in docking station: \"",?.~.name,"\"")); 3 ?% b& ^& d8 l/ ^
end;
! ~: u; b) r9 F6 y9 V1 @- O1 S4 D1 z else
! ~4 e" r5 ^) U- }! I3 C* d @.Destination := assignLObj[1,row];; ], d2 B% R& y
end;
, D. T' c/ i2 y6 O+ J: W newDirection(@);
/ `: }. N6 r$ z* o; G$ w0 U7 f @.HasOrder := true;; n* m* j, E* d X: a1 H3 B6 I. A
end;
i3 K; @' X9 Z% k end;
) V' E! a! c. N: a0 {* l5 Vend; -- of the method" I9 A0 L3 u' X- ]- i
|