/* called by: entrance ctrl of the object 'track'
. E: f4 O. D, ~7 T6 N) D*/
9 Q, c& U( u; I$ b# g, Wis: k! E5 A# l! ?* J) D( @; h" ^
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
1 U$ H# {/ \$ _( udo. k! A: P, f6 d/ o$ P8 v
Lan := rootfolder.Internal.Tools.AOLlanguage;1 d8 U+ J2 h# i M' n* C
if current = @.Destination -- else return$ {5 g% I8 l' k! j5 S
then
0 x- i( @# ]4 r1 G @.Destination := void;/ ?" G% M: k5 M8 R) a" i& e
if @.occupied then/ w! B8 S1 K5 p& Y% Y4 {
part := @.cont;2 ]4 i( p! p, L, h" g
@.transpOrder := void;
8 T9 ?0 e$ z1 I% r part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
; a( V* r9 R% e9 L7 d2 r6 A5 @ @,root.eventcontroller.simTime);
& ^* v% H- m5 k4 S @.HasOrder := false;
4 \$ J' Z3 F0 X9 S: f& H/ `$ {2 b @.DrivingHome := true;
' I6 o& j d0 y' h; s2 n: G6 X% ~5 H3 Y rgManager.tryToStartTransOrder;. |7 F7 V5 f' ~! ^# G
if @.Destination = void
2 f% d: l5 j K: y2 V/ [9 K then -- no transport order for vehicle @
) b* _& O1 U$ t4 D ~' y6 T @.Destination :=
7 x) P6 u- @! n. {, P a3 u4 P rgManager.nearestFreeStation(@,track.~);' X! P. V) N; P- v# e& M7 `2 a; H
newDirection(@);
a0 s' h1 D& y. c# |+ H5 J7 | if @.Destination /= void then7 |, {4 \& [& f/ I- @+ H' I
@.Destination.NumReservation :=' r5 n% D& F( N
@.Destination.NumReservation + 1;
- N. b* h5 \+ e- X end;8 o6 S& R! m5 n$ U' W7 C
@.CurrIcon := "drivingHome";3 \$ N2 Y- @0 l( G1 D0 i1 K! y
@.DrivingHome := true;, A2 ?7 X6 ~% D: {3 E) Z) a
end;
8 f3 S& \* W+ `) U3 H5 o else -- the vehicle @ is empty, both vehicle and part are in the same dock station
3 ]1 y9 n7 d% e% ` part := @.transpOrder;
4 k+ V6 _& n" A: y! @, x3 n. e part.move(@);-- load part3 j& r$ X3 m7 {7 X" k
@.CurrIcon := "load";
/ F1 J! E* V" E0 i# D8 T4 c GlobalDistObj := part.globDestination;6 K$ b' o' R2 c( v' n
assignLObj := rgmanager.rgAssignL;) O$ S6 l m$ q1 c
row := assignLObj.getRowNo(GlobalDistObj);
{! Q9 e, P9 Q$ `! {% m1 V if Row = -1 then -- since 702 Y! _' [* K- {) B+ a* M
if lan=1 then
" ]0 z# v' v7 Y1 S& W- b" X0 D9 D2 P promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
! u& F2 a) j+ [* j, e to_str("in der Andockstation: \"",?.~.name,"\""));" X1 @' V9 n" K' F( a! q: V q' u
else
8 E+ o9 B9 W& g. B+ X4 K5 [ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),3 s t7 H' _' v1 h- {
to_str("in docking station: \"",?.~.name,"\"")); 6 d$ o# `" f( U7 ?; j& K
end;) Q( S" Q- J% m5 ?0 Q: u
else
0 l0 J3 ^) j" d5 M! `7 m @.Destination := assignLObj[1,row];- A. q# {7 Z$ w4 r8 }7 \% K& S
end;
" U5 r' H9 r: ^* P- o newDirection(@);, p$ J$ i2 Q: w, ~% L0 b1 \* }
@.HasOrder := true;
' U) Y y2 X) } end;
: g: g8 i3 x7 ?& V end;
' @% ~; E2 P0 M5 ^# I' Rend; -- of the method8 }4 A5 ~5 B0 [3 p. t
|