/* called by: entrance ctrl of the object 'track'7 a* E1 P$ G+ K' g/ U# c
*/
! I3 x+ J- P7 a/ {7 A; ^' R: his
2 I. x c0 G+ L$ q( I) y part, GlobalDistObj, assignLObj:object;row,Lan:integer;
' K2 L R9 g1 n! H- n8 P" xdo
. |" @ Z$ g- s X4 N6 ^/ S3 m2 \ Lan := rootfolder.Internal.Tools.AOLlanguage;! k5 ^' W( I' D: \$ w: Q2 _3 s
if current = @.Destination -- else return
8 z7 B/ U2 G8 |3 b2 x1 i then/ N0 {) J( w5 P( o: K! n
@.Destination := void;8 o5 p7 M, l7 U1 ~4 ]# L
if @.occupied then7 n- o5 w5 b& u# A( U, d8 u( S
part := @.cont;2 K k3 b) F3 \ D; J; }
@.transpOrder := void;
. ]) N3 ]: @7 O; A2 c# |- ~ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
& P8 l! m$ k/ q, J9 @! g1 v @,root.eventcontroller.simTime);
! m+ [$ I: X4 l' U( b @.HasOrder := false;* y5 W; T/ U, F$ `: t2 [4 X( T
@.DrivingHome := true;& |4 [: T# e8 @. Y. E6 N: N
rgManager.tryToStartTransOrder;2 D4 _) x" O1 F" c4 O3 q
if @.Destination = void) [: N+ y4 C3 y1 l% K6 p
then -- no transport order for vehicle @* ]$ a2 Y4 C, w
@.Destination :=
6 B2 {; |) R6 q: b% E- Y rgManager.nearestFreeStation(@,track.~);
3 V, x$ Q* ~3 I9 W2 q9 r newDirection(@);
3 b9 t" J' P5 x* s if @.Destination /= void then
+ F% f. W$ [0 e* C# ~ @.Destination.NumReservation :=6 y8 G( J" F& W- h3 |' v# g
@.Destination.NumReservation + 1;
. X7 `' O9 L. r& |/ }, i" h end;
4 ~# V. S! U W# [9 k, P4 J @.CurrIcon := "drivingHome";
: M0 m6 S8 V# e @.DrivingHome := true;' l2 n: g) Y6 _3 s6 E! k" x' ]
end;
' l* c3 i7 Q4 C2 o& M else -- the vehicle @ is empty, both vehicle and part are in the same dock station
: e" }& B+ Q: ? P part := @.transpOrder;
8 q9 w8 n# e8 c; p% I part.move(@);-- load part6 D0 s8 p' @, {2 j1 y( V# e1 A6 o
@.CurrIcon := "load";' P, A9 W/ v# s) E2 ?
GlobalDistObj := part.globDestination;
* l4 Q1 U! ^# h' ~" H assignLObj := rgmanager.rgAssignL;
: o1 h1 j `. }4 b8 f4 V row := assignLObj.getRowNo(GlobalDistObj);' q# X4 T7 ^+ w: |
if Row = -1 then -- since 70
9 l, L y7 `& d if lan=1 then
/ w/ P" F% G0 M3 W" j promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
) q* F" `2 z$ k! w to_str("in der Andockstation: \"",?.~.name,"\""));( T, Z# g) E4 x. ^
else
# V3 u3 {. L" U6 S+ B promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
6 J U4 x1 Z4 H0 |( z) k to_str("in docking station: \"",?.~.name,"\"")); ) Y) J! t* D9 |. ?
end;
% k$ L J" w+ D! z6 K7 k/ K else% w; ]4 P9 g. Y- u; j7 g1 \
@.Destination := assignLObj[1,row];
]+ P2 {( g7 ]# }0 q end;
% i4 {1 B6 p. _2 Y% ` _ newDirection(@);
) d/ O" o( B+ e! ]& r( g @.HasOrder := true;
$ `( e* }# ]; O) \$ X end;
) `) @* O5 \& U; z% E4 k end;
+ P) p" L* l1 F) B. o/ i* Wend; -- of the method8 c. T* y" f8 e: J6 k
|