/* called by: entrance ctrl of the object 'track': B+ L( d9 h5 ?% v ?
*/
& k. T, H' I. c1 m: Iis' |; L; ], O+ G
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
9 a1 c* |% Q0 L& O- d' d) Odo
. t- X' @8 m$ t) d% p3 o Lan := rootfolder.Internal.Tools.AOLlanguage;
; H# {5 R, b# ^" V& I8 [4 s! j if current = @.Destination -- else return
4 Q5 i$ J% F. w- Q) i/ E) _ then8 f. y0 P7 Y3 _! e
@.Destination := void;, ^( e ^; r" J" M
if @.occupied then
: n, X' \1 `$ y$ w/ F part := @.cont;0 K# m7 D1 c6 |4 o8 L1 T& x8 p4 x& z
@.transpOrder := void;" d9 I x! r. `9 x. Z# Q K
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,& K/ m: G# E& n* Z" r
@,root.eventcontroller.simTime);" E0 \, M/ |# c. D
@.HasOrder := false;
5 ?5 t4 J4 z4 Z- n8 h* Y/ _; l; n. N @.DrivingHome := true;1 U7 f0 q* {, ~* l) `/ `6 _) b' k
rgManager.tryToStartTransOrder;3 Z+ ?9 x" J' [, j
if @.Destination = void
" _: O$ s1 g9 y( j/ r3 K' B then -- no transport order for vehicle @
0 q2 t8 G; `+ T1 |" m; T' f+ c: U @.Destination :=$ L9 Q" @4 R4 q+ }% b
rgManager.nearestFreeStation(@,track.~);3 p7 l/ C/ ^9 }# H. l
newDirection(@); : t' h; b. ^' W( ]: M9 ^
if @.Destination /= void then
+ k1 i, Q5 N$ q! }! f @.Destination.NumReservation :=
$ d; Q% P; Y" t: n @.Destination.NumReservation + 1;
% q8 b& s% H1 u8 z8 d5 t' h end;
0 ?1 C" p1 B/ D" l- e4 u @.CurrIcon := "drivingHome";
6 _9 m2 \" r. I$ d5 Z; c0 X6 V$ P @.DrivingHome := true;
) l; u8 v7 C. `3 a4 K* N/ R end;( V! ]# q% b% [, b* k, w5 L- @7 J0 I
else -- the vehicle @ is empty, both vehicle and part are in the same dock station5 H% F7 [5 ~4 y7 H* y7 \7 H5 r
part := @.transpOrder;9 o. U& b/ N( U& [
part.move(@);-- load part
4 ]3 U9 V: k5 [ j0 X' \1 t @.CurrIcon := "load";. ~; E. H5 a0 I0 n+ G# u( b
GlobalDistObj := part.globDestination;: l' b6 J$ {# O& S; } Z. [9 D, J
assignLObj := rgmanager.rgAssignL;
/ t) o- s h. @ { row := assignLObj.getRowNo(GlobalDistObj);
4 ^4 ~$ j7 l5 Q" I: x% }+ R if Row = -1 then -- since 70# N1 l* n1 V# p; H8 m3 m9 t3 b
if lan=1 then" N4 ]. v3 w, D! m+ G2 E9 t
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),# A. e9 m; ^$ [$ |# h2 _- B
to_str("in der Andockstation: \"",?.~.name,"\""));. H' o3 L, v! Y( V' R% i3 }. h
else
' O. {% v9 z( k c( q6 c$ \ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),$ M9 \% T8 E3 e" c9 [
to_str("in docking station: \"",?.~.name,"\""));
. `$ w Q+ l$ t end;* c4 d" k% Z# _
else
3 K* F+ v7 _, j/ K' v5 z* J @.Destination := assignLObj[1,row];; _3 K3 o% P V( s( i" V, a Q
end; ) _: @- }: N& l+ r3 N1 P R Q ~. n
newDirection(@);
0 A1 A. \! f; a/ a @.HasOrder := true;! H. u. [5 Y% D1 q, M
end;; l9 c/ C- [1 h- [
end;6 {2 r& k; p& L9 a$ L: ^& g
end; -- of the method6 Y F8 d: V `
|