/* called by: entrance ctrl of the object 'track'7 E* y2 p9 ^0 u9 u; [+ t
*/! z$ x. [3 K1 t& H4 S! g! V) E
is
) j$ Q2 Z$ d6 Y1 q5 h) h/ R part, GlobalDistObj, assignLObj:object;row,Lan:integer;
8 E7 v8 Z; u$ }! \3 z8 Q& Sdo
( Z% S7 l9 N5 ?+ d0 c3 W Lan := rootfolder.Internal.Tools.AOLlanguage;9 l5 I% o+ J4 h) n
if current = @.Destination -- else return
+ }% x6 ~, o& Q* g then
" [* T: C' w! w @.Destination := void; t: O3 }4 _4 h! l3 K Y
if @.occupied then% O N+ ?# Y, j B- F
part := @.cont;: `/ | b9 @2 P$ J
@.transpOrder := void; H" d3 o& C! X7 {
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,6 ]. k* ?1 c+ x; p/ f8 f' A6 j
@,root.eventcontroller.simTime);
( N2 e9 w/ v% S @.HasOrder := false;
* K4 x0 T0 F( X1 t& Y2 C @.DrivingHome := true;1 j- j( E2 X/ m1 q& ?! C C* {% V
rgManager.tryToStartTransOrder;
/ }2 c9 X. t( J$ y7 o$ I" D6 r if @.Destination = void) S8 Y. o5 M- p1 M+ o
then -- no transport order for vehicle @
) ~ v' z' {" @8 i" d- r& S, ~# W) e @.Destination :=
$ c8 U3 ~% C4 B, w rgManager.nearestFreeStation(@,track.~);
6 f' n4 f! B* P newDirection(@); # q+ P2 Q1 u. w0 F
if @.Destination /= void then% n5 a F2 k' `3 {3 X' |3 [
@.Destination.NumReservation :=1 u6 s( ~( G- G( u0 ? e2 d8 z
@.Destination.NumReservation + 1;
! |# y" U- e8 D; _ end;
" F9 R+ t6 M. R) \% k* `0 O @.CurrIcon := "drivingHome";. f6 @7 \: z3 e* n% I
@.DrivingHome := true;" r4 P8 f3 Y& p* }! R
end;( T: z1 }; B0 w) h# s! h
else -- the vehicle @ is empty, both vehicle and part are in the same dock station+ k( X% A5 l1 ?) z* g# ~* }7 _; t
part := @.transpOrder;" N# Q4 e2 x+ r& m0 I
part.move(@);-- load part" b* Q7 a: r( O1 ^, p
@.CurrIcon := "load";
5 J0 r9 Q3 l, V& D GlobalDistObj := part.globDestination;4 T- E5 Q& W+ H" l; ?0 ^
assignLObj := rgmanager.rgAssignL;' U, ?+ C1 q. E" [$ l% c. q' P$ \
row := assignLObj.getRowNo(GlobalDistObj);- A9 U2 t! t( X! T; Q% F/ p
if Row = -1 then -- since 70
9 k/ P6 y! @' l4 k! V9 m if lan=1 then/ |9 J3 P U' k9 h% H5 G
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
# `1 d) h# T9 B0 T" u/ p/ c) T to_str("in der Andockstation: \"",?.~.name,"\""));, w0 F) K) D( e1 J
else
6 [5 L$ S$ s; u2 a promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
0 y& D! C& o6 S4 Y- a to_str("in docking station: \"",?.~.name,"\""));
; s3 F' {1 L K4 B end;
; @6 K! J& @. H# G- P& N else
* o9 z( y7 w( C0 n* b# O @.Destination := assignLObj[1,row];
, }6 A' U" w! p0 S: x( [$ Y end; 7 G+ |6 P: a, M/ P1 W
newDirection(@);
: d; W- V$ P) v4 p P @.HasOrder := true;# F' Q* D3 w/ d- {" h
end;8 O" N$ w0 P' R, k
end;
3 d7 @ Q6 \5 I! H& X* M1 Qend; -- of the method/ W1 m" c( \( A7 }$ F
|