/* called by: entrance ctrl of the object 'track'& P5 n: H! }/ x$ j& J
*/
) a- T" `& f$ r: Dis& n2 _6 u" z- W5 ]. \: f9 q/ Z2 |
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
9 j+ J+ W- U: i4 B c( N% s: Zdo+ y6 k/ y6 @3 w$ E
Lan := rootfolder.Internal.Tools.AOLlanguage;
1 @: T, v1 d9 w9 i3 Y if current = @.Destination -- else return
/ q3 k5 `" Q' C) @# z; w& G" O then( Q5 k! A V( H& A0 C5 |
@.Destination := void;4 {1 G; F5 v2 A+ e0 o+ A1 E* s
if @.occupied then
. j$ z: F+ s) f( V part := @.cont;/ u6 Q8 d- Q, q% Z
@.transpOrder := void;0 Y a) a4 c( `, o9 J9 ]
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,! x1 O+ u4 C; {% y! y
@,root.eventcontroller.simTime);4 O* B8 L' r" `1 u0 R/ h: o, g
@.HasOrder := false;
2 p1 x- N! L; h( f; F4 A' w p% L3 a @.DrivingHome := true;
3 a! g7 P) O1 M rgManager.tryToStartTransOrder;" f7 [# T0 |! J7 ?1 S
if @.Destination = void
8 @* m+ ~$ @) i7 w' i U- U. X: ?; T then -- no transport order for vehicle @
- X- s& r2 ^( g8 d0 ?: f @.Destination := {, E5 f) A) ]! N; K4 _: ~
rgManager.nearestFreeStation(@,track.~);: ?! [/ R6 c7 P& U! a
newDirection(@);
4 Q5 d/ ^2 {* @1 `3 P! H$ I if @.Destination /= void then
/ d' f; G" J3 T: m" ]' Z" I3 Z+ \ @.Destination.NumReservation :=
1 M9 w6 l. t- D0 i @.Destination.NumReservation + 1;8 `% j5 F3 @. n/ H2 S- }
end;
- o) o+ Z- e( Y' ] @.CurrIcon := "drivingHome";8 K1 o; [! Q' e U
@.DrivingHome := true;
; U/ {- @: ~5 b$ d( d6 u end;. d6 g4 I, \6 J% R2 n$ r* ^
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
i, s6 k& w& c$ s part := @.transpOrder;4 S: R/ i9 O8 G( o+ ^
part.move(@);-- load part1 g7 b$ f( M! @7 K0 K1 |
@.CurrIcon := "load";/ C6 C& \0 g% I! y& A c9 o
GlobalDistObj := part.globDestination;
; t0 X) f! Q! A6 Y: } assignLObj := rgmanager.rgAssignL;* C- h, j% H) v+ f! {
row := assignLObj.getRowNo(GlobalDistObj);; z9 q1 v+ y( c3 k
if Row = -1 then -- since 70: E, _ h' R& ^/ Z) Q/ \! D1 o& W
if lan=1 then
* _2 X9 K/ t$ ~( i7 c promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),* _4 E3 A. G; F# q
to_str("in der Andockstation: \"",?.~.name,"\""));8 M1 w0 H0 K0 O# \
else
7 ]8 c& s, M! Q' |; i promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
0 B$ X* k& @& Q6 a4 i, L- Z( Z to_str("in docking station: \"",?.~.name,"\""));
7 n y/ \- U/ Y: {0 `5 b) M end;- X& N' g! X1 ~3 f/ @3 R- w
else
! B; s- V' c9 z4 S7 D; | @.Destination := assignLObj[1,row];; p5 _* }1 R* I5 T' l
end;
# E1 |1 o' V j1 e+ B+ V newDirection(@);. J. w& S$ B) s$ T/ R
@.HasOrder := true;1 r, `+ Z4 `, }- Y( U( r
end;
( z5 D% c4 x9 a% k. M* L end;
. n) I6 G2 u' ?8 }end; -- of the method4 r1 L. ]9 m8 n
|