/* called by: entrance ctrl of the object 'track'
) y' \% O4 ]: j*/7 x2 }: C" g! @: E E' E% w
is8 T# N. g3 r F- o( v
part, GlobalDistObj, assignLObj:object;row,Lan:integer;3 P1 N O$ |- N# i* M' H, t2 X
do2 D9 y: t- }7 B! r3 E
Lan := rootfolder.Internal.Tools.AOLlanguage;
+ ^5 f% h" |' L( ~6 R) x/ c1 _ if current = @.Destination -- else return
@) |- @% f/ q% L% w then
4 O7 h/ ]0 f8 B0 V: L* w: g; n @.Destination := void;6 s/ [) l" m* E; e! v: H0 L
if @.occupied then/ I9 e' Q! h$ G5 Z, t, {2 ~# t p
part := @.cont;
. M" `& O7 I7 T/ D0 l2 d @.transpOrder := void;
4 W7 u- z6 s4 D& l, u; A part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
! v7 O1 D) o7 C @,root.eventcontroller.simTime);
; R/ s' E' P' x1 q+ P6 ^9 J @.HasOrder := false;7 q, L! ] [. E& r
@.DrivingHome := true;
' ^! d) f) W% l- _" p8 N) W rgManager.tryToStartTransOrder;( L, y3 J% i' S' x; ^% Y I+ Y( j
if @.Destination = void
. ]& L3 [% l1 Z3 N then -- no transport order for vehicle @' [$ @7 v1 F( `1 s7 X
@.Destination :=: R+ F- l( f+ Y3 m
rgManager.nearestFreeStation(@,track.~);6 X* R* | ?( |# F# _
newDirection(@); 2 I6 q* i4 F# B( d$ y c! w7 V$ N
if @.Destination /= void then
+ h8 Y0 o7 Q- b3 ~, X @.Destination.NumReservation :=
# Y3 Z0 E1 z7 Y* O5 r8 P' | @.Destination.NumReservation + 1;$ W3 Z" C# l% k4 k3 v4 y# s
end;
% t( `! g8 c, \: I; f @.CurrIcon := "drivingHome";
4 e" S2 c8 N0 |! R3 b& ?( l N @.DrivingHome := true;7 E' k0 `6 u6 W
end;8 ^! Q1 a& u3 Y; }2 T' O
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
1 g& m: ?( W5 @$ N part := @.transpOrder;
7 j. N5 X. s# H5 {+ t" t part.move(@);-- load part
2 V, W" c. b( }" O5 S( v$ ~+ s* a @.CurrIcon := "load";
2 ~$ e r. C+ K$ @ GlobalDistObj := part.globDestination;: i; i4 [- }' k- N( g
assignLObj := rgmanager.rgAssignL;$ r& f# s4 V# `6 ?
row := assignLObj.getRowNo(GlobalDistObj);
+ u- c4 Z" g. S- o( j if Row = -1 then -- since 70
- T$ N# \1 @1 _" `9 ~3 W if lan=1 then, l( m; Z" U" w0 x8 j
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
, K0 R0 p0 v8 H to_str("in der Andockstation: \"",?.~.name,"\""));2 X& T7 _% k" A8 @" I1 O
else
4 q( J" X6 [$ F6 N4 i2 { promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
9 j, F- O- V5 z1 q; l0 M to_str("in docking station: \"",?.~.name,"\""));
- {( i2 P9 p: |+ | end;
4 ^% v+ `/ U; I) u else
& h( H! k* i! }, H, F6 W7 a: H @.Destination := assignLObj[1,row];1 ~% I2 _; D$ f
end;
: n3 @ U, Z/ O* T! b newDirection(@);' m0 _+ c$ C7 w/ B$ i% z- {: m! t* b
@.HasOrder := true;
, [: s& [% m( N+ Q- z end;
' J0 s3 \5 {; H end;
5 `& U( t+ }# n* Vend; -- of the method* [0 j; {6 s' ?1 v* Z0 I
|