/* called by: entrance ctrl of the object 'track'
% Q: F# A$ V2 C/ X; A*/
0 s3 V/ x9 S* ~* \/ v8 ]2 a9 Fis
; W+ Z; x& n \, t9 |6 Q! ` part, GlobalDistObj, assignLObj:object;row,Lan:integer;
& C/ e* n8 k& l! m$ e% b" Fdo+ b4 u: @9 o# W6 J" j
Lan := rootfolder.Internal.Tools.AOLlanguage;
0 A7 |! D4 x- O" ^9 `, O if current = @.Destination -- else return
$ m" d7 l/ \3 \4 T/ v, a then
& q% t `" T4 f( c: Y& g @.Destination := void;
- r( z% `; c* K$ G' ]$ E3 e0 B if @.occupied then
+ O0 O3 @' \- f0 K0 R part := @.cont;
, B% P! l4 C' ]% {' w @.transpOrder := void;
# b5 b% N% k; V* b N1 y part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
2 ]% K6 _3 L* |! G0 K; V1 ]7 ?* j @,root.eventcontroller.simTime);4 `) U# d7 r+ ^# X3 g: M
@.HasOrder := false;
) G. k# W5 J3 c+ S @.DrivingHome := true;+ {1 w5 t3 e8 D* D1 R! f9 L0 u
rgManager.tryToStartTransOrder;% m, d6 j; H% T5 u$ B/ \
if @.Destination = void
7 ]( r+ s& m5 X. T* k# u+ u! W then -- no transport order for vehicle @ U) K+ e9 ^ L D5 ?
@.Destination :=
; O4 U# Q- l; q/ \" s1 W3 H rgManager.nearestFreeStation(@,track.~);
! V( I& G) E8 H- E7 I% u newDirection(@); , h- g$ E# W" Z7 D1 a" T1 ?
if @.Destination /= void then
% | p7 U. G( K9 ?. H$ x4 b @.Destination.NumReservation :=4 n9 `( n5 @+ r
@.Destination.NumReservation + 1;7 f* _ O' \# k, T* T
end;7 c6 {/ t* z' E
@.CurrIcon := "drivingHome";6 F6 e+ ?' p' P7 A" t3 k# \( i" E
@.DrivingHome := true;, y! k+ E5 P, B0 g7 `8 R. n
end;
% q( J- a P3 T% |4 E' _# R else -- the vehicle @ is empty, both vehicle and part are in the same dock station4 ^" r9 h* A* C/ N3 n8 d4 {
part := @.transpOrder;
: p9 E: C- }/ @ part.move(@);-- load part
8 a* o. e( a% `$ F4 h @.CurrIcon := "load";
% e% C1 _5 F( O- j' o GlobalDistObj := part.globDestination;
. r; O: E G2 F5 m! [# ~& v6 @: [0 k assignLObj := rgmanager.rgAssignL; o" L; e3 X9 o& Z
row := assignLObj.getRowNo(GlobalDistObj);
0 l: ^0 F# C2 g2 _! `7 _; B if Row = -1 then -- since 70
6 b l* Q u. x0 Y. A if lan=1 then0 N8 Z2 a* _+ f. A7 x/ I
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
; h/ ` h% h- x; G. d$ V9 t to_str("in der Andockstation: \"",?.~.name,"\""));+ N; u; _9 u2 Z0 D9 S) T- E
else
6 M: B5 z1 p; x! {1 w promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),# b, ^) ~ I# }! R* B1 ]/ r
to_str("in docking station: \"",?.~.name,"\"")); * j$ |# W4 c/ i$ i" J$ C3 N
end;& a# M8 r& i. s
else
4 e+ x& Q$ ^6 c$ @% T3 H" }1 \ @.Destination := assignLObj[1,row];* D" Z: o8 [2 I
end;
5 n& Z$ e: h4 ~- ?" a# ~8 ]* t newDirection(@);
. [$ B# L$ b4 ?$ u( M* G @.HasOrder := true;
* {) V3 l/ q8 V7 V) u) Q end;
4 } ]; _2 u$ c) y; O end;5 M2 b/ s$ U/ S! Z0 \
end; -- of the method( Q4 Y7 T6 E: d: p, [: l% [
|