/* called by: entrance ctrl of the object 'track'* H5 b5 w% g, k' L$ X
*/% N' o1 E B% G. P5 u: a
is0 a8 |- T* _* R* N9 L7 m
part, GlobalDistObj, assignLObj:object;row,Lan:integer;$ q Z; K% a9 G2 @1 k1 S+ V5 m
do( I S1 R% A0 y& {0 ^7 k
Lan := rootfolder.Internal.Tools.AOLlanguage;( | t# }1 A3 u1 A0 v Z6 C
if current = @.Destination -- else return
1 U7 C6 A$ j* x4 R then
4 o/ `$ O- [3 Y: l( }8 E$ g, h @.Destination := void;
# a. @- w2 q) g if @.occupied then$ q, O7 N0 j! O
part := @.cont;# A5 }' V+ r: x+ F+ S! S. @
@.transpOrder := void;
+ r8 Y; S, J+ X% G( }- e- d part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,# _/ `* y; X v4 G
@,root.eventcontroller.simTime); D7 `: X$ V2 l% k$ d2 ~
@.HasOrder := false;" e8 K3 E- ?% @3 N
@.DrivingHome := true;
7 e4 h* K" {( d4 w9 h+ n3 P rgManager.tryToStartTransOrder;; T/ P- L/ D2 o. a% I" {
if @.Destination = void) Q+ M! Q6 \! D# Z
then -- no transport order for vehicle @
$ S# s j8 \- V5 l! [0 _3 s @.Destination :=
& q8 I7 N3 h) m; g2 n+ P @4 F7 o rgManager.nearestFreeStation(@,track.~);& d' [, Q7 F w5 x& ?5 @' g5 x
newDirection(@);
: ~/ L( [/ ]% o$ ~- ~. B! b if @.Destination /= void then
# m: ^/ J; {8 m& }" Y) e1 x @.Destination.NumReservation :=
~- }2 ^8 A# J0 A' ^ @.Destination.NumReservation + 1;
6 Y z) e0 I$ Z) k) z- H% q end;
+ ]( i f: I) N2 S @.CurrIcon := "drivingHome";
! Y3 J1 z# w! N" L @.DrivingHome := true;# x: W' W, |5 k3 {3 b0 u+ K' ?1 X. O
end;# C7 I1 R: o# c2 s8 n
else -- the vehicle @ is empty, both vehicle and part are in the same dock station z$ o! S& x. M" E1 z" A M% @
part := @.transpOrder;2 b% Z8 P' J+ j4 |% v
part.move(@);-- load part
+ p8 y# [0 a; t4 @0 G3 o" K @.CurrIcon := "load";* S: z$ g/ t, x9 u( D
GlobalDistObj := part.globDestination;2 f* B6 Z( |! R: ]* |& W2 L
assignLObj := rgmanager.rgAssignL;0 D0 \1 Z- x* Q' ?+ h1 E# R! f
row := assignLObj.getRowNo(GlobalDistObj);4 g/ _& E" _ x$ W6 f
if Row = -1 then -- since 70
+ v0 |: G7 V7 L6 z# m& ~( b3 ^ if lan=1 then7 v6 \, L* J7 d6 z2 w0 ?
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""), `5 R+ |' `6 O Q, F
to_str("in der Andockstation: \"",?.~.name,"\""));& `: g; y/ ]1 S/ d
else: W3 ` f+ a3 d) F# I, r, B
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
$ d! X8 e* H2 K$ K to_str("in docking station: \"",?.~.name,"\"")); 6 Z G' ]4 @- `+ P- O7 d! i/ J
end;% ]& V ]% o5 `
else
3 y. ~4 @7 O( O! P @.Destination := assignLObj[1,row];! a& f, W2 p) U+ C( O1 p% _/ j
end; / ?% ?' p2 _& b/ L& e$ ^% `! ~
newDirection(@);0 J+ f8 b% q9 k; P& P9 A/ l- E' L3 E
@.HasOrder := true;
9 s( J. `) H* S2 ~+ J2 K* k7 Q9 G end;9 C$ H' N J* B
end;. X Z# h7 ?$ B& ~1 A7 r# e
end; -- of the method
k! i4 Q8 i6 p& E6 F! M/ }$ O! s |