/* called by: entrance ctrl of the object 'track'
! z* w0 i8 e8 H. `* t6 a U*/4 q* S' K" g2 _* T: _& b, u
is1 B* ~; _' G8 q; e3 Z
part, GlobalDistObj, assignLObj:object;row,Lan:integer;5 o+ f8 p- t* w% B; r n Z0 h
do
/ s0 o; F A" p! {2 {- _ Lan := rootfolder.Internal.Tools.AOLlanguage;
; \0 f1 u4 [! v5 l if current = @.Destination -- else return
+ \: t) c! D( S+ L- U, R( J& s then+ u5 i3 X/ l. U& T
@.Destination := void;$ {- P3 X# w$ y; ]! t' I
if @.occupied then
- y1 h% X' b, e part := @.cont;
7 \( l1 d* \ [4 g1 b @.transpOrder := void;
! u$ {/ {% \5 b! _7 |4 n5 c part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,: c4 X( K- \) j, U
@,root.eventcontroller.simTime);
7 i# S( x/ {1 S$ U/ } @.HasOrder := false;5 H3 e! }: c8 h. }3 e9 k# T3 A
@.DrivingHome := true; f l, f+ C8 [/ T2 v5 k
rgManager.tryToStartTransOrder; ^, ? X5 _4 C- [5 U3 N
if @.Destination = void/ h; L8 ~% m& ] D; n
then -- no transport order for vehicle @; E8 K1 q# j7 _, V) S
@.Destination :=
0 d& ~: P8 h' E4 J0 u+ p0 c rgManager.nearestFreeStation(@,track.~);; d# H7 [0 i, P
newDirection(@); $ W3 G' b8 ?6 w7 K7 i. b g2 G
if @.Destination /= void then
+ y8 U6 i' z7 R; d1 z- l& i0 B4 @ @.Destination.NumReservation :=4 @7 e; Y; P$ M
@.Destination.NumReservation + 1;& Q3 }+ W! K0 n5 q9 A
end;
+ u% i2 f- b& a; c2 V' z1 J/ j p @.CurrIcon := "drivingHome";
4 z2 n9 s; T( \+ @! c @.DrivingHome := true;4 U; j. e) ^$ Z0 j& r
end;; }) E: ^* P/ M+ M
else -- the vehicle @ is empty, both vehicle and part are in the same dock station ~0 T4 ?1 c4 p& U' e, h/ n( O
part := @.transpOrder;
! ^( `4 M" C# @2 Z( r6 R5 S part.move(@);-- load part
0 B# d* J: s7 L4 o/ l @.CurrIcon := "load";. N7 Z- M% |* R. ^% I% K( }
GlobalDistObj := part.globDestination;
2 v: D; G9 m' Z0 J assignLObj := rgmanager.rgAssignL;" F* { R/ Q9 V6 w2 i# ^
row := assignLObj.getRowNo(GlobalDistObj);% S) ~' G$ ~9 n1 o
if Row = -1 then -- since 70
# J; k b8 l' Y f7 ?9 X if lan=1 then( S. j- ?% M9 [$ }2 g( h7 N2 _# L
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
. m( P* ]7 Q, E$ a- H1 ? to_str("in der Andockstation: \"",?.~.name,"\""));2 @5 S& }1 C) l& V- F
else
, G, m9 l) v6 W( @2 M+ J promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
+ q& r. Q4 _ t ]9 ?3 a p to_str("in docking station: \"",?.~.name,"\""));
( M* _- Z* T6 ^$ S; H% o+ L end;
( R, A, Q0 e4 V- K# X1 l8 P% E else
1 U4 K' a! Z: n6 H6 j2 Z0 K5 f! @- r @.Destination := assignLObj[1,row];5 q# o# ^' f% F$ Z
end;
1 Q/ K3 v( q1 m* C+ z% s newDirection(@); r* `1 ^8 ?$ Y8 m6 Z& J% [! X
@.HasOrder := true;' ~) X" I7 ~6 t9 D; ~$ ]
end;9 q: O0 A, T: j _+ _- W
end;
; P/ Z- n! _9 S" d. f8 i' J0 ~- S7 j) nend; -- of the method4 O) c! K: E Z) E3 R; h" {4 H% ^
|