/* called by: entrance ctrl of the object 'track'
4 }3 x' O/ T1 S6 C8 N*/
( R7 h+ u, m. w" k) ~ \is
3 v) H2 o. V. T part, GlobalDistObj, assignLObj:object;row,Lan:integer;
7 T: c2 y' g Q1 Hdo' R6 {" E' d- p, @$ A7 @
Lan := rootfolder.Internal.Tools.AOLlanguage;' ~0 }8 Q) ~' V9 B/ z5 |4 Z7 j
if current = @.Destination -- else return
% i, |* S. H; X' P( L% d% n/ A% Q then
# g( K- @. a( m @.Destination := void;5 {5 I6 |, N) w) q
if @.occupied then" g0 D: r f- P# L. E( V$ `
part := @.cont;9 F2 h$ G. D; k- ]+ Q) e1 {
@.transpOrder := void;
6 N" z* g6 N8 J; G: s4 z part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,5 t0 R t+ ~( v; p6 E9 y4 |* o" y
@,root.eventcontroller.simTime);3 C7 i( Z7 _4 u: l: F4 ~
@.HasOrder := false;
$ y2 c* H9 B, O- H1 r' p% w* T @.DrivingHome := true;
. Q( n3 r" e- `' E; N- { rgManager.tryToStartTransOrder;4 m. C$ ~; W; m. K0 I$ _/ f+ Q' \1 i
if @.Destination = void
3 I2 b5 H% W2 m* G then -- no transport order for vehicle @
6 @9 D# n/ i/ g" n% v @.Destination :=
" g& W# e, [4 K. `- |3 S5 v S5 ? rgManager.nearestFreeStation(@,track.~);, M6 x6 R4 j- b4 k8 m& v ^: n
newDirection(@);
8 ?# ^* n* _! C. K2 k0 p: @0 Z if @.Destination /= void then
8 m. |: Y4 T. B. D, P @.Destination.NumReservation :=) K% \( A! `" Y9 ^% n4 N
@.Destination.NumReservation + 1;+ ]! D1 K+ y' r' l, d! |0 n. Y, u
end;
) ?6 h& I7 F6 O @.CurrIcon := "drivingHome";. j, z3 W) X& r2 u$ G
@.DrivingHome := true;
/ x* C, L' i6 Y) x1 L end;% v5 i6 S1 N0 c; m% `! |% @% e
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
8 ^5 u* q/ U9 b% L part := @.transpOrder;. i+ r* ?4 S: J3 F/ [
part.move(@);-- load part+ ]* v* ^+ j* ~8 Y# Q0 s
@.CurrIcon := "load";
% p2 x2 C/ Q) Z; ^; ?: K# ^/ \2 B GlobalDistObj := part.globDestination;$ B3 n4 A1 Z7 t& v L
assignLObj := rgmanager.rgAssignL;( f3 N8 F9 a' `8 M0 d% g' U
row := assignLObj.getRowNo(GlobalDistObj);
8 z+ `* K0 s/ w$ h% d if Row = -1 then -- since 70
* J& Y2 U4 o+ v/ Y$ j' c& m# M, { if lan=1 then7 ~* w& P) K5 T9 l( D; D0 W% S
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
" J. X1 r9 i- X to_str("in der Andockstation: \"",?.~.name,"\""));/ `- p, j4 _/ o4 J3 `1 @4 o) W1 M! K
else
0 s3 ]/ G0 Q) ?& L2 |$ r9 D5 A promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),+ |, u2 m. ~2 }4 Y5 a k" B
to_str("in docking station: \"",?.~.name,"\"")); $ S# N8 G2 v. p4 i
end;
+ S: L: A! }2 a2 g% L3 S; R% m else: C* }, e% i6 i( r( R; H% d
@.Destination := assignLObj[1,row];6 H/ k! K0 ?7 x7 f$ ~
end;
0 V1 k6 z& n! u9 R3 n }6 H4 Y newDirection(@);$ s% J+ C# [7 K7 }6 N$ V& r* ^
@.HasOrder := true;
' G2 W n6 d4 s4 d4 ^% U2 o end;
& F2 J9 Q. i/ B2 P3 x) ~ end;+ d& D5 U4 N1 h- B. o: d/ Y
end; -- of the method2 @, I+ K; X+ t* Y+ `+ o' z
|