/* called by: entrance ctrl of the object 'track'
9 o) v9 t3 @: f' J. c" I, F8 ?*/
& L: p5 e( d7 C# ? A, L+ ?is
! k4 G! o/ C& H. v# X- }1 I part, GlobalDistObj, assignLObj:object;row,Lan:integer; d& [% s% y' K
do- C9 Y! y/ h `
Lan := rootfolder.Internal.Tools.AOLlanguage;( h1 ~) x" n/ P9 t( x
if current = @.Destination -- else return
( `3 ?& S% T) d: H then
$ W$ }: J& L- r/ ]& {6 ^ @.Destination := void;( [: k7 f3 {$ e4 ?
if @.occupied then
- N1 W+ [3 L( B& ?; S6 R* h- O" |4 w part := @.cont;( n9 ? A5 V [ v8 `
@.transpOrder := void;
A" T: g5 X8 O6 ^ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
: o5 d$ S {+ O! @ @,root.eventcontroller.simTime); H' w! z! _" {# @3 f
@.HasOrder := false;0 d$ {% u3 C( D+ c& {7 D! B
@.DrivingHome := true;" d/ P$ v& v' L
rgManager.tryToStartTransOrder;, g! c. T. v7 ^0 W5 z$ m" M
if @.Destination = void* X+ B# X2 i: Q2 m# g2 t
then -- no transport order for vehicle @
$ U: A4 z ?' ~! f( h @.Destination :=# ~( |1 l; S! e
rgManager.nearestFreeStation(@,track.~);
' F0 M0 m L! g newDirection(@); 1 B4 e. H7 X; w* B
if @.Destination /= void then
2 ?% r. I7 l9 Y/ G1 y# S @.Destination.NumReservation :=
& {6 t& x5 x' [/ ^) D @.Destination.NumReservation + 1;8 k6 i/ ^/ e4 f+ p! h
end;
+ x [ x9 ~* p# K, ]( _9 y @.CurrIcon := "drivingHome";. a: B% r/ E ~# a0 P
@.DrivingHome := true;1 W% t( i, w' }2 ` i I; [0 f$ ~( h
end;
/ ?& y( h$ ?/ Q z8 B' N else -- the vehicle @ is empty, both vehicle and part are in the same dock station- S9 l; E) h' ?! z/ A( h
part := @.transpOrder;1 d7 q, ?. A4 \! a2 g: ^
part.move(@);-- load part
) ^ E8 R7 L( d, \- a$ u' _& [& N @.CurrIcon := "load";
' R- R9 R' ~. M2 v# Y GlobalDistObj := part.globDestination;- `" P5 @; Z! t# [* m4 T$ D
assignLObj := rgmanager.rgAssignL;
0 Z! |7 x$ e: t7 b3 j6 s row := assignLObj.getRowNo(GlobalDistObj);: P( f& [" J6 f5 u, s# Z. e
if Row = -1 then -- since 70+ {1 v5 m; w4 x, `, E
if lan=1 then
; Y8 G" e: y4 P; l% [3 c, L promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
# G; ]$ U0 N. e+ @( F/ t& x+ h' ] to_str("in der Andockstation: \"",?.~.name,"\""));2 V- c4 m1 H( x# L
else0 w* z9 Z/ N5 O- ]+ X
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
: p* N0 O$ z3 i& k2 r3 z to_str("in docking station: \"",?.~.name,"\"")); + I6 t! s, F q
end;' V, ?4 v9 O' Z% X. B
else
2 y6 g" c3 O6 V# w6 }# I* K) p2 M @.Destination := assignLObj[1,row];* ~5 q; i+ h5 u' o
end; 6 o% g" E+ s/ B
newDirection(@);$ h M. d) g, ]0 D
@.HasOrder := true;* S4 p, G8 W5 D2 O
end;
; g6 u9 T6 f. _' }- { end;
, K, ~1 M _8 N8 yend; -- of the method+ W! z( G; [7 m- j Q- D
|