/* called by: entrance ctrl of the object 'track'
8 L2 f) ]1 p, F; [*/
U( a7 I+ _' s5 Dis
0 s) G! Q' o5 V. G( d$ g part, GlobalDistObj, assignLObj:object;row,Lan:integer;4 g/ W7 h4 n( {( T: h2 v
do! P. c5 Z# }4 u
Lan := rootfolder.Internal.Tools.AOLlanguage;
1 [8 q: l) y F, L9 R6 l9 z if current = @.Destination -- else return/ @2 v4 M0 a5 `7 S/ ]5 ]
then
4 b [# q4 a6 o0 O" v6 C @.Destination := void;* T- {, e. ?7 o7 ^* Q2 |
if @.occupied then
, u3 v, G' j4 Y8 \$ a% n part := @.cont;
$ u; s: n! _- D) }- i2 ]9 l @.transpOrder := void;8 u& c* ?7 @" U- I
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1," {# N4 `1 M- y
@,root.eventcontroller.simTime);
- e$ F; ^$ Y# `, O @.HasOrder := false;2 a3 y/ t. A6 l+ u" K O k
@.DrivingHome := true;. k/ o! ^" U2 M$ A! U6 ^. k, [$ J
rgManager.tryToStartTransOrder;
4 U1 _/ H$ i7 L0 {! f1 M if @.Destination = void
; k$ y& P _4 }& u then -- no transport order for vehicle @4 J0 f |5 D+ S7 `
@.Destination :=( m. x! R1 I0 {7 t1 m
rgManager.nearestFreeStation(@,track.~);
! ], {# p& l6 X newDirection(@); ( d7 s4 C0 m5 m" i- U4 E, {# u2 O
if @.Destination /= void then: I: t0 H( T' f+ X$ x4 M8 h! }) I
@.Destination.NumReservation :=4 i k, h5 v+ n$ B
@.Destination.NumReservation + 1;; o* p& t, Y |; t
end;
2 Q; |) h3 \0 j: ?$ W( P @.CurrIcon := "drivingHome";2 e) t- H7 w& a( A0 N6 O D
@.DrivingHome := true;! c: P$ O( I/ b" r5 t2 c! v% e
end;; c% B Q: |8 k/ {% o
else -- the vehicle @ is empty, both vehicle and part are in the same dock station" g* P* T$ }5 y% G0 d3 d' R
part := @.transpOrder;& ? s1 j" j3 n' n. z: i) V6 D, v N
part.move(@);-- load part
% F u! l/ j0 _ @.CurrIcon := "load";
/ {( ^& I( x5 u: e GlobalDistObj := part.globDestination;$ h5 D. `1 j9 l# ]2 I; V
assignLObj := rgmanager.rgAssignL;
$ C! Y& B! G* R2 X i+ G0 ` row := assignLObj.getRowNo(GlobalDistObj);
, W$ N' g# _9 ` if Row = -1 then -- since 70$ ?; w. i: I" E' [# n
if lan=1 then2 O( \: S" G2 u
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),& M+ m8 K2 `* Z& p8 {
to_str("in der Andockstation: \"",?.~.name,"\""));3 N% Q3 T+ k: T5 o! w
else
+ L/ k" f% r4 h T promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),# L: ] p: g8 R. T; L9 @
to_str("in docking station: \"",?.~.name,"\"")); ! D# C ~; A( l0 F( c) k: G `
end;
* ]; [8 m$ F1 z3 {4 Z. R else" s7 z2 W* Y. K) x" Q
@.Destination := assignLObj[1,row];! H! v9 v- x# X# v7 F% m6 ~; L
end;
6 A5 V' b" L7 @: o! A- f! ^ newDirection(@);$ V) C! I0 @! K7 p$ L. ?
@.HasOrder := true;: h0 X% b0 |- b5 Q; D# ]5 K
end;
# t% j! l p5 R2 u end;& H6 r7 @# s& ^
end; -- of the method' e( K% k5 f- [! W/ B0 r: P
|