/* called by: entrance ctrl of the object 'track'6 O* S. Y( Z# y1 e. Y" _
*/
' N Z% _4 k9 i! H4 M/ C* wis; y8 K" K \* f) n$ P
part, GlobalDistObj, assignLObj:object;row,Lan:integer;. O- x: k. C1 i* H# k( D5 q
do4 E6 t: b0 ?( n9 L
Lan := rootfolder.Internal.Tools.AOLlanguage;
& J; b7 m6 y4 Y) T7 M6 G- U& y, l if current = @.Destination -- else return
# O0 G: t- i. Z0 \! U$ n& D then! t: \6 S6 O1 @. ]8 B
@.Destination := void;0 j( L6 K$ \3 o3 \) ?: Z- D0 V( O
if @.occupied then
5 _( w N. q; d8 E5 { u part := @.cont;
- t+ f8 r, C1 f5 Z" B0 u @.transpOrder := void;
. \' M) u0 N0 i2 p' Q8 m! V part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1, ~0 l# q" r' X) Z# A: v, N$ _
@,root.eventcontroller.simTime);
; X4 F, S7 i; c3 Q* f! z: h @.HasOrder := false;
# z5 [$ r' y$ v6 h1 ]+ M% z. ] @.DrivingHome := true;
# O! R) N/ o- A0 z rgManager.tryToStartTransOrder;6 l/ {4 |" I! _; D Q
if @.Destination = void _- c2 `4 t4 W% J' J
then -- no transport order for vehicle @
4 x' c1 g9 D1 T- t @.Destination :=. C) U* Y/ {7 s- b
rgManager.nearestFreeStation(@,track.~);% M. Y. Y3 z% ^+ d, ~) Y2 c' Z1 v! V
newDirection(@); * |4 R2 c9 c& q, ]( C
if @.Destination /= void then+ i& p% b" ]2 M" a: j0 T
@.Destination.NumReservation :=
& j* y3 ?# O# Z" N' z+ T @.Destination.NumReservation + 1;
6 \; Z4 V, Y* A: N. Q9 l end;
! \# Y; F2 g/ o0 i8 b @.CurrIcon := "drivingHome";/ M+ y$ N7 S9 r! o/ T, ^- s- f) ?. [1 {
@.DrivingHome := true;
7 g4 d7 D0 A! s }* @) a4 P Z end;
/ Z4 m+ w% f" v9 R% ] else -- the vehicle @ is empty, both vehicle and part are in the same dock station$ B) c8 Z! k: i, P: r0 R& G
part := @.transpOrder;5 J' J" A. i" ?/ k
part.move(@);-- load part
3 w, N% {- m! X; m" N# A7 G$ T @.CurrIcon := "load";4 ]4 U6 U. @; b% _
GlobalDistObj := part.globDestination;
2 M1 a7 S4 X, L8 U+ [ assignLObj := rgmanager.rgAssignL;
/ U* E t* w3 D2 r, m4 ]+ T row := assignLObj.getRowNo(GlobalDistObj);
# G+ i$ w" @; ~ f0 v! V) M2 f if Row = -1 then -- since 70
o* N, k! d6 M! {! h# T if lan=1 then
" Z# N+ O5 f; B promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
3 \. A Q+ v+ h to_str("in der Andockstation: \"",?.~.name,"\""));0 {- Y0 e# I) {8 q7 {+ G- e
else/ k0 e& ?1 R, f! s+ E: \5 c; w3 Q; T
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
+ ]$ z# e. ?! H( D, q8 E+ U to_str("in docking station: \"",?.~.name,"\"")); 3 c w- o% Z1 H7 [) n+ T
end;
! a9 |: d* ^3 x9 {9 m else; m4 x5 |) L [$ u4 c* j0 m5 g8 C# |$ I0 O
@.Destination := assignLObj[1,row];1 K4 Q# y7 M$ u6 h
end;
( @; |4 u0 f) v& Y newDirection(@);
- T# s* g+ T, x& K" P$ ]3 b* c6 _ @.HasOrder := true;
! [" [ u% K( W9 p+ _2 n# ] end;1 X4 ?. m e1 K; Y" J' E* p: q
end;
5 u' a* e1 T. ]% {( qend; -- of the method5 i6 U9 U; V4 L6 T9 i5 |3 J& M+ O
|