/* called by: entrance ctrl of the object 'track'' Z+ ]+ H8 S) Z9 q. i) T+ U: s" e
*/
! G$ j V0 k2 D# m- [! Mis
- U4 @/ e2 c+ v1 U; w9 y part, GlobalDistObj, assignLObj:object;row,Lan:integer;
6 M/ N# Z" O' J/ zdo2 g6 s- E# `; f1 r! N$ r
Lan := rootfolder.Internal.Tools.AOLlanguage;
0 I8 ?5 i1 h, [ if current = @.Destination -- else return
Z7 D5 A+ ~" \3 L then
4 n8 X$ Q% o) o; ? @.Destination := void;
; z0 a( a0 c3 r% K8 v5 v if @.occupied then+ M) N! d( F. T' U
part := @.cont;
+ a( X9 S! U) V8 X/ o1 D }/ t @.transpOrder := void;. w$ ^8 c+ ^ R; c; o$ {2 d
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,0 Q% u H8 G' K# C) D
@,root.eventcontroller.simTime);
# H! m1 {+ T4 O. n$ x. o& ? @.HasOrder := false;% c. E* l1 a) C1 B+ h
@.DrivingHome := true;4 @0 |+ S( F* G, a' v
rgManager.tryToStartTransOrder;( W" f/ `- }0 m9 ` Z5 ^" L
if @.Destination = void
. a: x/ i& c) [0 Z% ` then -- no transport order for vehicle @
. Y' S$ n) x3 O- L. [) S$ ]- k @.Destination :=2 g* ~9 i5 C' }6 D3 u
rgManager.nearestFreeStation(@,track.~);; _9 D* m3 R$ y% s+ B* h5 k t
newDirection(@); ) ?. o: e9 d# o' i& M
if @.Destination /= void then
- D% U7 D0 r+ I, Q: { @.Destination.NumReservation :=
# b( n. H$ P* `7 t @.Destination.NumReservation + 1;
7 J* {) N( q' j. H1 B% v/ p( ?! W# e end;% f, g! d: w U3 [) X
@.CurrIcon := "drivingHome";% u# r: T( z$ E e, u; O
@.DrivingHome := true;* ]7 m6 J/ E7 i% T: r0 G
end;) q; Z; ^3 K# t- C( B: a& N: |
else -- the vehicle @ is empty, both vehicle and part are in the same dock station# s3 y, T3 l, A! G0 d v
part := @.transpOrder;8 G2 X/ P9 u4 o) {" \& S- i, f
part.move(@);-- load part9 g% j+ Q; B, w. b e& `5 z6 L$ q8 x
@.CurrIcon := "load";
9 o8 {' F2 L' O, j! \ GlobalDistObj := part.globDestination;3 m) M, p7 W/ t% w8 h
assignLObj := rgmanager.rgAssignL;
. \3 \1 ?# M' ^: e3 s- Z. O( P row := assignLObj.getRowNo(GlobalDistObj);. c: O8 y# T/ J! j) X. R2 @
if Row = -1 then -- since 70: L. C4 M+ G' R% _3 H+ j
if lan=1 then
9 W: H- p( S2 x promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),$ u( w2 N4 }. J c9 y
to_str("in der Andockstation: \"",?.~.name,"\""));2 W. A# O6 W! V O8 n/ }( M2 `
else
7 Y; \! }2 Y& w# X( W5 R6 R# | promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
B5 r C% L' p7 f* f* f2 o to_str("in docking station: \"",?.~.name,"\"")); , o$ E9 V: Z" H0 y" s: ~; g" U" f
end;
6 E0 i3 n( ?3 K: ^7 z else
) _# R" \4 X& z @.Destination := assignLObj[1,row];9 f. s& v6 T4 a" O# ]) D8 j3 U
end; , T6 V" h1 L R/ @! f J
newDirection(@);
^8 e7 [. e/ n- _7 X9 h6 k @.HasOrder := true;; v" K2 x' L) o, \/ }/ G0 u
end;" e& l( {1 |! F, c* v& P! s
end;0 |2 g, K8 }' l. u: ]7 }. ~0 V# P
end; -- of the method6 t g4 V5 q- m, C
|