/* called by: entrance ctrl of the object 'track', E4 J" ?8 a3 P0 F- a
*/
. C3 }( e6 z& O, p1 t3 n Eis! }( A0 z0 ^# }
part, GlobalDistObj, assignLObj:object;row,Lan:integer;0 F6 C$ S7 Y- I5 \9 F! R7 c" @
do
+ |. t) A5 t$ b& {9 Q- E9 m# a; g Lan := rootfolder.Internal.Tools.AOLlanguage;5 m$ ]8 v: w1 a$ G1 W" O+ F
if current = @.Destination -- else return
: D* G* _8 o7 Y$ f7 {+ W) r then
3 E& D5 n& S7 _+ a. }! G @.Destination := void;
( v% q% p1 h/ f8 f: ~: [6 a o" u if @.occupied then6 B3 f1 F# ^6 x! b+ X, D* j
part := @.cont;2 W/ C& c8 ]3 K! k o
@.transpOrder := void;2 d$ p& s- q2 l! E% ]- e
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,; W" h' ?0 D- z
@,root.eventcontroller.simTime);
5 f1 C( w# a0 \1 G: H( k2 m @.HasOrder := false;
, l9 R" r6 y, R5 D/ C! T# I @.DrivingHome := true;
! E$ t/ J! ^, F/ A1 Z rgManager.tryToStartTransOrder;# B- Q8 b) t8 D+ K
if @.Destination = void- H$ Y9 N3 y/ P5 ?
then -- no transport order for vehicle @' e( S8 i3 A2 t& [- i) g, l6 i
@.Destination :=
/ ]# y! Y4 B1 ?2 _) }. l2 N. [ rgManager.nearestFreeStation(@,track.~);
9 l; W# [0 p3 P+ q m- R& E) Q* U Q7 M newDirection(@);
( h' _) B, c! x# Z' d2 `5 S$ B7 g: Y if @.Destination /= void then
6 l7 ?" ]- ?7 _5 j) W1 R @.Destination.NumReservation :=3 j6 c( N1 I0 P, P
@.Destination.NumReservation + 1;
/ V3 ?3 I0 g! W- P2 k f3 a end;
1 P( V |; w8 p) y4 F* H r @.CurrIcon := "drivingHome";
3 E& y( U: p% {. f3 j( ^; P+ F @.DrivingHome := true;) l( Y D. {' h5 C! U9 E$ P" z7 ~
end;/ b4 w" t# r" B! L* t6 C1 G
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
4 V9 @# A2 f0 q part := @.transpOrder;
1 R- H* K& n) x$ o( J6 r0 |1 I5 a part.move(@);-- load part
5 J9 H/ g$ w7 D/ A; f* }6 t4 H @.CurrIcon := "load";
+ Y9 P9 z5 Z) o7 [0 {* J; I GlobalDistObj := part.globDestination;
. R( X. r" K8 [ w assignLObj := rgmanager.rgAssignL;, v6 S- h1 g0 E2 |& o$ [
row := assignLObj.getRowNo(GlobalDistObj);1 O* b# h+ a `$ ?( \. A
if Row = -1 then -- since 70 L5 |( N0 ~# r" y) S/ P* ?* u! j: K& `/ Q
if lan=1 then, J+ W$ Q9 @, z! c2 C9 g
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),2 F! p, A) e& @
to_str("in der Andockstation: \"",?.~.name,"\""));- N: k" k2 p& d6 ?8 }9 m
else& I, {" R7 o" ~' u
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),2 C, s4 T# l/ {
to_str("in docking station: \"",?.~.name,"\""));
/ S& I/ F+ E" ?& \) f& _ end;1 Q& J" |7 @4 I$ {2 r, J' T
else- u, ^0 L2 P) U
@.Destination := assignLObj[1,row];
& A' [$ }# w& `- Z$ t, X4 @ end;
& r# {$ D B6 N7 m) U' R& [/ x8 t ] newDirection(@);
" D9 Y* b% e9 e3 Y2 Y$ R9 C6 B @.HasOrder := true;
; h5 p5 [' y" s) L3 K. \/ r8 Y" X end;
- w5 R0 J! W% V# h! T8 @, {1 r9 o end;
; {! L- k! S4 e! ]! [8 \; Hend; -- of the method
+ K9 l# [% J* c. S: o# |, Y |