/* called by: entrance ctrl of the object 'track'
, J, N; y' t% s$ I- _*/9 s' d9 G9 q; F/ E" d5 q
is
2 B4 ^, B E$ `& ? m7 z5 l part, GlobalDistObj, assignLObj:object;row,Lan:integer;
( F, {( f( U4 i [do- W$ h+ A+ u0 x: X' }% E8 ]# f
Lan := rootfolder.Internal.Tools.AOLlanguage;1 S3 w {4 c. l0 O) {: y
if current = @.Destination -- else return
1 q& j# L' a+ W$ b2 t, A! w. U1 f1 S then7 w/ ]# e: s( H8 h
@.Destination := void;3 P& X( l* o. w' i* `9 \0 K' q
if @.occupied then
; N( @! z% p( X& \; U part := @.cont;
% d0 Z9 k V; M7 x0 }; o @.transpOrder := void;
- X" X' h+ Q* R4 Q7 S* T part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
' v9 M% ]/ ~& T5 a @,root.eventcontroller.simTime);6 [6 u- j. E+ C3 l
@.HasOrder := false;, V+ q) w# P' V/ w$ G. Y2 t
@.DrivingHome := true;
# V: m; H; h8 i) m0 } rgManager.tryToStartTransOrder;& Z4 p( u0 m% d5 ^7 y8 @# @
if @.Destination = void' e% m3 n# _ g- A8 f0 ]
then -- no transport order for vehicle @
2 L/ z8 ^* N/ @6 y3 d @.Destination :=
3 r, j: c: }3 }7 g G0 m- n rgManager.nearestFreeStation(@,track.~);# O1 [0 d" E: m8 [1 B
newDirection(@); ; v4 S% `% g# ~2 E5 D7 B, {
if @.Destination /= void then# E) l& ~3 v4 l
@.Destination.NumReservation :=+ s ~* l" n; V" c+ C# m
@.Destination.NumReservation + 1;7 a' L0 `& A7 \% V# @
end;
$ x& ^8 `+ ?8 b5 r @.CurrIcon := "drivingHome";" |* a/ l7 Q6 g$ I& b" t# Y' N# F
@.DrivingHome := true;5 P5 x3 V P: k ~. `9 p1 \, Q
end;" W% \3 S/ j1 S% h3 @
else -- the vehicle @ is empty, both vehicle and part are in the same dock station; W0 l0 X# c2 s
part := @.transpOrder;0 [* o( ]1 z6 M& H, u) m2 b
part.move(@);-- load part9 @% i- B* Z3 d; {% r4 w! X
@.CurrIcon := "load";/ X- q& |# P/ M2 B# v* D
GlobalDistObj := part.globDestination;
* P; `/ x$ |. s assignLObj := rgmanager.rgAssignL;5 y- M! p% F! s8 x9 |
row := assignLObj.getRowNo(GlobalDistObj);
2 E+ l8 x6 @; G8 A# t- j( w& d if Row = -1 then -- since 706 o; W& N# p+ k3 u( C
if lan=1 then
' |% K4 e4 B: O promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
2 w8 E5 n3 q6 b ~7 m2 X `2 C' w' t# o to_str("in der Andockstation: \"",?.~.name,"\""));$ U* w( q9 M, R" j
else( }- E; r: u8 s# {5 k3 M1 `! B
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),9 I) m0 W3 e- G9 w, p
to_str("in docking station: \"",?.~.name,"\"")); + v+ I; ^& U( H* S4 ]7 A
end;4 Q9 V% O# W; Q: j. l2 W
else1 D' Y/ H( A% l0 H4 \5 @
@.Destination := assignLObj[1,row]; |7 r; ?0 K2 @5 }/ K# h
end; 9 t9 w3 K/ p) K
newDirection(@);
8 s6 j2 _. W& t/ s3 g @.HasOrder := true;
9 C0 X. t* _3 \! }3 x end;* ^3 f. I* B2 ^% X4 `
end;
) H, W) Q) ]3 K, {. f' q7 ^: ?; Vend; -- of the method
9 n3 E- \% B5 T |