/* called by: entrance ctrl of the object 'track', w. n% C* I4 E2 n& J; x
*/' n5 _/ ]. F; X7 R! s
is& _: p, u$ B- M" A! }( ?# F% @
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
# ^# Z) R- L# T9 u$ jdo
( m% o/ M5 S- c# P" ? Lan := rootfolder.Internal.Tools.AOLlanguage;
2 ~7 J6 C/ U% _7 Y9 T, Y if current = @.Destination -- else return
2 D' P# Q; y# N6 J0 l then; U$ h* U* Z5 y2 V
@.Destination := void;, J* ?6 A- ~: J, {0 o' F
if @.occupied then
) f" n6 _% U4 Q* _/ Q part := @.cont;
- f3 q) @2 {$ x- E @.transpOrder := void;, l7 U, B! S6 ^& U2 V. u
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,. \6 v8 u( ~( x1 w! f8 o$ Z4 c
@,root.eventcontroller.simTime);2 B. o0 S% F b" D. \
@.HasOrder := false;
# s3 M, I I, j% t @.DrivingHome := true;
) E3 a8 T" }* | rgManager.tryToStartTransOrder;' u+ Y9 U- C7 [7 @% x1 q
if @.Destination = void
& @4 s* n( G6 G& G0 ^2 ^1 ]# y- k then -- no transport order for vehicle @& h+ H" l, A x: m4 J- F
@.Destination :=2 `8 s1 n4 z* y, ~* G
rgManager.nearestFreeStation(@,track.~);" }3 Y1 ^- S" F2 v/ ~; t( J; x: t
newDirection(@); & |9 x' J8 L7 A/ |
if @.Destination /= void then& G* U, z5 W) Q. B- \) g
@.Destination.NumReservation :=
, E2 m; D0 I4 a. z @.Destination.NumReservation + 1;5 D4 U" ^: F6 r* J/ o7 C5 o- s
end;! V2 J6 j! h% W3 [. j
@.CurrIcon := "drivingHome";% m9 `1 w& S3 j7 @
@.DrivingHome := true;* A, z; n, c `( O+ a2 W- P
end;( p- |1 [+ s) E+ }( E5 k; p- n' }
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
& ~3 K1 B0 v+ y1 c# p) } part := @.transpOrder;
. s$ e1 g5 P* P+ A part.move(@);-- load part
& j [7 ]- |4 D0 P1 h# B @.CurrIcon := "load";0 O& w, n5 o7 ?) f7 o$ `
GlobalDistObj := part.globDestination;8 ~2 s1 G% N+ f/ C
assignLObj := rgmanager.rgAssignL;5 [: g; V. M( C, d; G# I( I
row := assignLObj.getRowNo(GlobalDistObj);( J0 H Q9 @1 w$ h6 W- k- C
if Row = -1 then -- since 70
, c( J/ I: e% P( I K6 v3 d if lan=1 then
+ T4 f" B8 e& V. E. M& N promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),$ X4 h8 e& D+ V" B4 d) s( _7 [
to_str("in der Andockstation: \"",?.~.name,"\""));
" U7 K( V7 C7 x T i3 _- h' X7 W5 A/ p else2 {, q& o6 Y2 ^
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
3 a; \& V6 V: ]+ H6 J: j to_str("in docking station: \"",?.~.name,"\""));
' X8 M" R2 B& D end;
$ Y* l$ A4 e r8 F# I else. ?& k0 j3 N: d! X
@.Destination := assignLObj[1,row];8 r* o7 G. r: }
end;
! g% L2 E& j; ^# v newDirection(@);4 ?7 T5 H$ U9 N3 Z. w
@.HasOrder := true;
! J. t8 W. A: M8 \' W7 | end;+ M, L: U: q) {* E* z w
end;# @8 M/ w Q5 y7 Z. |6 {8 Q g: k
end; -- of the method9 m% i0 c' J! e+ B A' C: N
|