/* called by: entrance ctrl of the object 'track'
9 V: \5 K. K; Q4 n# l/ p7 C*/
$ x5 F" W7 Y9 g3 Lis
: {; `' C: G5 ]' s2 l9 E' Z part, GlobalDistObj, assignLObj:object;row,Lan:integer;
; G, U3 q+ E1 ~' @7 ido
9 X0 {, v( X+ ]6 B; j Lan := rootfolder.Internal.Tools.AOLlanguage;$ k; Z5 e2 l; [! s
if current = @.Destination -- else return
' s( N$ n) I/ |" h then
0 m& ~! n& q( L3 I. B @.Destination := void;* Z0 l B; i- F4 r% R- Q7 F3 y
if @.occupied then
* d* C) C) F- [; B part := @.cont;
, L1 g4 A) N% A! n' R$ I" K @.transpOrder := void;# x5 R' D; y; L$ b: A3 s7 ]
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
+ c% o8 Z3 q& {" f @,root.eventcontroller.simTime);
" g- d# z2 @! x/ C @.HasOrder := false;$ t1 i* k7 Q' m y2 e8 Y
@.DrivingHome := true;8 Q* l: ]# N4 r) z" _4 Q, Z
rgManager.tryToStartTransOrder;+ c) j- P" i3 x: r( s$ ]
if @.Destination = void7 D ~5 m( r7 Q" j
then -- no transport order for vehicle @
% w: ]) X3 y9 o. c9 O; A @.Destination :=
2 Y4 S9 ]+ t4 ^/ s rgManager.nearestFreeStation(@,track.~);( \3 n2 S9 U1 [/ U! P
newDirection(@);
O# `% Q. ?0 J if @.Destination /= void then
h. h) n0 d* ?5 b5 S @.Destination.NumReservation :=" g2 b0 a8 f# D+ r
@.Destination.NumReservation + 1;
! t: g# H& i% N% w* }9 a: W end;( E" W+ ?4 i7 ^% d* T& r1 d
@.CurrIcon := "drivingHome";; h" |' ~. F1 ?5 g" u1 x% K; k
@.DrivingHome := true;
`% m) }: U8 j$ L end;
* A; F# r1 L$ r1 I3 d else -- the vehicle @ is empty, both vehicle and part are in the same dock station3 F% A5 ~8 f. _' p! Q5 f
part := @.transpOrder;
, v/ y a+ ^4 _+ M part.move(@);-- load part
: F- k+ e" T! h. k8 K @.CurrIcon := "load";
7 }$ ]5 ?) A& W9 h" [1 M GlobalDistObj := part.globDestination;
j" d) V' Z* u; T& y7 e+ ` @ assignLObj := rgmanager.rgAssignL;" O& z" \& g3 Z9 ~! v# D2 U( q/ }
row := assignLObj.getRowNo(GlobalDistObj);# b4 H4 t1 A: B p, G
if Row = -1 then -- since 70
7 {1 u" ]6 K- H; q2 @2 U if lan=1 then
, V7 I4 e- @; ] promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),( c: L+ y! B7 z4 C
to_str("in der Andockstation: \"",?.~.name,"\""));$ X3 f% G# R# N$ Q9 `, U
else& t" s3 R! O* W6 i! Z
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
: K/ z6 o, N% B( u' a to_str("in docking station: \"",?.~.name,"\""));
" n( B# [ R8 i9 c8 ]! x end;8 A" s" n: g, ]; U. H6 J
else+ X4 i8 P5 @2 i. q! | p) L
@.Destination := assignLObj[1,row];1 g6 @& E' U/ E/ F6 b
end;
G) r9 q3 M* D. w newDirection(@);! u3 |0 F" t8 ]# d
@.HasOrder := true;1 l s6 f; L1 d; S- I8 y# L" Y" a
end;
]6 \ ?) T) T: O! C4 s end;6 p4 `9 t ~9 o$ l
end; -- of the method
7 V2 B; B* P ?; x- t/ g |