/* called by: entrance ctrl of the object 'track'
6 u9 ?% P: q& H*/
% t, G, r6 j; _3 jis4 h) `! X$ P5 N' e9 L# r0 L V
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
/ ?5 U% W2 U( t5 m1 i* zdo
6 D5 s8 t4 P! Q$ A( B4 c Lan := rootfolder.Internal.Tools.AOLlanguage;/ s9 F8 q- h" u9 @# g8 O+ M
if current = @.Destination -- else return
+ ?* }7 A3 b4 i# t0 l7 H9 W then! Q8 ~$ R, }8 o' `( k
@.Destination := void;
$ u% @# @" F# r, C! [. K if @.occupied then
7 d7 T/ i) o4 Z( c! q/ `+ ?: g part := @.cont;
# y$ K- N4 l& i+ U; X @.transpOrder := void;
; B. @1 n# ~2 ?' Y part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,- S6 [% P6 V; L. [" ^, j' z
@,root.eventcontroller.simTime);
# J! N7 J9 c: P0 F @.HasOrder := false;
% [% [- l0 r3 j; m @.DrivingHome := true;0 F' c5 P; D: A# m6 H0 z. E3 _
rgManager.tryToStartTransOrder;, A/ n# b9 u7 d9 O Q$ y
if @.Destination = void
# f& U' }6 V9 n2 P# \6 V then -- no transport order for vehicle @
& b' k6 z( n3 V- b @.Destination :=: {. j6 I6 @% N( \; ]% T5 L
rgManager.nearestFreeStation(@,track.~);5 ]0 ] f/ x- ~& }% s7 w/ q) t0 t9 [
newDirection(@); 3 } ?4 |5 D% |" _/ A" v0 d; o0 r
if @.Destination /= void then
& X4 Y. b& b6 a% G9 |5 i* B @.Destination.NumReservation :=# Y0 k! L; L" b3 S+ H$ S& q
@.Destination.NumReservation + 1;; Z3 W! b/ Y, e6 ~! V4 I3 U, y- F- A
end;# z# p) C+ f# x* Z1 j
@.CurrIcon := "drivingHome";5 F9 b/ G5 P$ a7 J E# r [& u
@.DrivingHome := true;* [( ~. [' |9 P! a
end;
* ~- m) v" G( W else -- the vehicle @ is empty, both vehicle and part are in the same dock station3 }( ^+ O% [# x3 G
part := @.transpOrder;) X# _1 V/ s- D b8 Z5 l% p
part.move(@);-- load part
7 p9 ?, r. V) {7 |3 B @.CurrIcon := "load";% |; o3 {- {* V% @: d6 Q- C. Z! R
GlobalDistObj := part.globDestination;$ b6 o2 g& b. y2 n! _" d3 g
assignLObj := rgmanager.rgAssignL;4 c1 l1 l# ~+ Q$ J4 g! y
row := assignLObj.getRowNo(GlobalDistObj);+ v$ `, _; y) c+ {( U1 X& r
if Row = -1 then -- since 70
5 E/ {+ t$ Q; k- V4 p* l$ } if lan=1 then
0 m4 M/ ^( Z' A" d u9 u" ], m% J: O# ] promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
" Q5 u7 w. ]# A- ]6 X to_str("in der Andockstation: \"",?.~.name,"\""));2 g! F1 l2 N! Y
else# C! g* I- r9 i# |2 I
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),$ @0 `9 f( ^1 ~# a$ m) l- y* K
to_str("in docking station: \"",?.~.name,"\"")); . n! @, ~3 o& z% Q3 D; h6 A+ U3 t
end;
" |# Q) n6 d2 O$ a8 k else
. | N6 \# u! I% y/ S5 s1 z @.Destination := assignLObj[1,row];" c, ` g4 X! W. D
end; 8 c2 l- b. T% U
newDirection(@);
, L7 V. N m3 i @.HasOrder := true;$ z+ X- g% ^' k
end;
1 p6 [# `7 d: A8 X$ W5 X, s. \ end;2 I4 A$ G, s! d& B; w% g
end; -- of the method" Y7 h( M4 q* q& n
|