/* called by: entrance ctrl of the object 'track'$ M1 `. r) V) z; B& ~7 q7 m
*/
# J' V' C. u' X7 Wis1 n x6 {9 \3 d, U
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
/ N5 g. b' p" k+ V8 N5 fdo
0 _& w! [9 t' s% H/ ` Lan := rootfolder.Internal.Tools.AOLlanguage;
& D: j1 r9 s: S5 E if current = @.Destination -- else return
. a9 u' L# Y5 E. o7 p: j then9 U; I+ _' ^6 n2 C3 G0 H
@.Destination := void;+ Z7 {; ~! Q( h+ ^# G% T
if @.occupied then* J. `6 r; E$ P/ M+ B
part := @.cont;
2 z: ` {) K- {0 d9 r @.transpOrder := void;& g* ~+ l4 Z8 P9 ?7 T; j) M
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,3 U, Y; ~$ B$ r
@,root.eventcontroller.simTime);
3 Y' f: A# v, U; l8 G; V @.HasOrder := false;( y) \8 H1 \8 ]5 ~8 [) P
@.DrivingHome := true;
7 I6 Y$ Z; }8 a$ n& I4 I! F/ `. _ rgManager.tryToStartTransOrder;
" F( s% `( |$ o! m7 x if @.Destination = void
( ?. o+ ]8 f) s6 E7 [ then -- no transport order for vehicle @4 z; C2 g# m) E7 A; M4 n
@.Destination :=
+ I0 J( m( G1 Z& m" }' q rgManager.nearestFreeStation(@,track.~);' s( ]' F, m9 o! o# j9 |8 S- _! S
newDirection(@);
7 k' ^: I" ]( I$ L7 m! Y4 | if @.Destination /= void then: r f! b2 i/ t2 M5 O: {5 t
@.Destination.NumReservation :=
3 G8 c8 }( I8 P% l) u* P @.Destination.NumReservation + 1;
; _+ Y- l0 L& R4 c$ s$ }( K end; m) y1 _/ x: S7 H( K% f; H( O' {. l
@.CurrIcon := "drivingHome";% o( F- Z& d! Z/ W
@.DrivingHome := true;
& ]) Y |4 {* S end;% {7 D8 O& x9 N) c9 [) D
else -- the vehicle @ is empty, both vehicle and part are in the same dock station$ i y" a2 E, `: \' \
part := @.transpOrder;0 } \3 |' ^- H) p
part.move(@);-- load part; K& }, n4 P. p. F9 l; Q
@.CurrIcon := "load";
9 B& O2 V E, \/ ` GlobalDistObj := part.globDestination;* A. r6 Z' ?! P( ?* L+ H2 Q
assignLObj := rgmanager.rgAssignL;0 X# e. p0 Q& l1 O7 Y( Q5 K: |
row := assignLObj.getRowNo(GlobalDistObj);
. q3 ?, b; i& W- O1 ?9 s if Row = -1 then -- since 70
4 K1 A6 m$ q* D. m, X if lan=1 then
1 F$ V2 k+ Z& L( F8 ~ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),$ _2 y" H: q0 {. I3 J, r9 i d
to_str("in der Andockstation: \"",?.~.name,"\""));
V0 A y" `8 i3 D6 B3 d6 `8 \* Y else
) M g/ m! s1 T6 z/ H! _$ y promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),/ W$ w7 d) y8 V' A7 z6 z% o8 A
to_str("in docking station: \"",?.~.name,"\""));
" A; z# F! j8 j1 ]7 A end;
' |( R+ l: S' ~0 h else) l- B! S6 L* W+ q
@.Destination := assignLObj[1,row];! r; c+ u* P4 r- X# J6 z0 z
end; 5 c3 r% G# N/ u
newDirection(@);
; ~; \" o* V7 C' c# x @.HasOrder := true;3 ~1 ~9 }& G! A- w( Y) X3 b4 n
end;) J; E6 }0 V; F% Z
end;" v( j. H3 x8 O0 H$ B @
end; -- of the method2 X) b* r6 b& p9 `4 i
|