/* called by: entrance ctrl of the object 'track', O7 B+ q3 z! y" p# Y+ Y4 j2 X9 |
*/
+ q5 I" j: |/ o+ y1 J" B s$ b7 [is8 @! Z# ^# Y* q
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
- d m2 _; G- z, z4 c& pdo+ \, @. i/ Z2 T; _
Lan := rootfolder.Internal.Tools.AOLlanguage;
; o" ~- M8 g( u if current = @.Destination -- else return
; Y: J9 w. R5 @8 F9 A then: H; Z2 L. t2 h8 x
@.Destination := void;4 ^! V& W4 b6 Y& G: ?' R" C
if @.occupied then, i" [7 }2 ]1 J& t* M4 _+ z
part := @.cont;8 D+ {# j6 l4 e0 u
@.transpOrder := void;1 @8 Z6 n8 j5 ]# C& @% X! j
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,( X! t- u i1 @0 H& _% h0 b1 K
@,root.eventcontroller.simTime);
% K }9 W% t; f/ m. Y4 [7 a) i @.HasOrder := false;. a& L3 z6 z9 r, v- n8 z
@.DrivingHome := true;! c q- W H; U: m4 ]2 M
rgManager.tryToStartTransOrder;7 s4 i( C5 D* K( U: e
if @.Destination = void1 |& Z" M$ ^; B4 l; x% i1 M
then -- no transport order for vehicle @
# H) @0 q0 {) n" g, n, b g @.Destination :=
7 c: \/ M4 `8 q" a rgManager.nearestFreeStation(@,track.~);
% N1 x# n) F! \) ~3 g newDirection(@);
$ Y+ ` o# f2 A& \7 B if @.Destination /= void then- k3 n( w, g* P; K/ U! O4 P& o
@.Destination.NumReservation :=
! V2 g8 d6 ~% `- ~ @.Destination.NumReservation + 1;' }/ P- x% O: M# U6 H
end;. y# {4 C2 s5 V3 V* N3 Z
@.CurrIcon := "drivingHome";2 f. n! C; `; l1 v' }: A
@.DrivingHome := true;/ J; D+ K& V6 }3 E5 q
end;
' K2 F, ?+ T* b' b( w; N else -- the vehicle @ is empty, both vehicle and part are in the same dock station9 L; F5 g: _5 H, y& t9 B4 R1 A5 z3 z' ?
part := @.transpOrder;- H; c/ s2 q% Q) D( P7 e( R
part.move(@);-- load part/ S/ I7 g4 g! Y
@.CurrIcon := "load";
* X0 @2 h7 q/ w8 C; V2 r/ t GlobalDistObj := part.globDestination;" S! |/ `0 O" G; X! b3 c! D
assignLObj := rgmanager.rgAssignL;! Y J; p7 t* C! w
row := assignLObj.getRowNo(GlobalDistObj);+ H3 u* r5 O& O. k+ Z& p5 I
if Row = -1 then -- since 702 k, x. L1 t9 d) m0 ?
if lan=1 then7 i" i$ N4 F+ B( t& ^3 v# i
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),- k1 L t" {6 ]. B% m8 j4 V& m
to_str("in der Andockstation: \"",?.~.name,"\""));" `1 u c4 ^6 n/ ^: A! k
else5 ?0 [" |5 {4 ~
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
2 l1 f% M/ ]- [ to_str("in docking station: \"",?.~.name,"\"")); ( |! G# C U* o5 S2 `1 ~ [
end;
v y+ t. v* L else& t7 N+ m3 R1 _( n& k2 R) b7 u; q
@.Destination := assignLObj[1,row];. {3 S( @/ I6 w2 @) B8 M* S
end;
2 n5 e% c5 g5 w newDirection(@);
( W- ^& l: `6 ]/ s( }) c& b @.HasOrder := true;, D g/ Z: B3 U! Z# Y: N
end;/ r0 s2 p) _$ h0 I: Z1 D
end;
" a; Z7 G9 H P0 g5 |) @( Y) Wend; -- of the method) y4 i1 ?) L/ I, D5 Z/ s
|