/* called by: entrance ctrl of the object 'track'
. [+ w# ^4 R- S! r% y*/
8 W8 L2 p) U; q% cis) N+ S1 P8 [; s+ G5 n, e& H/ P1 m
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
: ^/ t$ ~6 Y7 ^2 d1 l( A3 i+ i) N& ado A1 q# F8 i6 L3 o( {- _- f
Lan := rootfolder.Internal.Tools.AOLlanguage;
# y/ l9 E' E- c. ^ if current = @.Destination -- else return* S0 p6 i- Y7 \2 E O2 I
then
5 V, v+ L' t% D: Y @.Destination := void;( d5 }1 F5 h$ e
if @.occupied then
% _ E- }' J# | A! s- x4 N part := @.cont;0 B$ N4 j1 f9 f1 A! k E" \9 x
@.transpOrder := void;1 r+ J6 c% f* r& @8 q
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,5 `# g2 E# `' w) K+ u' b
@,root.eventcontroller.simTime);2 Y& K6 z$ R4 Q1 G
@.HasOrder := false;
3 r; {7 `& k4 l' O+ W ~8 ^, s @.DrivingHome := true;
3 a" p9 ]( j% [# V rgManager.tryToStartTransOrder;5 c8 M. d5 U g9 p4 O
if @.Destination = void$ Q' w! y- i: O' s. c8 E3 _
then -- no transport order for vehicle @
m3 }( g; ?/ X8 f4 v l5 [* L* f @.Destination :=% z& K$ G+ C6 ]3 ]9 }
rgManager.nearestFreeStation(@,track.~);1 d- _' M: d* F; n# ^8 Q
newDirection(@); & M2 }& ~# p z: c$ I) ? Z
if @.Destination /= void then5 }+ n8 Z E( B( m% ^% ~2 a5 F. _' o- V) V
@.Destination.NumReservation :=
! k7 `/ r8 r2 e# C @.Destination.NumReservation + 1;
. y d& C# E$ T/ G) i m2 K end;
4 k8 ]+ a! {8 L+ u" Q @.CurrIcon := "drivingHome";/ E, ?' P6 I: k P, {1 s
@.DrivingHome := true;
B. g7 H6 p7 M ]$ M end;- ]( V+ v) `8 Y7 r4 j8 K
else -- the vehicle @ is empty, both vehicle and part are in the same dock station- d, ]: ]3 w$ j
part := @.transpOrder;
4 d e4 v$ S: m part.move(@);-- load part
% b1 |8 [$ [" J1 T( v @.CurrIcon := "load";
: M! ]7 a2 F; m( `. H: | GlobalDistObj := part.globDestination;4 [$ W1 h1 W/ N: e2 m7 \% T
assignLObj := rgmanager.rgAssignL;
8 m+ t8 I) X6 A7 r row := assignLObj.getRowNo(GlobalDistObj);. r* ^* L3 y: t d# O: r
if Row = -1 then -- since 70
1 N. C0 Q5 q6 W% | z" Q& E) u) { if lan=1 then$ _# p+ j8 g: W
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),5 m# v8 n1 y& {5 {8 s, S
to_str("in der Andockstation: \"",?.~.name,"\""));! l2 d( R1 {- z' B! f2 [8 H
else
+ C( e* t; @" D2 m2 Q2 W promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
$ A2 Z/ ~3 H0 g# ]- r# f O to_str("in docking station: \"",?.~.name,"\""));
3 ~+ J$ ~. H& c% N6 U- R6 }- n end;5 j: H9 s# d% R; l6 [5 j$ w6 M
else
; H3 Q3 N& K4 M+ v1 J @.Destination := assignLObj[1,row];
* i+ F+ J; W, P/ T1 i! k9 N end; % g# H* k& r/ I7 F: B# o
newDirection(@);3 F+ B7 ~; ?' U
@.HasOrder := true;* g* }, B# q: N+ C% t( H4 a
end;
! D V9 H3 W( D end;
7 i: C& o2 I1 `+ ?+ N/ Pend; -- of the method
2 K- o, C' Y; @1 ^ |