/* called by: entrance ctrl of the object 'track'# B/ |' m# k( W
*/
& v& g# S; R) w! R) J7 Iis( H4 K4 c- z* Q( ~& Z
part, GlobalDistObj, assignLObj:object;row,Lan:integer;' M# u; R* \6 b/ Q
do
: R- \* X8 E! l3 F+ l9 ] Lan := rootfolder.Internal.Tools.AOLlanguage; u7 [, ?6 \7 Q& ?: y1 f' m6 d' f9 N
if current = @.Destination -- else return
4 p8 A, m$ _" {2 E then
3 a% G3 g1 {4 h$ K @.Destination := void;
" T7 f3 K$ E) H- V; f if @.occupied then. {# \0 J8 V, F' M+ c
part := @.cont;
6 u! \" ]7 Z- ^) ~1 j @.transpOrder := void;
$ o* Z+ |! y" {5 t part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
' _7 e: B/ O* Y/ C! r8 Q2 l @,root.eventcontroller.simTime);
) Z8 V- k3 q& P6 j) z7 B @.HasOrder := false;
7 I' U6 Q s$ @, H( Q- {/ a @.DrivingHome := true;
- d9 z6 ^9 g0 @9 H rgManager.tryToStartTransOrder;: I. Q( Q: X6 i: b( S( t" a
if @.Destination = void5 Z2 V2 Q1 F) R6 y+ c
then -- no transport order for vehicle @
. r4 V f$ y8 Y4 ? @.Destination :=5 l2 H7 }+ @ U8 s& A/ b9 c
rgManager.nearestFreeStation(@,track.~);
1 Y( e0 X; X9 I0 T& ?, c4 l2 ` newDirection(@); ! h; l& w+ a/ t! W. F9 i
if @.Destination /= void then3 I7 [% F4 Y5 j4 Y8 ?+ R
@.Destination.NumReservation :=
, y" I' F/ x9 y @.Destination.NumReservation + 1;
K/ _: z% [& o" f1 X" d% ` end;; q0 m3 N$ L5 r# @$ O I1 V
@.CurrIcon := "drivingHome";
/ B I/ ]6 P' H) t @.DrivingHome := true;" g8 G: L1 C, V7 H! X; p1 S
end;
1 J" }. ?8 x3 _+ j, ], H4 Q. { else -- the vehicle @ is empty, both vehicle and part are in the same dock station
/ ]- _) _6 b4 g }# V9 R part := @.transpOrder;0 `/ M8 i+ \" E6 D* e. N- [ F
part.move(@);-- load part. l+ w8 H9 s$ ]5 M$ o5 C& X
@.CurrIcon := "load";
$ P4 W. A1 F: Y GlobalDistObj := part.globDestination;% N# ?. ~% j9 h
assignLObj := rgmanager.rgAssignL;
, p; k3 @ t# |; o8 v1 V! } row := assignLObj.getRowNo(GlobalDistObj);
8 H' G4 K _9 y* | if Row = -1 then -- since 70
/ t3 E& F7 C3 v6 M5 J, J+ @+ ?- h if lan=1 then
$ m/ ?. R4 }" c% y/ z promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),- J+ _3 f5 m1 R3 O/ {) x# c
to_str("in der Andockstation: \"",?.~.name,"\""));) F x" o3 C& m" U3 G2 h
else
! u+ c1 j' n. |. t promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
2 f8 F# A& e1 e# a8 o4 Q# H( B to_str("in docking station: \"",?.~.name,"\"")); . ]( q: e* P' J, f8 z) k
end;
! F1 s. P) \1 I& J! f% ]; }; h else8 ]2 X2 Y' n5 a" U u& Y" v
@.Destination := assignLObj[1,row];) v& t& h; O5 Y! ^8 Q" I
end; % I F* [! a0 B% H
newDirection(@);9 B' B z3 F" d' o* H; O3 {! l
@.HasOrder := true;, u: Y* Q& ~' V0 w/ ~
end;+ `" j. q* {, |3 O1 B
end;
( E, k# d9 c9 }2 M. S+ c$ s0 g2 Aend; -- of the method
9 O+ V1 k: n8 d1 }$ f, k |