/* called by: entrance ctrl of the object 'track'. _, y% ]) k; E
*/: M4 m2 d+ f0 _& ^' q. R7 i2 v6 }- n
is
8 U; M8 U6 Y8 ~. U" J part, GlobalDistObj, assignLObj:object;row,Lan:integer;
7 W+ l+ e5 a# k4 b$ M* \do# y5 x) `% l# p' x: P8 s
Lan := rootfolder.Internal.Tools.AOLlanguage;8 K$ a Q# f$ u; [. v
if current = @.Destination -- else return
2 T: A" ?, a- ^1 Z |" U. x then
! {( m6 \+ O; y+ @: ] @.Destination := void;
7 ]) ^7 E& [3 H- S+ T if @.occupied then
" b' L2 M7 B7 h6 e# W part := @.cont;: d+ g( p8 I9 J/ z( H
@.transpOrder := void;
! U+ P* l9 Y% I1 @. b( L part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
" o% | F3 l+ T" L8 L7 L, M3 W @,root.eventcontroller.simTime);4 \$ [- c7 U' g* ^3 V
@.HasOrder := false;
6 Y: p' b+ \" R. h @.DrivingHome := true;+ t6 _' G: I6 i3 t! G
rgManager.tryToStartTransOrder;
+ ?% j1 C# ^: C7 y6 Y/ e; h if @.Destination = void
$ s/ W: s7 J& [* c then -- no transport order for vehicle @1 ?6 k4 h! E: S S5 ^* |. J
@.Destination :=- n' [# v R# j: G5 y* S% K9 M
rgManager.nearestFreeStation(@,track.~);- A! Z1 q# R. h8 f- v7 T
newDirection(@); # `' L8 z6 E8 S- i
if @.Destination /= void then: X9 D- f* E) T! ?( M
@.Destination.NumReservation :=
& G F. u6 Q/ @ v T" b @.Destination.NumReservation + 1;
; M7 B" L/ F3 \% P# n! w B0 ]/ _6 M end;
% a0 N" a4 @$ h% |# j& J, {& I @.CurrIcon := "drivingHome";; v3 e m c9 c
@.DrivingHome := true;
# { c5 N4 X8 ~& Y! Y: R end;* b' _& Y, i/ V* W' y+ Z7 e
else -- the vehicle @ is empty, both vehicle and part are in the same dock station8 M8 s& t1 e$ ]6 d
part := @.transpOrder;0 d& Z& L+ p0 M# d# e
part.move(@);-- load part* y% |, ?+ L, i9 j7 V; R& x
@.CurrIcon := "load";; P/ ~& _" m: d& g7 e" d" D% Y
GlobalDistObj := part.globDestination;; a- J/ P' e8 f+ |# B% u5 c
assignLObj := rgmanager.rgAssignL;& B/ E$ M- \2 c4 n
row := assignLObj.getRowNo(GlobalDistObj);7 f% N/ r9 S) C- R! M; j3 U
if Row = -1 then -- since 70
" _- e9 D/ m8 D( Y+ T2 n if lan=1 then
/ M3 Y' v+ X1 u promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),, S6 A8 m: Z- T6 C' \) V1 I
to_str("in der Andockstation: \"",?.~.name,"\""));2 v, S8 r: |8 z+ R6 m$ {+ Y# e/ p# c
else
: m! J1 ]# X% L* F$ f; x( W4 Y: b promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
5 O+ d# a$ R& A9 g8 h3 L3 L) O E. k to_str("in docking station: \"",?.~.name,"\"")); 1 I& F; b: [4 m+ z
end;. r5 G% V' ~* G" @# y5 H% X1 X
else
, Z( Y) {# N# M3 E% e! ] @.Destination := assignLObj[1,row];
& O8 K9 w8 ^9 Q, ?% o8 Q& { end; * E6 [; N p% N; B+ w S" L
newDirection(@);; o- q$ F$ H- g+ _- j
@.HasOrder := true;
9 p: n" S; |( v( b; g end;( @0 |* v }" f5 H/ u) R2 m
end;
& B2 g# n5 H2 C' _* c2 iend; -- of the method
! B! c( @9 w+ t( {1 ], e |