/* called by: entrance ctrl of the object 'track'
2 }6 z) ^. E9 S& Y*/
5 S, T8 n2 F6 qis0 k7 z/ B f8 y, r3 [* a3 w @( m8 I
part, GlobalDistObj, assignLObj:object;row,Lan:integer;& e K* z F3 o
do
6 A1 C% u: b3 ]6 B- k0 R Lan := rootfolder.Internal.Tools.AOLlanguage;; z9 b1 I8 l" L i* f# z0 y
if current = @.Destination -- else return
C; [. g4 T9 g then
0 a, A$ ?% A/ U @.Destination := void;$ o8 P% l8 K2 e$ |
if @.occupied then4 d( \$ S7 g( G+ S! Z
part := @.cont;
- O6 M2 `7 w" d- f2 A! R1 A @.transpOrder := void;
; _( |0 e" {6 V5 [. I1 D part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,3 E" L. G. t# x J( E$ ?# v
@,root.eventcontroller.simTime); ]! e; \- c9 R- U/ @
@.HasOrder := false;
9 I+ g) s; ~4 l" @ @.DrivingHome := true;8 `* }+ b, n; P( J$ e8 g
rgManager.tryToStartTransOrder;
0 J! v, \- E- X: | if @.Destination = void
& m; s! y" b$ ?$ m2 I$ D5 M then -- no transport order for vehicle @5 H1 s" p+ j' f! [5 S
@.Destination :=% S7 p0 S- ]6 @( v7 o+ b
rgManager.nearestFreeStation(@,track.~);
* u0 b. }7 P1 W" m9 b4 t newDirection(@); & H9 p" B' k1 ? Z
if @.Destination /= void then
& W5 {* D- C [* D6 i7 N @.Destination.NumReservation :=
6 X( j" l3 H1 a3 I, [0 v3 r6 u @.Destination.NumReservation + 1;
5 f$ C Z5 c4 m: M/ y end;0 ]- X6 B0 I! B3 r6 Z L5 b
@.CurrIcon := "drivingHome";
1 z% u" }" Q$ @7 v) y; o @.DrivingHome := true;! I* W& X5 s9 N; M6 a
end;* c4 M0 g$ ~6 w( ]
else -- the vehicle @ is empty, both vehicle and part are in the same dock station! n% C& P" W" i/ d. y3 j
part := @.transpOrder;6 H# M# c. e' X* l/ N" e! U# y
part.move(@);-- load part
b: O7 N1 k* g @.CurrIcon := "load";7 N4 ]7 @9 K1 V
GlobalDistObj := part.globDestination;& V6 `5 ?8 C) K3 a) w) V* T
assignLObj := rgmanager.rgAssignL;
6 X4 g* M) \( o. ?$ t row := assignLObj.getRowNo(GlobalDistObj);: ?; y3 H4 ]/ ?! u( q# g" l
if Row = -1 then -- since 70: h6 v) B2 a% W$ P. g! w4 ]
if lan=1 then
5 u) }+ D: y9 {8 L5 S9 j& W. p promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
( F: D( X! T7 w' F& Q, R2 b% a) V* B to_str("in der Andockstation: \"",?.~.name,"\""));* r5 ~6 {: U+ G' |3 h v' } K0 V
else
2 C$ f1 c, k K @ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
( i0 W* F2 K: L! { |# O to_str("in docking station: \"",?.~.name,"\"")); - |# q. S {) O: ?( T3 k
end;
" d5 U; y; `) D$ R else
6 F# X" j3 z) h8 Z# K @.Destination := assignLObj[1,row];
! G" p- ]1 y6 J* A! e" f V& x6 S# z end;
- ~- q! y+ ~4 I0 ?" D newDirection(@);4 P4 Y, G/ X! `2 r' }! o+ o3 L$ a
@.HasOrder := true;2 y1 o* L) t# ^) u. t
end;" W# \' h l- L6 X, r
end;
/ k {5 L/ N$ h( P. J% [2 vend; -- of the method, M. @ U/ k4 `( F- b2 \7 ~4 B: H
|