/* called by: entrance ctrl of the object 'track'1 Q) ~5 M Q$ k% j
*/
% [- R4 b7 X& wis
! c/ m8 A) T% w1 _ part, GlobalDistObj, assignLObj:object;row,Lan:integer;
2 M! W( Z, s2 H3 r( U P8 N. rdo
$ X; R( i9 O1 W. j( ~" D1 l- Z Lan := rootfolder.Internal.Tools.AOLlanguage;
9 {3 F& z$ c3 y7 q' |/ ] if current = @.Destination -- else return7 b) Q! Z- W3 V5 j- I; X
then5 r2 Z V M' x( F
@.Destination := void;
/ h& r9 j6 Q; N0 \) k7 t if @.occupied then- G3 A( W6 F, {# X! ] u% p* O
part := @.cont;# F2 y3 @1 W6 U( l
@.transpOrder := void;
+ o' ?: T. W! j- d: s part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,9 {1 e9 j7 H- h q% S+ c" ^
@,root.eventcontroller.simTime);! t# L: A7 `$ c% z% V2 B7 ]+ k
@.HasOrder := false;" E d J5 P# Q- L# Z ^5 b# F
@.DrivingHome := true; j* o0 d% J: ?) b1 F
rgManager.tryToStartTransOrder;6 E* @9 p6 R* D( D) Q2 b
if @.Destination = void
' F) S, y3 a$ u then -- no transport order for vehicle @8 n8 c) w k6 B) E. \
@.Destination :=& G4 a* z- g0 f ~' b2 g
rgManager.nearestFreeStation(@,track.~);, O. a- `" Q' m5 {
newDirection(@); " K" e- P, I" S1 r7 ~
if @.Destination /= void then
+ g6 O. ~! v# W2 f @.Destination.NumReservation :=
) i" ]" P( N' g* Q$ |# T* } @.Destination.NumReservation + 1;9 { A: p* s, L9 S; M6 e
end;
* t X- f* I1 W @.CurrIcon := "drivingHome";
* t- S6 [% x; X8 P @.DrivingHome := true;
- T; R( }/ C# O5 a( v5 ? end;2 O5 |6 @/ J$ B1 N e. O8 j9 F
else -- the vehicle @ is empty, both vehicle and part are in the same dock station i5 o8 |3 x, C# s3 |& E( o5 m9 R
part := @.transpOrder; `* G$ p# N3 P5 a0 \2 h
part.move(@);-- load part
$ ?+ \% I3 H. d2 u! {; O" S @.CurrIcon := "load";4 q- u: G' ?5 p" Y1 P
GlobalDistObj := part.globDestination;
) d/ E; @* M+ S- f/ b assignLObj := rgmanager.rgAssignL;0 U w, g1 H# d7 m* U# t# I
row := assignLObj.getRowNo(GlobalDistObj);
m! B1 R' S4 U* p if Row = -1 then -- since 707 P0 \4 d- y+ |, N5 m: [0 v
if lan=1 then
" c* { t: Q! r% @8 l5 O promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),* w" I8 F/ {3 n, v5 _
to_str("in der Andockstation: \"",?.~.name,"\""));. k. j; l7 r0 ]( z2 a5 T7 [( ]
else+ [$ |5 ?* s! v$ f0 e. D
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
8 s" i* G |# E1 I. g* E7 Q to_str("in docking station: \"",?.~.name,"\"")); u& P3 ?" e: h a3 [
end;* l* K5 o, h% S& W; _
else0 h8 V2 b6 g* V
@.Destination := assignLObj[1,row];! F4 N+ h' k3 M+ M
end;
5 Q5 V# P8 a8 ~# A newDirection(@);
8 n: k6 `! c9 U @.HasOrder := true;* b0 z) I/ O2 a* V7 c7 r$ ]
end;" e/ G0 i3 Y2 @& X0 w
end;; l9 W! t" }' a* C* p; S2 [
end; -- of the method3 D- k0 P$ u) _8 \; u- j: i7 Q
|