/* called by: entrance ctrl of the object 'track'
+ W4 d; M$ d. H; L*/$ I _ N+ K3 r; D3 ?8 Z. I
is
- q" X% ^8 ?8 c part, GlobalDistObj, assignLObj:object;row,Lan:integer;1 H+ t* ^ f% W: N s& G9 V# b" A
do
, p" A" s4 Q1 G0 n5 [+ \# s Lan := rootfolder.Internal.Tools.AOLlanguage;
# M- l9 P+ e: O0 n. ]" i. G if current = @.Destination -- else return: a+ M4 f) b. O# A1 F3 M7 M
then
3 n9 _) S+ k7 o% Y' g @.Destination := void;
+ O; n* q: [# H% z if @.occupied then
6 \* Y* J4 \: J* z" r6 ^/ L2 j5 e part := @.cont;8 g" p) E' _1 t2 J( L
@.transpOrder := void;1 G$ [ y" O- R+ u. o; F
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
- b* t: ~: |4 [1 U; U( }$ E' N @,root.eventcontroller.simTime);
R/ c. x& J; c2 e0 J# t) i @.HasOrder := false;
" ?) f; t _2 J M @+ L2 A @.DrivingHome := true;
$ g' `6 }7 _* R& ~( N7 a3 U rgManager.tryToStartTransOrder;. j' B, R- w2 l
if @.Destination = void2 k* a6 g) O' |: Q* z' t- p* i4 Q
then -- no transport order for vehicle @
4 n: m/ r- C4 t& k5 ^ @.Destination :=
! A( M! F4 ]: S$ o: y rgManager.nearestFreeStation(@,track.~);: V6 z( C" L$ H# N2 {1 n
newDirection(@); 6 ?6 K% y/ Z& d$ d8 @
if @.Destination /= void then
. A- m8 R1 Y" j @.Destination.NumReservation :=) x- t7 ^4 ]+ |) i- N* X
@.Destination.NumReservation + 1;
0 l# Y T3 V1 v* f" R, y' o4 ^ end;
U$ E+ N2 ]5 P @.CurrIcon := "drivingHome";7 k/ `/ k8 g% p( s' P0 }% f* G
@.DrivingHome := true;& Y2 q& [+ E7 c0 s# y' g$ H+ }5 ^
end;
; F0 k1 i. \' N else -- the vehicle @ is empty, both vehicle and part are in the same dock station* h, g; w5 X# k; V, ~
part := @.transpOrder;
9 \ O8 l" P+ V$ k part.move(@);-- load part
1 f5 M9 k" N* e9 x @.CurrIcon := "load"; A# h% t. T8 e
GlobalDistObj := part.globDestination;
4 c3 D2 ^9 U0 p N% Q$ b6 v/ C assignLObj := rgmanager.rgAssignL;. G$ x' ^. D: k7 D! p8 U0 f. M
row := assignLObj.getRowNo(GlobalDistObj);0 R% @8 L( E& {; h
if Row = -1 then -- since 70
$ v' k2 B& {1 c$ y( V- u if lan=1 then7 C4 V2 g0 Z: N+ K
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),8 C: E6 h: Y* l7 R7 O) F# B
to_str("in der Andockstation: \"",?.~.name,"\""));
9 l5 C& V0 {7 K t1 J9 [$ Q& F& ` else
7 @2 j+ |8 t# u4 V7 ? promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
/ @) @7 U" y7 F7 N* ~3 D/ Z to_str("in docking station: \"",?.~.name,"\""));
# D7 w4 O9 I! M1 k1 [* N end;
4 R/ S+ P9 ^ c1 T4 t else
+ C; ?: l! Z/ C6 [ @.Destination := assignLObj[1,row];7 S# W# j; y) T- o9 O0 q
end;
$ l( T0 z/ _6 }! | newDirection(@);3 [2 V" ?0 l! e/ Y+ Y
@.HasOrder := true;
" W8 ], C1 l9 b! G- n3 K, i1 F6 G end;) k j A* k5 f$ m
end;) p$ e; t" y; j) t1 i
end; -- of the method1 l: E4 j4 y3 @2 j1 L9 W% v
|