/* called by: entrance ctrl of the object 'track'
|$ J( H3 A$ X8 v*/
9 j" E# @* ]2 N* v1 K K& i& yis5 _; h+ M( t% g5 k7 B
part, GlobalDistObj, assignLObj:object;row,Lan:integer;5 P$ Z+ R) @ \ E% a2 T$ `1 [
do; x& U, n$ R1 z/ I5 e) S4 Z
Lan := rootfolder.Internal.Tools.AOLlanguage;
9 |- x# t$ K. U* Q0 i if current = @.Destination -- else return) E0 i7 H4 |: w- @8 g: O# b
then6 X( O+ S% D, P, p; G
@.Destination := void;% I4 e9 {) O- T& \ t( X
if @.occupied then
8 |. u5 a! F2 n4 _' H7 ^% L' X part := @.cont;2 @: C6 {1 v& w5 O8 u$ k
@.transpOrder := void;
$ }" g1 Q+ m/ q! }, C6 o. p part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
0 ^$ M' L) `1 u( D: K$ Y: j. V @,root.eventcontroller.simTime);
: S$ i* B9 Q; `' g* `' o @.HasOrder := false;
7 A/ h& Y: J& F0 {3 W$ n. B @.DrivingHome := true;0 k5 w$ s0 r# p9 R& ]1 Q
rgManager.tryToStartTransOrder;
, a" R: _" x% A+ I8 e if @.Destination = void Z1 X: y% S: X0 |- V
then -- no transport order for vehicle @
4 u5 W1 x# i' C0 N* \ @.Destination :=1 L( x3 ?- ]/ t$ e
rgManager.nearestFreeStation(@,track.~);' s$ c% G# t& f/ f' x# L
newDirection(@);
' ?6 k- [, G& @" O7 t' P- U4 v if @.Destination /= void then! ~% f! P7 z/ f! I* p: I* M0 W/ W
@.Destination.NumReservation := i9 D. P" h8 w0 f6 ~1 |4 W: p
@.Destination.NumReservation + 1;# z* ?; a) k9 }/ V" v J( S( a
end;
) \% Z5 _& M& j @.CurrIcon := "drivingHome";6 \, U! j' H& H
@.DrivingHome := true;5 _* {5 l. W2 a2 d
end;# Z( A5 T# e4 I/ F/ Q/ ]! z, L
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
' {7 A) e# |5 Y, Z part := @.transpOrder;
1 J. X3 B- y) {2 D; }$ v9 V part.move(@);-- load part
# r/ z5 g: n4 F: a& G2 P, ]+ z @.CurrIcon := "load";
9 ^8 t+ f [8 A- @ GlobalDistObj := part.globDestination;
4 @" I0 d$ x' t" E% b9 ~ assignLObj := rgmanager.rgAssignL;
# P1 `& |# a8 c, Q) i) i row := assignLObj.getRowNo(GlobalDistObj);
; F: q$ [" @7 j4 |4 R# y if Row = -1 then -- since 70
$ ]$ A8 e# } A! z. B2 {2 U m if lan=1 then' S5 l3 ~6 ^: f7 E, U+ r
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),, W w" r6 m. F$ C+ l7 w$ j( S
to_str("in der Andockstation: \"",?.~.name,"\""));% C5 t- }1 @$ w9 B. c
else2 `9 a4 y) u! D8 W
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
/ x7 h, e& [3 w: A/ f3 v to_str("in docking station: \"",?.~.name,"\"")); - C4 e0 X: u, w k+ E/ v, t
end;* u7 w: ^# v2 d$ |- n) P
else4 W- h% l/ l( |$ ?2 \( @ x/ d
@.Destination := assignLObj[1,row];
! A1 @' J2 {% a7 }# l! d end;
+ E; l( k& m2 i; A, s newDirection(@);
( f' D+ w B! A7 L @.HasOrder := true;
) {0 x+ k8 c4 Y, m* r9 q7 t! M end;1 q+ ~; e7 a: a1 X: y0 r$ o
end;
4 j! a" C# J' l6 I. U( ?end; -- of the method
1 D: ~ o* o) g |