/* called by: entrance ctrl of the object 'track'
7 I; L: u) |: k0 d r*/
+ _! [5 E8 O% K7 f" `; Fis9 ?' g9 ]( u" a5 E1 ~* e4 E( C
part, GlobalDistObj, assignLObj:object;row,Lan:integer;# k: J% z$ l* `+ [" k5 U: o2 F2 C
do
4 g, s6 \& P/ [; @* \8 p" ^ Lan := rootfolder.Internal.Tools.AOLlanguage;
9 q, |- [1 p( E" S- b6 C5 _. H if current = @.Destination -- else return
: m6 o N* I! |( g9 l then
1 r; B" f6 T2 e @.Destination := void;( {/ y. s+ {# L9 \! G
if @.occupied then" V, j8 y# n- x
part := @.cont;$ _0 `. I. Q {" z* V8 \( b+ v. J" ]
@.transpOrder := void;
9 H9 O7 z9 k& r) x4 i8 U part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,! E9 F3 a$ U0 x1 ^. [
@,root.eventcontroller.simTime);
# E7 {6 ~) G0 Z: q! d x; e- _3 N% A: n @.HasOrder := false;
F8 n* Z i! T2 g5 F @.DrivingHome := true;% D) L$ I8 y. u! i' t/ n
rgManager.tryToStartTransOrder;; D1 P% i/ y j; H; e5 M; ?# [
if @.Destination = void" J& F/ s7 g4 S& j0 A/ m; s
then -- no transport order for vehicle @9 w0 W; p# o" H$ I U
@.Destination :=
! s- Y3 M4 H! ` rgManager.nearestFreeStation(@,track.~);
* i. ]" x8 Y% [4 Y0 L% k newDirection(@); ( P$ U5 M( d' g& z0 x- t
if @.Destination /= void then! |: X2 j; K7 I- ^! q8 @
@.Destination.NumReservation :=1 R5 T1 X+ g" k! O- M
@.Destination.NumReservation + 1;7 W U) ]8 u. f
end;. V1 ^# h. P! l1 [) d
@.CurrIcon := "drivingHome";: X1 T8 g& O# {$ d( h
@.DrivingHome := true;
9 C& i* a$ h- m0 u, b: l: l end;3 @" D' G, j5 t; ^" L4 ~$ M, H
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
5 }$ J. B3 n5 f/ j0 d part := @.transpOrder;
' Y, Q1 M _, ^ part.move(@);-- load part
# p! t$ i7 h, l( x8 Y @.CurrIcon := "load";, g) {5 t. O3 b& q, v* a% E; Y
GlobalDistObj := part.globDestination;. g' T0 [% q$ L' L1 ^
assignLObj := rgmanager.rgAssignL;" d, t- k! f0 C' ]
row := assignLObj.getRowNo(GlobalDistObj);
+ r/ U- K5 V1 W; ~) v4 H$ J if Row = -1 then -- since 70
3 D, I- z% y9 v! p3 P9 `1 s if lan=1 then+ K# f9 r! T3 R3 o- X- k
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),% G( f9 H6 b% C& e5 }
to_str("in der Andockstation: \"",?.~.name,"\""));) w/ d. C: p1 R8 |* r, w$ ?
else
! c6 c, w3 m; X6 j promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),- U* Q8 N- z, B! C+ X: }
to_str("in docking station: \"",?.~.name,"\"")); / X$ U0 f% h9 w3 V
end;( i. v! P# D9 U
else
: v5 N W3 [; }1 t5 L$ h5 q, o+ Z @.Destination := assignLObj[1,row];
$ Y/ n$ Y4 G. e Z: ]5 s end; * P5 q" e" Q" Z r9 T. Q
newDirection(@);# z( I; |4 B5 X3 t R
@.HasOrder := true;* x* \" U6 h8 E9 P4 r- m$ `
end;
& c* P$ ?: N) s9 S: }' }1 J4 V end;7 u4 e% a$ Z7 O3 p! u3 W
end; -- of the method& D9 V/ }/ \2 j# x
|