/* called by: entrance ctrl of the object 'track'
2 s1 E$ {9 F9 O: k$ {) T) U*/0 P6 j; m7 z4 a/ B9 R
is
z h3 c, o0 b B: F$ E. j part, GlobalDistObj, assignLObj:object;row,Lan:integer;1 T5 k0 E4 @9 \2 a/ r
do
5 K& q- D1 K8 m. x0 }) T+ l Lan := rootfolder.Internal.Tools.AOLlanguage;" b2 l9 K9 P. t% n
if current = @.Destination -- else return
2 a8 \2 ]* P! V% Y$ R6 _8 v then. h, Y% X2 M, b7 P. R) E( ~
@.Destination := void;' r: l# G0 n( n9 F! A; X4 X# I- X
if @.occupied then
- t) x2 F" r0 \ E! F8 x- y part := @.cont;- d3 H8 d; x+ Y7 d
@.transpOrder := void;; t; H. H* @( m+ F* @
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,. Q1 }3 ^" S) E3 ?8 |
@,root.eventcontroller.simTime);8 B: }( W+ g* R+ R: y" V% j0 Z' M& }
@.HasOrder := false;
L; S1 K* U4 ~/ G) O4 H5 \ @.DrivingHome := true;
; J& r) Q6 }/ V/ E, E& x6 g7 [( s+ z rgManager.tryToStartTransOrder;
" t/ ~/ u) u- E if @.Destination = void
; c3 ?' _9 Q1 u# j/ b1 r then -- no transport order for vehicle @
9 L( m9 k+ I E$ w2 Z @.Destination :=; o, X7 D; n* f' G8 A5 v
rgManager.nearestFreeStation(@,track.~);( t% L! X, x t6 K7 F
newDirection(@);
- e. H# t! t7 p if @.Destination /= void then- N O& m# P; m0 N5 j# z, ^
@.Destination.NumReservation :=* X3 H( i. d8 e+ r- e! R* \+ z9 M
@.Destination.NumReservation + 1;1 u/ r1 x+ j! K3 D/ x3 f
end;: x1 Y+ P5 e4 ?7 X! O
@.CurrIcon := "drivingHome";9 C. ?* h3 o. I5 d: }
@.DrivingHome := true;# v- n1 ]( C1 p! x
end;' S' G w$ q" o+ N+ J" J0 M
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
- ?. ]- m6 `' e part := @.transpOrder;
* X4 a4 _3 F7 f3 ~ part.move(@);-- load part$ q7 O9 Y! p" O" H8 W
@.CurrIcon := "load";
# d: r' B$ h# X GlobalDistObj := part.globDestination;2 y9 `/ }( L! v
assignLObj := rgmanager.rgAssignL;
0 f+ t' F* f( r% \; Q' w row := assignLObj.getRowNo(GlobalDistObj);" A4 c v( a9 n/ }6 s% q" ?
if Row = -1 then -- since 70
8 Z* E( s) }4 V8 E if lan=1 then) R Y# n2 m* v# f
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),* L/ ~) U q# E' K6 M4 T; u$ l
to_str("in der Andockstation: \"",?.~.name,"\""));% Z6 k2 E9 E' r. q* T
else
" B2 s7 B5 n3 a: Q7 x+ ^& o promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),* c @: \4 B. N+ I
to_str("in docking station: \"",?.~.name,"\""));
" I4 C1 j, i2 Z end;: D7 r5 U S& r/ ~0 O4 h
else# b5 r' \" Z' A O( N
@.Destination := assignLObj[1,row];% B9 ^$ M0 l' l( G
end; # p3 }% c, f& |# c. }$ w9 V
newDirection(@);! P2 \0 u( _, F3 V
@.HasOrder := true; t) e$ E' r) S; |5 i
end;
* k4 J9 Z4 O3 }. a+ K- Q end;
( I, ?+ {3 p- B1 P# X; E! T0 H) Aend; -- of the method
1 }( t' X) f# @3 M) D6 K: @ |